Skip to content

Created Documentation for the PaperSize class#1447

Merged
MartinThoma merged 6 commits intopy-pdf:mainfrom
IA-State-Classes:main
Nov 25, 2022
Merged

Created Documentation for the PaperSize class#1447
MartinThoma merged 6 commits intopy-pdf:mainfrom
IA-State-Classes:main

Conversation

@SandroPanchame
Copy link
Copy Markdown
Contributor

edited the index.rst file in the doc folder and created the PaperSize.rst file in the module folder.

Tested it with sphinx to see results. (Worked)

Comment on lines +1 to +2
The PaperSize Class
------------------------
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The PaperSize Class
------------------------
The PaperSize Class
-------------------

I vaguely remember that there were warnings if the lines didn't match ... even if there are not, it looks nicer :-)

@MartinThoma MartinThoma merged commit b6bfc17 into py-pdf:main Nov 25, 2022
@MartinThoma
Copy link
Copy Markdown
Member

Thank you for the PR 🤗

@MartinThoma
Copy link
Copy Markdown
Member

@MartinThoma
Copy link
Copy Markdown
Member

@MagnumBarrage It might be helpful to add an example to that page how the class is used. Do you want to do that?

@MartinThoma
Copy link
Copy Markdown
Member

In case you want to be added as a contributor https://pypdf2.readthedocs.io/en/latest/meta/CONTRIBUTORS.html - just let me know what to write / link there :-)

MartinThoma added a commit that referenced this pull request Dec 10, 2022
New Features (ENH):
-  Add support to extract gray scale images (#1460)
-  Add 'threads' property to PdfWriter (#1458)
-  Add 'open_destination' property to PdfWriter (#1431)
-  Make PdfReader.get_object accept integer arguments (#1459)

Bug Fixes (BUG):
-  Scale PDF annotations (#1479)

Robustness (ROB):
-  Padding issue with AES encryption (#1469)
-  Accept empty object as null objects (#1477)

Documentation (DOC):
-  Add module documentation the PaperSize class (#1447)

Maintenance (MAINT):
-  Use 'page_number' instead of 'pagenum' (#1365)
-  Add List of pages to PageRangeSpec (#1456)

Testing (TST):
-  Cleanup temporary files (#1454)
-  Mark test_tounicode_is_identity as external (#1449)
-  Use Ubuntu 20.04 for running CI test suite (#1452)

[Full Changelog](2.11.2...2.12.0)
@xilopaint
Copy link
Copy Markdown
Contributor

@MagnumBarrage It might be helpful to add an example to that page how the class is used. Do you want to do that?

@MartinThoma Is the example added to the documentation?

@MartinThoma
Copy link
Copy Markdown
Member

Nobody created one so far

@SandroPanchame
Copy link
Copy Markdown
Contributor Author

I can add an example later, I've just been preoccupied lately.

@SandroPanchame
Copy link
Copy Markdown
Contributor Author

SandroPanchame commented Dec 26, 2022

@MagnumBarrage It might be helpful to add an example to that page how the class is used. Do you want to do that?

does it need to be on the same page as the documentation for PaperSize (under 'API Reference'), or would it need its own page (under 'User Guide')?

@MartinThoma
Copy link
Copy Markdown
Member

I would expand the docstring of add_blank_page: https://pypdf.readthedocs.io/en/latest/modules/PdfWriter.html#pypdf.PdfWriter.add_blank_page or expand the docstring of the PaperSize class: https://pypdf.readthedocs.io/en/latest/_modules/pypdf/papersizes.html#PaperSize

I would not add a new page under "user guide" as I have doubts that this is a big enough topic. Too many doc pages might lead to the users not finding the relevant ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants