Skip to content

Commit

Permalink
DOC: Tiny changes (#2844)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-t-1 authored Sep 17, 2024
1 parent 637bc44 commit c00ec60
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
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

0 comments on commit c00ec60

Please sign in to comment.