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
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2034,7 +2034,7 @@ How to Handle Object Streams
2034
2034
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2035
2035
Some object types contain additional data apart from their object definition. Examples are images, fonts, embedded files or commands describing the appearance of a page.
2036
2036
2037
-
Objects of these types are called "stream objects". PyMuPDF allows reading an object's stream via method :meth:`Document.xrefStream` with the object's :data:`xref` as an argument. And it is also possible to write back a modified version of a stream using :meth:`Document.updatefStream`.
2037
+
Objects of these types are called "stream objects". PyMuPDF allows reading an object's stream via method :meth:`Document.xrefStream` with the object's :data:`xref` as an argument. And it is also possible to write back a modified version of a stream using :meth:`Document.updateStream`.
2038
2038
2039
2039
Assume that the following snippet wants to read all streams of a PDF for whatever reason::
2040
2040
@@ -2044,9 +2044,9 @@ Assume that the following snippet wants to read all streams of a PDF for whateve
2044
2044
# do something with it (it is a bytes object or None)
2045
2045
# e.g. just write it back:
2046
2046
if stream:
2047
-
doc.updatefStream(xref, stream)
2047
+
doc.updateStream(xref, stream)
2048
2048
2049
-
:meth:`Document.xrefStream` automatically returns a stream decompressed as a bytes object -- and :meth:`Document.updatefStream` automatically compresses it (where beneficial).
2049
+
:meth:`Document.xrefStream` automatically returns a stream decompressed as a bytes object -- and :meth:`Document.updateStream` automatically compresses it (where beneficial).
2050
2050
2051
2051
----------------------------------
2052
2052
@@ -2159,7 +2159,7 @@ PyMuPDF has no way to **interpret or change** this information directly, because
2159
2159
Using some XML package, the XML data can be interpreted and / or modified and then stored back::
0 commit comments