Page 1 of 1

PDF fails to render (infinite loop!)

Posted: Tue Nov 17, 2015 4:40 pm
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.

Re: PDF fails to render (infinite loop!)

Posted: Tue Nov 17, 2015 5:22 pm
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

Re: PDF fails to render (infinite loop!)

Posted: Tue Nov 17, 2015 6:05 pm
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?

Re: PDF fails to render (infinite loop!)

Posted: Wed Nov 18, 2015 11:45 am
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

Re: PDF fails to render (infinite loop!)

Posted: Thu Nov 19, 2015 2:50 pm
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!

Re: PDF fails to render (infinite loop!)

Posted: Thu Nov 19, 2015 2:55 pm
by Tracker Supp-Stefan
Hi Andrew,

Glad to hear you got a working solution!

Regards,
Stefan