PDF fails to render (infinite loop!)

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-Tools SDK of Library DLL functions(only) - Please use the PDF-XChange Drivers API SDK Forum for assistance with all PDF Print Driver related topics or PDF-XChange Viewer SDK if appropriate.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
AndrewMack
User
Posts: 3
Joined: Mon Nov 16, 2015 3:28 pm
Location: GTA, Canada

PDF fails to render (infinite loop!)

Post by AndrewMack »

Hey, guys! Got a fun one!

We got a PDF from a customer that was failing to load inside of our software. It was getting stuck at PXCV_DrawPageToDC.

Unfortunately, the size of the pdf file is too large to upload here (6mb, 5.5mb zip'd). Is there an alternative method for sharing available? Dropbox? (pm?)

Ah, here we go - Dropbox :: https://www.dropbox.com/s/k0i6mzsk9zieo ... 2.pdf?dl=0

We've noticed that the PDF-XChange Viewer also has a little trouble with the file, but it appears it's only a problem at certain zoom-levels/viewports.

When the zoom level changes it looks like a new thread kicks in to render the PDF (you guys render PDFs so fast! FANTASTIC JOB!). Some zoom levels will only ever render the top-left portion of the file; after that part is done, it stops rendering... however, the thread is still working pretty hard. If I continue to change the viewport back and forth I'll eventually get the PDF-XChange Viewer to hit about 89% CPU... and that's when I close the application haha. My computer gets a little loud at that point.

I tried the PDF with Chrome's plugin as well as PDF-JS. Chrome renders it no problem at any zoom-level. PDF-JS has no such luck.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PDF fails to render (infinite loop!)

Post by Tracker Supp-Stefan »

Hello Andrew,

Welcome to our forums.
Sorry I will have to break in the bad news - but the Viewer (and the Viewer AX SDK) are no longer actively developed, and will not get any new builds unless there is a very critical vulnerability that needs to be closed. The reason for this is that we have had the Editor SDK our for some time now, and it replaces the Viewer:
https://www.pdf-xchange.com/product/pd ... editor-sdk

So while the Viewer can't handle this file properly, the Editor renders it just fine, at any zoom level, and rather fast for such a heavy file I should say. Hence my recommendation would be for you to consider upgrading your product to use the Editor SDK instead of the Viewer one you currently utilize.

Regards,
Stefan
AndrewMack
User
Posts: 3
Joined: Mon Nov 16, 2015 3:28 pm
Location: GTA, Canada

Re: PDF fails to render (infinite loop!)

Post by AndrewMack »

Thanks, Stefan! I've let my higher-ups know!

Would we have the same capabilities as the old library? -- pass a device context and allow you guys to render to it?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PDF fails to render (infinite loop!)

Post by Tracker Supp-Stefan »

Hi AndrewMack,

It might be slightly different code and wording of the methods/interfaces but yes - a similar feature would be available.
We are also working on a "Simple Editor" SDK - which will be comparable to the Viewer Simple DLL SDK that you are currently using. It will be released as soon as possible, and will probably be cheaper than the fully features Editor SDK currently available on our website.

Regards,
Stefan
AndrewMack
User
Posts: 3
Joined: Mon Nov 16, 2015 3:28 pm
Location: GTA, Canada

Re: PDF fails to render (infinite loop!)

Post by AndrewMack »

We were able to get all we needed right from the core dll! Pretty simple -- just a different way of doing the viewport stuff (matrices instead of rectangles). Beauty!

Thanks again for your help, Stefan!
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: PDF fails to render (infinite loop!)

Post by Tracker Supp-Stefan »

Hi Andrew,

Glad to hear you got a working solution!

Regards,
Stefan
Post Reply