I’ve uploaded the PDFium Delphi VCL control code that was sitting on my disk for 2 months to GitHub. It contains the DLL bindings, an abstraction layer and an example VCL control.
I’ve uploaded the PDFium Delphi VCL control code that was sitting on my disk for 2 months to GitHub. It contains the DLL bindings, an abstraction layer and an example VCL control.
Hi Andy, I like PDF documents! 😉
I can’t load the DLLs (both 32 & 64). Are they correct? SafeLoadLibrary fails. ???
Hi Andy,
I’m having the same problem.
I downloaded the DLL’s directly from your link.
If it helps, the error message from LoadLibrary (within SafeLoadLibrary) is titled “PDFium Test: PdfiumLibExample.exe – Bad Image” and says the DLL (I’m using the x86 version) “is either not designed to run on Windows or it contains an error”.
Any thoughts?
How did you download the DLLs? With “git clone” or by right clicking the “pdfium.dll” link and “save link as” what downloads a GitHub web page but not the file.
Thanks Andy.
You were right. I used “Save link as” from GitHub, and despite looking like it had downloaded the DLL file, it was in fact just an HTML page in a file with extension .dll.
Downloading the whole project (I used the “Download Zip” button at the project root) and extracting the DLL files works fine.
Ok, I had the same problem with git. Now it is working well.
Hi Andy,
i tested it out with a pdf plan (880x625mm, 8.23 MB). It is very, very slow. To loading and rendering this plan it tokes minutes (Compiled in XE6, Win64). Resizing the windows tokes minutes and the whole pc freezes. Also that sheems to be a problem with the colors. The background is rendered in yellow.
Loading the same plan in adobe reader takes 5 sec. and the background is white how it should be.
My question is: Come this problems (Perfomance, Wrong Colors) from the pdfium.dll or is this a problem from the wrapper?
You can pause the application to find out if it is the wrapper or the DLL.
Can it be that the PDF file consists of a scanned paper (one bitmap inside the PDF). AcrobatReader uses a trick to resize the page faster. It scales the already rendered page and then after some milliseconds it renders the page in the new size.
The page color is changed in the example code with “FCtrl.PageColor := RGB(255, 255, 200);”. Remove that line and you have a white background.
BTW: The code is only an “Example of a PDF VCL Control”.
Another question: Can the wrapper/PDFium write PDF files (write on canvas, write out as PDF file)? I haven’t seen code for that so far.
It can’t. PDFium has some functions to modify a PDF but they are very limited and I think only to fill a PDF form.
Check this.
http://synopse.info/fossil/wiki?name=PDF+Engine
Example:
http://synopse.info/forum/viewtopic.php?pid=1909#p1909
I know SynPdf, but it has bugs.