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: Tiny changes #2844

Merged
merged 5 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/dev/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ The title of the PR will be used as the first line of that combined commit messa

The first comment within the commit will be used as the message body.

See [dev intro](intro.html#commit-messages) for more details.
See [developer intro](intro.html#commit-messages) for more details.
2 changes: 1 addition & 1 deletion pypdf/_page_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def number2lowercase_letter(number: int) -> str:

def get_label_from_nums(dictionary_object: DictionaryObject, index: int) -> str:
# [Nums] shall be an array of the form
# [ key 1 value 1 key 2 value 2 ... key n value n ]
# [ key_1 value_1 key_2 value_2 ... key_n value_n ]
# where each key_i is an integer and the corresponding
# value_i shall be the object associated with that key.
# The keys shall be sorted in numerical order,
Expand Down
21 changes: 10 additions & 11 deletions pypdf/_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3132,16 +3132,16 @@ def set_page_label(

Page indexes must be given starting from 0.
Labels must have a style, a prefix or both.
If to a range is not assigned any page label a decimal label starting from 1 is applied.
If a range is not assigned any page label a decimal label starting from 1 is applied.

Args:
page_index_from: page index of the beginning of the range starting from 0
page_index_to: page index of the beginning of the range starting from 0
style: The numbering style to be used for the numeric portion of each page label:

* ``/D`` Decimal arabic numerals
* ``/R`` Uppercase roman numerals
* ``/r`` Lowercase roman numerals
* ``/D`` Decimal Arabic numerals
* ``/R`` Uppercase Roman numerals
* ``/r`` Lowercase Roman numerals
* ``/A`` Uppercase letters (A to Z for the first 26 pages,
AA to ZZ for the next 26, and so on)
* ``/a`` Lowercase letters (a to z for the first 26 pages,
Expand Down Expand Up @@ -3180,18 +3180,17 @@ def _set_page_label(
"""
Set a page label to a range of pages.

Page indexes must be given
starting from 0. Labels must have a style, a prefix or both. If to a
range is not assigned any page label a decimal label starting from 1 is
applied.
Page indexes must be given starting from 0.
Labels must have a style, a prefix or both.
If a range is not assigned any page label a decimal label starting from 1 is applied.

Args:
page_index_from: page index of the beginning of the range starting from 0
page_index_to: page index of the beginning of the range starting from 0
style: The numbering style to be used for the numeric portion of each page label:
/D Decimal arabic numerals
/R Uppercase roman numerals
/r Lowercase roman numerals
/D Decimal Arabic numerals
/R Uppercase Roman numerals
/r Lowercase Roman numerals
/A Uppercase letters (A to Z for the first 26 pages,
AA to ZZ for the next 26, and so on)
/a Lowercase letters (a to z for the first 26 pages,
Expand Down
Loading