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 #2723

Merged
merged 3 commits into from
Jun 25, 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
4 changes: 2 additions & 2 deletions docs/user/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ with open("meta-pdf.pdf", "wb") as f:
## Updating metadata

```python
from pypdf import PdfReader, PdfWriter
from pypdf import PdfWriter

writer = PdfWriter(clone_from="example.pdf")

# Change some values.
# Change some values
writer.add_metadata(
{
"/Author": "Martin",
Expand Down
1 change: 1 addition & 0 deletions pypdf/_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ def add_attachment(self, filename: str, data: Union[str, bytes]) -> None:
# /F (hello.txt)
# /EF << /F 8 0 R >>
# >>
# endobj

ef_entry = DictionaryObject()
ef_entry.update({NameObject("/F"): self._add_object(file_entry)})
Expand Down
10 changes: 5 additions & 5 deletions pypdf/xmp.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Anything related to XMP metadata.
Anything related to Extensible Metadata Platform (XMP) metadata.

See https://en.wikipedia.org/wiki/Extensible_Metadata_Platform
https://en.wikipedia.org/wiki/Extensible_Metadata_Platform
"""

import datetime
Expand Down Expand Up @@ -202,8 +202,8 @@ def get(self: "XmpInformation") -> Optional[Any]:

class XmpInformation(PdfObject):
"""
An object that represents Adobe XMP metadata.
Usually accessed by :py:attr:`xmp_metadata()<pypdf.PdfReader.xmp_metadata>`
An object that represents Extensible Metadata Platform (XMP) metadata.
Usually accessed by :py:attr:`xmp_metadata()<pypdf.PdfReader.xmp_metadata>`.

Raises:
PdfReadError: if XML is invalid
Expand Down Expand Up @@ -319,7 +319,7 @@ def _get_text(self, element: XmlElement) -> str:
"""An unformatted text string representing document keywords."""

pdf_pdfversion = property(_getter_single(PDF_NAMESPACE, "PDFVersion"))
"""The PDF file version, for example 1.0, 1.3."""
"""The PDF file version, for example 1.0 or 1.3."""

pdf_producer = property(_getter_single(PDF_NAMESPACE, "Producer"))
"""The name of the tool that created the PDF document."""
Expand Down
Loading