You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/faq.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1952,12 +1952,12 @@ If it is *False* or if you want to be on the safe side, pick one of the followin
1952
1952
1953
1953
* **Prepend** the missing stacking command by executing *fitz.TOOLS._insert_contents(page, b"q\n", False)*.
1954
1954
* **Append** an unstacking command by executing *fitz.TOOLS._insert_contents(page, b"\nQ", True)*.
1955
-
* Alternatively, just use :meth:`Page._wrapContents`, which executes the previous two functions.
1955
+
* Alternatively, just use :meth:`Page.wrap_contents`, which executes the previous two functions.
1956
1956
1957
1957
.. note:: If small incremental update deltas are a concern, this approach is the most effective. Other contents objects are not touched. The utility method creates two new PDF :data:`stream` objects and inserts them before, resp. after the page's other :data:`contents`. We therefore recommend the following snippet to get this situation under control:
1958
1958
1959
1959
>>> ifnot page._isWrapped:
1960
-
page._wrapContents()
1960
+
page.wrap_contents()
1961
1961
>>> # start inserting text, images or annotations here
Copy file name to clipboardExpand all lines: docs/functions.rst
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Yet others are handy, general-purpose utilities.
20
20
:meth:`ConversionTrailer` return trailer string for *getText* methods
21
21
:meth:`Document.del_xml_metadata` PDF only: remove XML metadata
22
22
:meth:`Document.set_xml_metadata` PDF only: remove XML metadata
23
-
:meth:`Document.delete_object` PDF only: delete an object
23
+
:meth:`Document._deleteObject` PDF only: delete an object
24
24
:meth:`Document.get_new_xref` PDF only: create and return a new :data:`xref` entry
25
25
:meth:`Document._getOLRootNumber` PDF only: return / create :data:`xref` of */Outline*
26
26
:meth:`Document.pdf_catalog` PDF only: return the :data:`xref` of the catalog
@@ -346,7 +346,7 @@ Yet others are handy, general-purpose utilities.
346
346
347
347
-----
348
348
349
-
.. method:: Document.delete_object(xref)
349
+
.. method:: Document._deleteObject(xref)
350
350
351
351
PDF only: Delete an object given by its cross reference number.
352
352
@@ -521,7 +521,7 @@ Yet others are handy, general-purpose utilities.
521
521
522
522
PDF only: Clean and concatenate all :data:`contents` objects associated with this page. "Cleaning" includes syntactical corrections, standardizations and "pretty printing" of the contents stream. Discrepancies between :data:`contents` and :data:`resources` objects will also be corrected if sanitize is true. See :meth:`Page.getContents` for more details.
523
523
524
-
Changed in version 1.16.0 Annotations are no longer implicitely cleaned by this method. Use :meth:`Annot._cleanContents` separately.
524
+
Changed in version 1.16.0 Annotations are no longer implicitely cleaned by this method. Use :meth:`Annot.cleanContents` separately.
525
525
526
526
:arg bool sanitize: *(new in v1.17.6)* if true, synchronization between resources and their actual use in the contents object is snychronized. For example, if a font is not actually used for any text of the page, then it will be deleted from the ``/Resources/Font`` object.
0 commit comments