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: Add details how to write metadata #1861

Merged
merged 2 commits into from
Jun 18, 2023
Merged

Conversation

Ineffable22
Copy link
Contributor

This commit introduces significant enhancements to the existing code for adding metadata to a PDF file. The changes aim to improve the readability, completeness, and professionalism of the metadata properties. The following updates have been made:

  • Added new metadata properties, including Title, Subject, Keywords, CreationDate, ModDate, Creator, and CustomField, providing more comprehensive information about the PDF document.
  • Refactored the code to utilize the datetime module to obtain the current date and time in the desired format, ensuring accurate and standardized timestamping.
  • Introduced an optional feature to include UTC time, enabling precise timestamping in different time zones if required.
  • Preserved the ability to retain old metadata by including the metadata variable, allowing seamless integration with existing PDF files.
  • Ensured compatibility with the latest version of the pypdf library, guaranteeing optimal performance and support for future updates.

These modifications significantly enhance the functionality and professionalism of the code for manipulating PDF files. Thorough testing has been conducted to ensure the accuracy and reliability of the changes.

This commit introduces significant enhancements to the existing code for adding metadata to a PDF file. The changes aim to improve the readability, completeness, and professionalism of the metadata properties. The following updates have been made:
- Added new metadata properties, including Title, Subject, Keywords, CreationDate, ModDate, Creator, and CustomField, providing more comprehensive information about the PDF document.
- Refactored the code to utilize the datetime module to obtain the current date and time in the desired format, ensuring accurate and standardized timestamping.
- Introduced an optional feature to include UTC time, enabling precise timestamping in different time zones if required.
- Preserved the ability to retain old metadata by including the metadata variable, allowing seamless integration with existing PDF files.
- Ensured compatibility with the latest version of the pypdf library, guaranteeing optimal performance and support for future updates.

These modifications significantly enhance the functionality and professionalism of the code for manipulating PDF files. Thorough testing has been conducted to ensure the accuracy and reliability of the changes.
@MartinThoma MartinThoma changed the title Add enhanced metadata functionality to PDF manipulation ENH: Add enhanced metadata functionality to PDF manipulation Jun 3, 2023
@MartinThoma MartinThoma added the is-feature A feature request label Jun 3, 2023
@MartinThoma MartinThoma changed the title ENH: Add enhanced metadata functionality to PDF manipulation DOC: Add details how to write metadata Jun 11, 2023
docs/user/metadata.md Outdated Show resolved Hide resolved
@MartinThoma MartinThoma added nf-documentation Non-functional change: Documentation and removed is-feature A feature request labels Jun 11, 2023
I have tried and no change. So your option is better as it is more readable.

Co-authored-by: Martin Thoma <[email protected]>
@MartinThoma MartinThoma merged commit 9a2c517 into py-pdf:main Jun 18, 2023
@MartinThoma
Copy link
Member

Thank you for your contribution 🙏

If you want, I can add you to https://pypdf.readthedocs.io/en/latest/meta/CONTRIBUTORS.html :-)

@Ineffable22
Copy link
Contributor Author

That's fantastic! I would be honored to be added to the list of contributors on https://pypdf.readthedocs.io/en/latest/meta/CONTRIBUTORS.html. Thank you for the opportunity and recognition. It means a lot to me.

@MartinThoma
Copy link
Member

I've just added you - it might take ~10 minutes until the docs are rebuilt :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nf-documentation Non-functional change: Documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants