Mon Mar 19, 2018 1:37 pm
Dear Nina,
thanks for the code. It uses document's AfterOpenAction, to execute one singular action when the document is opened. The action is hardcoded to the pdf when it is rendered by the code. That's entirely different than my need.
If you can please look at the page I linked in the previous post as an example. It describes Named destinations inside a pdf, which are standard pdf document feature. You can create named destination for example for each chapter in the pdf, let's say Chapter1, Chapter2 and Chapter3. Then when someone opens the pdf as usual, nothing extraordinary happens. But, when the pdf is opened with the special string argument (via url od command line), the pdf viewer scrolls the document to the specified named destination, e.g. Chapter2. This is needed, when you're opening the pdf from another software/web page and you need to automatically scroll to the related section.
Maybe in SpirePDF this is not called Named destinations, but I didn't find how to create corresponding functionality. I tried the PdfDestination for that purpose, but I didn't find a way to name the destination (by a text or number) so it can be later specified in the opening argument. I hope it can be done somehow with Spire?
Best regards
Robert