WPCubed Product Support

Problems with ViewPDF1.Page and ViewPDF1.PageCount

support

Hello,

please use the latest version - there was a bug.

"Page" is the page which is currently visible first in the window.

Although the API is using mostly(*) 0 based page numbers, Page uses "1" for the first page. This was necessary for compatibility to Version 2.

(*)WPViewPDF 3 also uses 1 based page numbers for the page ranges (PrintPages) and also when specifieg a page range as string, i.e. "1,5,7-12". Ths is useful since You can pass the user input directly to the engine.

Julian

#2 ♥ 0
4.4k Views 4 links 2 users read 2 min

Hi,

I'm using WpViewPDF 3 registered edition and it works fine, except the following little problem.
I do not understand how ViewPDF1.Page and ViewPDF1.PageCount work. I tried to copy the code from the shipped Delphi PDFView demo to display the current page in a TEdit component. When the PDF is loaded with LoadFromStream, WpViewPDF displays the first page and returns 0 for the current page number. If I scroll down the page a bit (without displaying the second page), it immediately says "1". Same problem in the demo.

See these screenshots:

The PDF is loaded
🖼 img1.imagilive.com

Just scroll a bit with the mouse wheel:
🖼 img1.imagilive.com
[/img]

See at the bottom: the status bar jumps from "1" to "2", while the page is still the first in the view.

Could you please tell me what is wrong? Thank you.

#1 ♥ 0