I've been using a different PDFium Component Suite because I need support for both Delphi 6 and RAD Studio 11. I need to convert PDF's of CAD drawings (i.e. 24" x 36", 30" x 42", etc.) to bitmaps. I was testing the conversion of a 24x36 sheet to various formats (bmp, gif, jpg, png, etc.) at dpi values ranging from 100 (~8.5 MP) to 700 (~423 MP).
Using the 32bit dll, the resolution maxes out around (~78 MP) or a BMP around 222 MB.
Using the 64bit dll, the resolution maxes out around (~423 MP) or a BMP around 1.18 GB.
To convert the PDF using WINSOFT's PDFium library, I make the following call to create a TBitmap.
Bmp := PDFium.RenderPage(0, 0, Width, Height, ro0, [], clWhite);
Then, to convert to any given format, I'll use ImageEn to write the bitmap. For example...
ieBmp := TIEBitmap.Create(Bmp);
ieBmp.Write(ImageName + IntToStr(DPI) + '_' + IntToStr(Width) + 'x' + IntToStr(Height) + '_' + IntToStr(Width * Height) + '.jpg', ioJPEG, nil);
In RAD Studio, I tried switching to ImageEn's implementation (iepdf64.dll) of PDFium and ran into a couple of issues.
01. If I activate the iepiPDFium plug-in, WINSOFT's PDFium fails to load the PDF file.
02. To avoid the conflict, I tried switching from WINSOFT to ImageEn to do the PDF conversion. For example...
ieBmp := TIEBitmap.Create();
ieGlobalSettings.PdfViewerDefaults.DPI := DPI; { 100 to 700 }
ieBmp.Read(PDFFlName);
ieBmp.Write(ImageName + IntToStr(DPI) + '_' + IntToStr(Width) + 'x' + IntToStr(Height) + '_' + IntToStr(Width * Height) + '.jpg', ioJPEG, nil);
However, any conversion above 500 (~216MP) or a BMP around 889 MB, fails to write. The read appears to work ok, and the width/height are correct in the debugger. So, I'm not sure why I'm running into this limitation using the second method.
I was doing these tests with ImageEn 11.4.5. I've not been able to do the tests with 12.5.0 due to an error I'm getting with RAD Studio 11.
MFM