prince-pdf-open-action command
How do I write a command for the prince-pdf-open-action?
More specific I would like to set the page to fit the screen when the pdf is opened.
Thanks in advance!
Martin
You can try this:
@prince-pdf {
prince-pdf-open-action: command(FullScreen)
}
Adobe Acrobat supports other named commands, similar to what is available from the menu.
Good to know. Are these documented somewhere?
Jim Albright
Wycliffe Bible Translators
I'm not sure where to find a canonical list, as they are Acrobat-specific. Googling for "acrobat named actions" brings up this list:
A4NamedActions.pdf at Planet PDF.
Thanks!
The 'FullScreen' was not exactly what I needed, by the list helped me find the 'FitPage' command which did the job
Hi
I would like to have two open-actions: FitPage and SinglePage. How do I do that?
Doing the following will execute the last command only:
@prince-pdf {
prince-pdf-open-action: command(FitPage)
prince-pdf-open-action: command(SinglePage)
}
You can only specify a single open action, but you can specify SInglePage using a different property:
@prince-pdf {
prince-pdf-page-layout: single-page
}
Hi Mike
The Command "SinglePage" and "prince-pdf-page-layout: single-page" does not do the same thing.
Command "SinglePage" snaps the vertical scroll to always start at page. So when you press UP/DOWN it changes page instead of scrolling.The command corresponds to the Adobe reader toggle button "Fit one page to window".
Layout single-page just sets the default page layout.
Why can I only specify one command, when adobe reader takes N commands?
So if you combine single-page and use FitPage for the open action you don't get the desired behaviour?
Currently Prince does not support chained actions, but we could add this in a future release.
No, combining "prince-pdf-page-layout: single-page" and FitPage for the open action does notget the desired behaviour. This is because "prince-pdf-page-layout: single-page" is not the same as the command "SinglePage".
Any workaround? Any ETA on adding this in a future release?
I'll add it to the roadmap. Perhaps in the meantime you could use prince-pdf-script and include some Acrobat-specific JavaScript to trigger the necessary commands?