Problem with moving to a page

  • Hello,

    I am evaluating the demo version of the PDF viewer. I am using Delphi version 7. I am having a problem moving to a page after loading the file in the viewer. The code does this:

    WPPDFViewerStart('noname', 'nokey', 0);
    WPViewPDFDLLNAME := 'wPDFViewDemo01.dll';
    WPViewPDF1.LoadFromFile( FileName );
    if WPViewPDF1.CommandEx( 22, 10 ) < 0 then // COMPDF_GotoPage
    ShowMessage( ‘Failed to move to page’ );

    The call to CommandEx is returning –1.

    I tried:
    WPViewPDF1.Command( 23 ) // COMPDF_GotoNext
    WPViewPDF1.Command( 20 ) // COMPDF_GotoFirst
    WPViewPDF1.Command( 24 ) // COMPDF_GotoLast
    WPViewPDF1.Command( 21 ) // COMPDF_GotoPrev

    they all return –1.

    Calling
    WPViewPDF1.Command( 201 ); // COMPDF_GetPageCount


    Returns to correct number of pages. The document loads, and everything looks fine I can call:

    WPViewPDF1.PrintPages( Self.PageNum, 10 );

    And page 10 prints great.

    A call to:

    WPViewPDF1.GetPageText( Self.PageNum )

    Returns the text on page 10.

    I just cannot move to the page I want to view.

    The reason my company is considering purchasing this product is to be able to show the user a specific page in very large documents (over 20,000 pages). I am testing a 36 page document. Is there something I need to do before moving to a page?