Skip to content

Commit

Permalink
Fixed some sphinx warnings/errors in .rst files.
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-smith-artifex-com committed Jun 27, 2022
1 parent f1cdfdc commit 3fe4ede
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 10 deletions.
1 change: 0 additions & 1 deletion changes.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Change Log
===========

------

**Changes in Version 1.20.0**

Expand Down
2 changes: 1 addition & 1 deletion docs/annot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ There is a parent-child relationship between an annotation and its page. If the

:arg str name: the new name.

.. caution:: If you set the name of a 'Stamp' annotation, then this will **not change** the rectangle, nor will the text be layouted in any way. If you choose a standard text from :ref:`StampIcons` (the **exact** name piece after "STAMP_"), you should receive the original layout. An **arbitrary text** will not be changed to upper case, but be written in font "Times-Bold" as is, horizontally centered in **one line** and be shortened to fit. To get your text fully displayed, its length using fontsize 20 must not exceed 190 pixels. So please make sure that the following inequality is true: ``fitz.get_text_length(text, fontname="tibo", fontsize=20) <= 190``.
.. caution:: If you set the name of a 'Stamp' annotation, then this will **not change** the rectangle, nor will the text be layouted in any way. If you choose a standard text from :ref:`StampIcons` (the **exact** name piece after `"STAMP_"`), you should receive the original layout. An **arbitrary text** will not be changed to upper case, but be written in font "Times-Bold" as is, horizontally centered in **one line** and be shortened to fit. To get your text fully displayed, its length using fontsize 20 must not exceed 190 pixels. So please make sure that the following inequality is true: ``fitz.get_text_length(text, fontname="tibo", fontsize=20) <= 190``.

.. method:: set_rect(rect)

Expand Down
1 change: 0 additions & 1 deletion docs/changes.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Change Log
===========

------

**Changes in Version 1.20.0**

Expand Down
6 changes: 2 additions & 4 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ Collection of Recipes

A collection of recipes in "How-To" format for using PyMuPDF. We aim to extend this section over time. Where appropriate we will refer to the corresponding `Wiki <https://github.com/pymupdf/PyMuPDF/wiki>`_ pages, but some duplication may still occur.

----------


Images
-------

----------

How to Make Images from Document Pages
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -591,7 +590,6 @@ Basic code pattern for :meth:`Page.show_pdf_page`. Source and target PDF must be
Text
-----

----------

How to Extract all Document Text
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -1259,7 +1257,7 @@ The *path* dictionary has been designed such that it can easily be used by the :
'width': 1.0}]
>>>

.. note:: You need (at least) 4 Bézier curves (of 3rd order) to draw a circle with acceptable precision. See this `Wikipedia article<https://en.wikipedia.org/wiki/B%C3%A9zier_curve>`_ for some background.
.. note:: You need (at least) 4 Bézier curves (of 3rd order) to draw a circle with acceptable precision. See this `Wikipedia article <https://en.wikipedia.org/wiki/B%C3%A9zier_curve>`_ for some background.


The following is a code snippet which extracts the drawings of a page and re-draws them on a new page::
Expand Down
2 changes: 1 addition & 1 deletion docs/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ Yet others are handy, general-purpose utilities.

The item sequence represents the **sequence in which these commands are executed** to build the page's appearance. Therefore, if an item's bbox intersects or contains that of a previous item, then the previous item may be (partially) covered / hidden.

So this list is useful to detect such situations. An item's index in this list equals the value of ``"seqno"` keys you will find in the dictionaries returned by :meth:`Page.get_drawings` and :meth:`Page.get_texttrace`.
So this list is useful to detect such situations. An item's index in this list equals the value of ``"seqno"`` keys you will find in the dictionaries returned by :meth:`Page.get_drawings` and :meth:`Page.get_texttrace`.

-----

Expand Down
2 changes: 2 additions & 0 deletions docs/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ Introduction

..
Don't delete the bar symbol - it forces a line break beneath the image - which is required.
|
**PyMuPDF** is a Python binding for `MuPDF <http://www.mupdf.com/>`_ -- a lightweight PDF, XPS, and E-book viewer, renderer, and toolkit, which is maintained and developed by Artifex Software, Inc

MuPDF can access files in PDF, XPS, OpenXPS, CBZ, EPUB and FB2 (e-books) formats, and it is known for its top performance and high rendering quality.
Expand Down
4 changes: 2 additions & 2 deletions docs/page.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1578,7 +1578,7 @@ In a nutshell, this is what you can do with PyMuPDF:

The page's ``/ArtBox``, ``/BleedBox``, ``/TrimBox``, respectively. If not provided, defaulting to :attr:`Page.cropbox`.

:type: :ref:`Rect:
:type: :ref:`Rect`

.. attribute:: mediabox_size

Expand Down Expand Up @@ -1739,4 +1739,4 @@ The page number "pno" is a 0-based integer ``-∞ < pno < page_count``.
.. [#f7] In PDF, an area enclosed by some lines or curves can have a property called "orientation". This is significant for switching on or off the fill color of that area when there exist multiple area overlaps - see discussion in method :meth:`Shape.finish` using the "non-zero winding number" rule. While orientation of curves, quads, triangles and other shapes enclosed by lines always was detectable, this has been impossible for "re" (rectangle) items in the past. Adding the orientation parameter now delivers the missing information.
.. [#f8] Hyphenation detection simply means that if the last character of a line is "-", it will be assumed to be a continuation character. That character will not be found by text searching with its default flag setting. Please take note, that a MuPDF *line* may not always be what you expect: words separated by overly large gaps (e.g. caused by text justification) may constitute seperate MuPDF lines. If then any of these words ends with a hyphen, it will only be found by text searching if hyphenation is switched off.
.. [#f8] Hyphenation detection simply means that if the last character of a line is "-", it will be assumed to be a continuation character. That character will not be found by text searching with its default flag setting. Please take note, that a MuPDF *line* may not always be what you expect: words separated by overly large gaps (e.g. caused by text justification) may constitute seperate MuPDF lines. If then any of these words ends with a hyphen, it will only be found by text searching if hyphenation is switched off.

0 comments on commit 3fe4ede

Please sign in to comment.