Skip to content

Commit 5bc31ae

Browse files
committed
Fix several references to deleted methods and self-references in the documentation
1 parent c33bbc8 commit 5bc31ae

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

docs/document.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,27 +1307,27 @@ For details on **embedded files** refer to Appendix 3.
13071307

13081308
*(New in version 1.16.8)*
13091309

1310-
PDF only: Return the definition of a PDF object. For details please refer to :meth:`Document.xrefObject`.
1310+
PDF only: Return the definition of a PDF object.
13111311

13121312
.. method:: PDFCatalog()
13131313

13141314
*(New in version 1.16.8)*
13151315

1316-
PDF only: Return the :data:`xref` of the PDF catalog (or root) object. For details please refer to :meth:`Document._getPDFroot`.
1316+
PDF only: Return the :data:`xref` of the PDF catalog (or root) object.
13171317

13181318

13191319
.. method:: PDFTrailer(compressed=False)
13201320

13211321
*(New in version 1.16.8)*
13221322

1323-
PDF only: Return the trailer of the PDF (UTF-8), which is usually located at the PDF file's end. For details please refer to :meth:`Document._getTrailerString`.
1323+
PDF only: Return the trailer of the PDF (UTF-8), which is usually located at the PDF file's end.
13241324

13251325

13261326
.. method:: metadataXML()
13271327

13281328
*(New in version 1.16.8)*
13291329

1330-
PDF only: Return the :data:`xref` of the document's XML metadata. For details please refer to :meth:`Document._getXmlMetadataXref`.
1330+
PDF only: Return the :data:`xref` of the document's XML metadata.
13311331

13321332
.. method:: xrefStream(xref)
13331333

@@ -1517,7 +1517,7 @@ Clear metadata information. If you do this out of privacy / data protection conc
15171517
{'producer': 'none', 'format': 'PDF 1.4', 'encryption': None, 'author': 'none',
15181518
'modDate': 'none', 'keywords': 'none', 'title': 'none', 'creationDate': 'none',
15191519
'creator': 'none', 'subject': 'none'}
1520-
>>> doc._delXmlMetadata() # clear any XML metadata
1520+
>>> doc.del_xml_metadata() # clear any XML metadata
15211521
>>> doc.save("anonymous.pdf", garbage = 4) # save anonymized doc
15221522

15231523
:meth:`setToC` Demonstration

docs/faq.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,11 +2125,11 @@ ID array File identifier consisting of two byte strings.
21252125
XRefStm int Offset of a cross-reference stream. See :ref:`AdobeManual` p. 109.
21262126
======= =========== ===================================================================================
21272127

2128-
Access this information via PyMuPDF with :meth:`Document._getTrailerString`.
2128+
Access this information via PyMuPDF with :meth:`Document.PDFTrailer`.
21292129

21302130
>>> import fitz
21312131
>>> doc=fitz.open("PyMuPDF.pdf")
2132-
>>> trailer=doc._getTrailerString()
2132+
>>> trailer=doc.PDFTrailer()
21332133
>>> print(trailer)
21342134
<</Size 5535/Info 5275 0 R/Root 5274 0 R/ID[(\340\273fE\225^l\226\232O|\003\201\325g\245)(}#1,\317\205\000\371\251wO6\352Oa\021)]>>
21352135
>>>
@@ -2162,4 +2162,4 @@ Using some XML package, the XML data can be interpreted and / or modified and th
21622162
>>> doc.updateStream(metaxref, xmlmetadata)
21632163
>>>
21642164
>>> # if these data are not wanted, delete them:
2165-
>>> doc._delXmlMetadata()
2165+
>>> doc.del_xml_metadata()

docs/functions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ Yet others are handy, general-purpose utilities.
410410

411411
.. method:: Document.xml_metadata_xref()
412412

413-
Return the XML-based metadata :data:`xref` of the PDF if present -- also refer to :meth:`Document._delXmlMetadata`. You can use it to retrieve the content via :meth:`Document.xrefStream` and then work with it using some XML software.
413+
Return the XML-based metadata :data:`xref` of the PDF if present -- also refer to :meth:`Document.del_xml_metadata`. You can use it to retrieve the content via :meth:`Document.xrefStream` and then work with it using some XML software.
414414

415415
:rtype: int
416416
:returns: :data:`xref` of PDF file level XML metadata -- or 0 if none exists.

0 commit comments

Comments
 (0)