Beiträge von stffabi

    Hi

    The proble is not that pinvoke has to be enabled. The problem is, that a stack imbalance has ocurred by calling the GetDC function

    The GetDC function needs as parameter a intptr type because it's a handle and not a long. So after calling the function, the stack is not correctly in the way .net expects it because the type was not the excpected one of the dll. .net 2 is very strict in checking such things, this could be disabled but I think it's better to change it to the correct parameter instead of disabling this check.

    Here's the fix.

    Take the wrapper dll source code and change the following. In the file wpdfinterface.cs in the class wWindowsWrap change the GetDC definition from

    public static extern IntPtr GetDC(long handle); // We need to call this with '0'

    to

    public static extern IntPtr GetDC(IntPtr handle); // We need to call this with '0'

    same for the ReleaseDC, the handle parameter's type has to be intptr.

    In the file class1.cs change the calls to getdc and releasedc. Change all '0' parameter values to intptr.zero.

    That will fix the problem.

    Another question to you Julian. Are you going to develop a x64 version of the wpdfcontrol dll? Or are you planing to implement a 100% percent native .net dll that will work under x64 and ia32 .net framework without replacing the dll?

    Kind Regards
    Fabrizio

    Hi Julian

    I've taken a look into the c# source code of the wrapper class. The problem I found out, are the calls from the wPDFControlWrap calls to the static wPDFControlDLL class. Only one thread could actually call a function on the static wPDFControlDLL, that goes to the wpdfControl02.dll. I synchronized the calls and now everything works just fine. Tried 1000 loops with 4-10 threads without any problem.

    If you would like I can send you the modified code of the wPDFControlWrap and wPDFControlDLL class by mail?

    Kind Regards
    Fabrizio

    Where have you donwloaded that file?

    I can only donwload an Installer that is from 1.12.2004 and there's the wpdfcontrol02.dll with the version 2.3.7.0 packed. but i can't find any other file to download under our account under support.wpcubed.com

    Same here sometimes, I get the exception that the page couldn't be started because there wasn't a begindoc call. but the call was there, and somethimes it just works fine.

    It would be nice if there would be a bugfix for this soon.

    Guten Tag

    Wir besitzen eine SiteLicense für das wPDFControl. Ich habe soeben auf der Homepage gesehen, dass es eine neue Version (2.61) der wPDF Engine gibt. Wird diese neue Engine auch in eine neue Version vom wPDFControl einfliessen? Im Downloadbereich ist das wPDFControl immer noch mit der wPDF Engine 2.30 enthalten.

    Gruss Fabrizio

    Guten Tag.

    Ich evaluiere derzeit PDF Komponenten für unsere Firma. Ich bin auch Ihr PDFControl gestossen und es entspricht unseren Anforderungen. Ich habe die Demo Version von der Homepage heruntergeladen und mit den entsprechenden Evaluations DLL’s ein paar Sachen implementiert. Leider bin ich auf ein paar Probleme gestossen, vielleicht liegt es an den älteren DLLs und ist in der aktuellen Version bereits behoben. Allerdings ist auf dem Web keine aktuelle Version als Trial herunterladbar.

    Ein erstes Problem trat auf beim Verwenden von dem PDF Canvas. Ich wollte die PageUnit des Graphics Objekt auf Millimeter setzen und dann eine Testseite drucken. Leider war das Koordinaten System völlig falsch, alles war zu gross. Also dachte ich, ich lasse das Wechseln der PageUnit weg und versuchte mit der StandardUnit, 1/72 inch. Was allerdings auch nicht korrekt war. Ich musste dann noch X Koordinaten um den Faktor 96/101.6 und Y Koordinaten um 96/108.373329 skalieren, so stimmte es dann einigermassen. Diese Werte habe ich schon früher mal verwendet beim Zeichnen in ein Metafile, als ich das Metafile nicht mit der Pixel Einheit erstellt habe.

    Ich hab dann auch versucht ein Metafile aus der Seite die in ein PDF umgewandelt werden sollte zu erstellen, mit einem Metafile in der Grösse einer A4 Seite und einem entsprechenden Graphics Objekt darauf, welches auf die A4 Seite geclipt ist. Leider war dann das Problem beim erstellen des PDF via PDFcontrol.DrawImage(Metafile) dass es einen kleinen unteren und rechten Rand gab.

    Ich habe Ihnen bereits am Mittwoch 20.7.05 eine Mail diesbezüglich an support@wptools.de geschickt, leider habe ich bis jetzt keine Antwort darauf erhalten. Im Mail habe ich Ihnen ebenfalls Beispiele zugesandt.

    Fabrizio