0

I used the C# sample of PDFViewSimpleTest

When opening a pdf, it automatically jumps to the second page.

Foxit does it too (so i guess they also use pdfTron), Adobe starts from page 1

I haven't got a clue why. The pdf can be found here: http://docdro.id/EDsbCcH

The code is really simple:

public bool OpenPDF(String filename)
    {
        try 
        {
            PDFDoc oldDoc = _pdfview.GetDoc();
            _pdfdoc = new PDFDoc(filename);
            if (!_pdfdoc.InitSecurityHandler())
            {
                AuthorizeDlg dlg = new AuthorizeDlg();
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    if(!_pdfdoc.InitStdSecurityHandler(dlg.pass.Text))
                    {
                        MessageBox.Show("Incorrect password");
                        return false;
                    }
                }
                else
                {
                    return false;
                }
            }
            _pdfview.SetDoc(_pdfdoc);

            _pdfview.SetPagePresentationMode(PDFViewCtrl.PagePresentationMode.e_single_page);


            filePath = filename;
            if (oldDoc != null) 
            {
                oldDoc.Dispose();
            }
        }
        catch(PDFNetException ex)
        {
            MessageBox.Show(ex.Message);
            return false;
        }
        catch(Exception ex)
        {
            MessageBox.Show(ex.ToString());
            return false;
        }

        this.Text = filename;  // Set the title
        return true;
    }
DennisVA
  • 2,068
  • 1
  • 25
  • 35

2 Answers2

2

Technically you can achieve by an OpenAction inside the Catalog directory of the PDF, that a PDF opens at a page, which is not the first page. But that isn't the case in your PDF. The PDF itself seems to be very trivial, without anything special.

My Foxit Reader version 8.2.1 does open this PDF normally at the first page.

PatrickF
  • 594
  • 2
  • 11
1

Please try the latest version.

Official: https://www.pdftron.com/pdfnet/downloads.html

Nightly Stable/Production: http://www.pdftron.com/nightly/?p=stable/

Ryan
  • 2,473
  • 1
  • 11
  • 14