Problems with ViewPDF1.Page and ViewPDF1.PageCount

  • 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
    [Blockierte Grafik: http://img1.imagilive.com/0711/thumbs_Snap2.png]

    Just scroll a bit with the mouse wheel:
    [Blockierte Grafik: http://img1.imagilive.com/0711/thumbs_Snap3.png]
    [/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.

    • Offizieller Beitrag

    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