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

Created Documentation for the PaperSize class #1447

Merged
merged 6 commits into from Nov 25, 2022

Conversation

SandroPanchame
Copy link
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
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
Member

Thank you for the PR 🤗

@MartinThoma
Copy link
Member

@MartinThoma
Copy link
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
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
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
Member

Nobody created one so far

@SandroPanchame
Copy link
Contributor Author

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

@SandroPanchame
Copy link
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
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.

None yet

3 participants