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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - PDF to Image conversion issue
  FAQ FAQ  Forum Search   Register Register  Login Login

PDF to Image conversion issue

 Post Reply Post Reply
Author
Message
rizzz86 View Drop Down
Beginner
Beginner
Avatar

Joined: 17 Oct 16
Location: Bahrain
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote rizzz86 Quote  Post ReplyReply Direct Link To This Post Topic: PDF to Image conversion issue
    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.
Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 437
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 18 Nov 20 at 4:02PM
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.
Back to Top
rizzz86 View Drop Down
Beginner
Beginner
Avatar

Joined: 17 Oct 16
Location: Bahrain
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote rizzz86 Quote  Post ReplyReply Direct Link To This Post Posted: 21 Nov 20 at 7:58PM
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
Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 437
Post Options Post Options   Thanks (1) Thanks(1)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 22 Nov 20 at 12:28PM
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.
Back to Top
rizzz86 View Drop Down
Beginner
Beginner
Avatar

Joined: 17 Oct 16
Location: Bahrain
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote rizzz86 Quote  Post ReplyReply Direct Link To This Post Posted: 30 Nov 20 at 7:14AM
Thanks for the detail reply.

With your help now I know the fix for this issue.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store