OpenDocument without ClearScreen to avoid flickering

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

RudolfErnst
User
Posts: 73
Joined: Tue Oct 14, 2008 2:14 pm

OpenDocument without ClearScreen to avoid flickering

Post by RudolfErnst »

Hi,

in our client application we use the ActiveX Browser Plugin in an Eclipse RCP framework. Our clients have a lot of small pdf files which they want examine one by one in different orders. Normally such a pdf file is small and contains only one page. Browsing through a series of documents means loading one page after another. Unfortunatedly our clients want to scroll through a series of documents like having one big document and scrolling it down. And unfortunatedly again they have very slow Pentium 4 PCs.

Now they are complaining about the white page they see between two OpenDocument Calls. And indeed this flickering is annoying when browsing very fast through many documents. To me it seems that PDF-XChange clears the display before opening a new document. Is it possible to call OpenDocument so that it starts immediatedly with displaying the document without clearing the screen content before.

kind regards
Rudi
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: OpenDocument without ClearScreen to avoid flickering

Post by Corwin - Tracker Sup »

Sorry but that behavior of PDF-XChange Viewer cannot be changed.
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: OpenDocument without ClearScreen to avoid flickering

Post by Lzcat - Tracker Supp »

If you need only a document preview you may use the Simple DLL Viewer SDK to draw PDF pages to screen (or render and cache bitmaps). In this case you will have full control over drawing, but no interactive features. This may be good for preview window (like page thumbnails in Viewer), but for other purposes you will need the Viewer AX.
HTH.
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
RudolfErnst
User
Posts: 73
Joined: Tue Oct 14, 2008 2:14 pm

Re: OpenDocument without ClearScreen to avoid flickering

Post by RudolfErnst »

Hallo,

Because this issue is very important for our customer, here an additional question in the same context as below:

Maybe – if it is not possible to completely avoid the white screen before displaying a new document – would it be possible to shorten the duration, the white screen is displayed?

It seems that the period of time the white screen is displayed, is longer if PDFXchange has to do more rendering, esp. (and in our case important:) the antialiasing and scaling (downsizing), and shorter if it does not have to do so. When we turn off scaling and antialiasing in PDFXchange the white-screen-effect is OK for our customer, but the quality is not.

=> Would it be possible to shorten the period of time the white screen is displayed with scaling and antialiasing switched on (something like “Do some sort of hidden rendering and start to display the document/the pixels after all calculations are already done.")?

Thanks in advance and kind regards,

Rudi Ernst & Joachim Süßmann
User avatar
Lzcat - Tracker Supp
Site Admin
Posts: 677
Joined: Thu Jun 28, 2007 8:42 am

Re: OpenDocument without ClearScreen to avoid flickering

Post by Lzcat - Tracker Supp »

Hi,

Sorry, but there is no "white interval" between opening and displaying a page in Vthe iewer.

The Normal behaviour is to open the document and then the render page content in separate thread(s) - to avoid interface blocking during rendering (rendering is a time consuming operation, it may take even seconds if the page content is "heavy").

In many cases you can see a white background if the page content cannot be rendered faster than you can see this (for example if your PC is performing other tasks). Open a really complex page and you will see how it partially renders, and note that in the same time you can navigate through the document, change zoom, etc.

If we were to change rendering to a synchronous mode you will see nothing and will be able to do nothing until we finish rendering. Is this preferred behaviour for most users?

I dont think so ...

In normal usage you will see a white background for a tenth or even hundredth's of a second (and won't even notice it), but as you use the ActiveX and it's constantly opening and closing documents, which is also a time consuming operation, the PC is potentially really busy.

And as I said before, for preview operation a much better solution is to use the simple DLL SDK we offer - you have full control over it, where the ActiveX behaviour by design is fixed largely.

If page content is heavy and you want good quality - you must spend some time to render, its a double edged sword and somewhere as with any application comprises are necessary to a achieve a broadly acceptable result.

And for that time Viewer must render what it has - a white background or partially rendered content will be seen - possibly.

If you try to hide document view - it will not render until made visible. And this behaviour cannot be changed, sorry.

If you use simple Viewer SDK to display a document preview - it will spend almost the same time to render a page, BUT it is fully synchronous, so if you try to render page content in the main thread - you application will be frozen until rendering is finished.

You may use another thread(s) to render content (for example to a bitmap) and then use it to draw on screen. In this case it is your responsibility what to draw and you allow the user to work on until the page is ready. You may use both simple SDK and ActiveX at the same time (subject to licensing of course) - firstly for a preview, and then for editing/detailed Viewing.

Yes, this require's some coding, but we cannot change the Viewer ActiveX behaviour.

HTH.
Victor
Tracker Software
Project manager

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
RudolfErnst
User
Posts: 73
Joined: Tue Oct 14, 2008 2:14 pm

Re: OpenDocument without ClearScreen to avoid flickering

Post by RudolfErnst »

Ok, thank you for the quick answer.

I'll give it a try. I try to use both simple SDK and ActiveX at the same time. Howerver I can not found any documentation nor the SDK. On your page https://www.pdf-xchange.com/downloads/dev/ the ActiveX SDK uses the same link as the Simple DLL SDK. Are they both in the same SDK? Is there a Java API for simple SDK?

kind regards
Rudi
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: OpenDocument without ClearScreen to avoid flickering

Post by Corwin - Tracker Sup »

When you install Viewer SDK from "pdfvSDKFull.exe", you should get both help files (for Viewer AX and Simple DLL) in "..\Tracker Software\PDF-XChange Viewer SDK\SDKHelp\" directory.
Is there a Java API for simple SDK?
No, we don't have anything like that.
RudolfErnst
User
Posts: 73
Joined: Tue Oct 14, 2008 2:14 pm

Re: OpenDocument without ClearScreen to avoid flickering

Post by RudolfErnst »

Thanks,

and how can I get "pdfvSDKFull.exe"? All the links on your developer site point to pdfvSDK.zip.

Rudi
ugradedeveloper
User
Posts: 223
Joined: Wed Aug 22, 2007 4:40 pm

Re: OpenDocument without ClearScreen to avoid flickering

Post by ugradedeveloper »

RudolfErnst wrote:and how can I get "pdfvSDKFull.exe"? All the links on your developer site point to pdfvSDK.zip.
That's the file you want. pdfvSDK.zip contains pdfvSDKFull.exe - you need to extract it using a ZIP compress/uncompress utility, or use the ZIP extraction features which are included in more recent versions of Windows.
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: OpenDocument without ClearScreen to avoid flickering

Post by John - Tracker Supp »

Thanks Up....

;)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com