Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
PDF to Image conversion issue |
Post Reply ![]() |
Author | |
rizzz86 ![]() Beginner ![]() ![]() Joined: 17 Oct 16 Location: Bahrain Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() Posted: 18 Nov 20 at 2:58PM |
I am using Debenu (12.12.1.0) library to convert PDF documents into images.
In one of the PDF document the output image is not correct. The output image shows some data got swapped. The PDF file is: https://drive.google.com/file/d/1v39_l5rrl7PppObJN1vNxR04Z5ByCySF/view And the generated image is: https://drive.google.com/file/d/1osyuRzRT3AfolwvigcCT0_30THPn6CmS/view I am using following function to get image of the loaded PDF: QP.RenderDocumentToFile(210, 1, QP.PageCount(), 5, tempFile); Please confirm if the issue is reproducible on your side. |
|
![]() |
|
tfrost ![]() Senior Member ![]() Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
![]() ![]() ![]() ![]() ![]() |
I like testing our own rendering program with 'problem' PDFs so I downloaded your file and tested, but with version 18.11 of QPDF. There is something unusual about this PDF, because I found that the two images on the first page were rendered rotated by 90 degrees (and we do call NormalizePage on each page before rendering). I suggest sending the link to Foxit support and raising a support case. You could also try switching renderers to PDFIUM, because the raw PDFIUM rendering works fine here; but I do not remember if QPDF 12 supported this rendering option within the library, or when this was added.
|
|
![]() |
|
rizzz86 ![]() Beginner ![]() ![]() Joined: 17 Oct 16 Location: Bahrain Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() |
Thanks @tfrost for your comments, it helps.
The switching of renderer to PDFIUM rederer is not supported in Debenu 12 so I tried it with Debenu 18 and it worked. But I cannot just directly switch to PDFIUM renderer in all the cases as the issue that I am facing is rare. Please suggest if there is a way to identify that whether the PDF is unusual and it requires PDFIUM renderer to be used instead of default renderer. If there is a way then way to identify it using Debenu then I will only apply PDFIUM renderer when needed. rizzz86 |
|
![]() |
|
tfrost ![]() Senior Member ![]() Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
![]() ![]() ![]() ![]() ![]() |
We have the same issue of not always knowing which rendering is the best to use, but be aware that my solution is not going to suit everyone. We have been users of QPDF since v7, principally for rendering PDF to TIF, but also for creating and editing/annotating PDFs. In the early years there were often 'edge cases' where the rendering was incorrect, mainly for CJK documents, but also some others; Debenu were usually able to fix these in the next release, but not always. Most of our users do not control the PDFs which are to be rendered, and silently creating incorrect output was an unwelcome feature. So PDFIUM seemed a safer choice. As you have discovered, PDFIUM is more likely to support all the edge cases. As a result, since 2016 our default rendering solution has been PDFIUM, using the DLL packaged for Delphi by Winsoft, which we found just before Debenu released a PDFIUM option in v13. We stuck with Winsoft because they seem to add support for new PDFIUM DLL versions more frequently than QPDF, but if I was choosing today I would probably use the QPDF PDFIUM option. Yes, for both solutions there is an extra DLL to deliver and update, but we can manage this. We continue to use QPDF for all PDF applications other than rendering; it has many more features and is much easier to use, and we have no reason to abandon our existing code to call PDFIUM directly. And we fall back to regular QPDF for rendering in several situations: (1) for applications where we have to render PDF documents using multiple threads in the same process; (2) after PDFIUM returns an 'unsupported' error or raises an exception; (3) as an option for users who have grown to prefer the QPDF rendering for their specific documents.
|
|
![]() |
|
rizzz86 ![]() Beginner ![]() ![]() Joined: 17 Oct 16 Location: Bahrain Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() |
Thanks for the detail reply.
With your help now I know the fix for this issue. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store