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
Create a pixmap from the page. This is probably the most often used method to create a pixmap.
842
+
Create a pixmap from the page. This is probably the most often used method to create a :ref:`Pixmap`.
843
843
844
844
:arg matrix_like matrix: default is :ref:`Identity`.
845
845
:arg colorspace: Defines the required colorspace, one of "GRAY", "RGB" or "CMYK" (case insensitive). Or specify a :ref:`Colorspace`, ie. one of the predefined ones: :data:`csGRAY`, :data:`csRGB` or :data:`csCMYK`.
@@ -859,10 +859,10 @@ In a nutshell, this is what you can do with PyMuPDF:
859
859
860
860
.. image:: images/img-alpha-0.png
861
861
862
-
:arg bool annots: *(new in vrsion 1.16.0)* whether to also render any annotations on the page. You can create pixmaps for annotations separately.
862
+
:arg bool annots: *(new in vrsion 1.16.0)* whether to also render annotations or to suppress them. You can create pixmaps for annotations separately.
863
863
864
864
:rtype::ref:`Pixmap`
865
-
:returns: Pixmap of the page.
865
+
:returns: Pixmap of the page. For fine-controlling the generated image, the by far most important parameter is **matrix**. E.g. you can increase or decrease the image resolution by using **Matrix(xzoom, yzoom)**. If zoom > 1, you will get a higher resolution: zoom=2 will double the number of pixels in that direction and thus generate a 2 times larger image. Non-positive values will flip horizontally, resp. vertically. Similarly, matrices also let you rotate or shear, and you can combine effects via e.g. matrix multiplication. See the :ref:`Matrix` section to learn more.
866
866
867
867
.. method:: annot_names()
868
868
@@ -880,7 +880,7 @@ In a nutshell, this is what you can do with PyMuPDF:
880
880
PDF only: return a list of the :data`xref` numbers of annotations, widgets and links -- technically of all entries found in the page's */Annots* array.
881
881
882
882
:rtype: list
883
-
:returns: a list of items *(xref, type)* where type is the annotation type.Obviously, the type can be used to tell apart links, fields and annotations.
883
+
:returns: a list of items *(xref, type)* where type is the annotation type. Use the type to tell apart links, fields and annotations, see :ref:`AnnotationTypes`.
Copy file name to clipboardExpand all lines: docs/vars.rst
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -265,10 +265,12 @@ See chapter 8.4.5, pp. 615 of the :ref:`AdobeManual` for details.
265
265
266
266
Annotation Types
267
267
~~~~~~~~~~~~~~~~~
268
+
These identifiers also cover **links** and **widgets**: the PDF specification technically handles them all in the same way, whereas **MuPDF** (and PyMuPDF) treats them as three basically different types of objects.
269
+
268
270
::
269
271
270
272
PDF_ANNOT_TEXT 0
271
-
PDF_ANNOT_LINK 1
273
+
PDF_ANNOT_LINK 1 # <=== Link object in PyMuPDF
272
274
PDF_ANNOT_FREE_TEXT 2
273
275
PDF_ANNOT_LINE 3
274
276
PDF_ANNOT_SQUARE 4
@@ -287,7 +289,7 @@ Annotation Types
287
289
PDF_ANNOT_FILE_ATTACHMENT 17
288
290
PDF_ANNOT_SOUND 18
289
291
PDF_ANNOT_MOVIE 19
290
-
PDF_ANNOT_WIDGET 20
292
+
PDF_ANNOT_WIDGET 20 # <=== Widget object in PyMuPDF
0 commit comments