-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support right-to-left ViewerPreferences #2105
Comments
I've made a quick proof-of-concept that implements this. You can see it here: main...marcstober:pypdf:r2l I haven't submitted a pull request because I think a good solution would more generally provide a way to set things on the ViewerPreferences object, not clutter up the API with a method that sets this specific item and value. If you want to give me some idea of what you'd be willing to include as a new feature, I can try to turn this into a more complete pull request. |
closes py-pdf#2105 still doc and test to be fixed/added
@marcstober The PR by pubpub-zz was just merged and will be part of |
@marcstober One part that we're still lacking is a nice documentation for that new feature. Could you maybe write it? You would need to add a Additionally, you would need to add the file to the index: https://github.com/py-pdf/pypdf/blob/main/docs/index.rst |
Thanks for working on this @pubpub-zz. I'm wondering about the |
see #2167 (comment) about |
Explanation
I'd like to be able to create a right-to-left (RTL or in PDF, R2L) document. More specifically, I'd like to be able to set a document to open in a two page layout (which I already can do with pypdf) with the lower-numbered page on the right.
From what I can tell, this would involve adding a
/ViewerPreferences
dictionary to the "catalog" with a/Direction /R2L
entry.In the Acrobat UI, this is shown as setting the "Binding" to "Right Edge" (in Properties -> Advanced).
Code Example
How would your feature be used? (Remove this if it is not applicable.)
The text was updated successfully, but these errors were encountered: