[Share] Set reader view to "Zoom to Page Height" #378
thalient-ai
started this conversation in
Action Scripts
Replies: 2 comments 3 replies
-
In addition to the "Open File" trigger, you can manually execute the script via the Reader Menu setting |
Beta Was this translation helpful? Give feedback.
2 replies
-
hello, thanks for that! Any idea how to set odd/even spreads too? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
At this time, Zotero does not have the option to change the default view for PDF reader windows and tabs. The default view is "Zoom by Page Width". If you want to change the view, you manually set it for each PDF.
This script automatically changes the view of the PDF reader to "Zoom by Page Height" instead of "Zoom by Page Width". You can adjust the script to use other views supported by PDF.js including "page-width", "page-fit", and "auto".
The script works on both PDF Reader Tabs and Windows. You can configure Zotero to open PDFs in windows instead of tabs in the settings.
Set the event to "Open File" to execute the script automatically when a PDF is opened.
Event
Open File
Operation
Script
Data
Anything else
Modifying tabs is straightforward. Modifying windows is more complicated. A delay of 750ms was added to support the "Open File" trigger and ensure it overrides the automatic setting of the view. You can adjust the delay if needed, but know that some files take longer to initialize than others delaying the automatic view adjustment.
Beta Was this translation helpful? Give feedback.
All reactions