Skip to content
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

DOC: Fix typos and add a paragraph to ViewerPreferences docs. #2199

Merged
merged 2 commits into from
Sep 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/user/viewer-preferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
It is possible to set viewer preferences of the PDF file.
These properties are described in Section 12.2 of the [PDF 1.7 specification](https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf).

Note that the `\ViewerPreferences` dictionary does not exist by default.
Note that the `/ViewerPreferences` dictionary does not exist by default.
If it's not already present, it must be created by calling the `create_viewer_preferences` method
of the `PdfWriter` object.

Expand Down Expand Up @@ -41,7 +41,7 @@ writer.viewer_preferences.non_fullscreen_pagemode = "/UseThumbs"
writer.viewer_preferences.non_fullscreen_pagemode = "/UseOC"

# /Direction
writer.viewer_preferences.direction = "/L2R" # default,
writer.viewer_preferences.direction = "/L2R" # default
writer.viewer_preferences.direction = "/R2L"

# /ViewArea
Expand Down Expand Up @@ -77,3 +77,7 @@ for i in range(40):
with open("output.pdf", "wb") as output_stream:
writer.write(output_stream)
```

(The names beginning with a slash character are part of the PDF file format. They are
included here to aid to anyone searching pypdf documentation
for these names from the PDF specification.)