Skip to content

Commit c33bbc8

Browse files
committed
Fix wrong method name updatefStream -> updateStream in faq.rst
1 parent 407805a commit c33bbc8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/faq.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,7 +2034,7 @@ How to Handle Object Streams
20342034
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20352035
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.
20362036

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`.
20382038

20392039
Assume that the following snippet wants to read all streams of a PDF for whatever reason::
20402040

@@ -2044,9 +2044,9 @@ Assume that the following snippet wants to read all streams of a PDF for whateve
20442044
# do something with it (it is a bytes object or None)
20452045
# e.g. just write it back:
20462046
if stream:
2047-
doc.updatefStream(xref, stream)
2047+
doc.updateStream(xref, stream)
20482048

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).
20502050

20512051
----------------------------------
20522052

@@ -2159,7 +2159,7 @@ PyMuPDF has no way to **interpret or change** this information directly, because
21592159
Using some XML package, the XML data can be interpreted and / or modified and then stored back::
21602160

21612161
>>> # write back modified XML metadata:
2162-
>>> doc.updatefStream(metaxref, xmlmetadata)
2162+
>>> doc.updateStream(metaxref, xmlmetadata)
21632163
>>>
21642164
>>> # if these data are not wanted, delete them:
21652165
>>> doc._delXmlMetadata()

0 commit comments

Comments
 (0)