Q: I have an existing PDF that when I open displays page 2 as the start page, pressing page up in adobe reader jumps to page 1.
Can I read which page is the “start page” from a PDF with PDFNET?
Is it possible to change the “start page” of this PDF to page 1 with PDFNET?
The start page is the first page of the document unless the document contains an open action which specifies an action to run on startup such as going to another page.
The start page can be determined using the following code snippet:
Action action = doc.GetOpenAction();
if(action.IsValid() && action.GetType()==Action::e_GoTo)
Destination dest= action.GetDest();
To change the start page back to page 1 all that needs to be done is remove the open action. This can be done using the following code snippet: