Skip to content

Commit 5fefa53

Browse files
committed
Fix spelling errors or typos
1 parent 812b8ea commit 5fefa53

13 files changed

+57
-57
lines changed

changes.txt

Lines changed: 25 additions & 25 deletions
Large diffs are not rendered by default.

docs/_static/custom.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ button.cta a {
172172
:target>h1:first-of-type, span:target~h1:first-of-type {
173173
background-color: #007aff !important;
174174
color: #fff !important;
175-
padding-top: 40px; /* accomodates header search blocking target */
175+
padding-top: 40px; /* accommodates header search blocking target */
176176
margin-top: -40px;
177177
}
178178

@@ -182,7 +182,7 @@ button.cta a {
182182
span:target~h2:first-of-type, span:target~h3:first-of-type,
183183
span:target~h4:first-of-type, span:target~h5:first-of-type, span:target~h6:first-of-type {
184184
background-color: transparent !important;
185-
padding-top: 40px; /* accomodates header search blocking target */
185+
padding-top: 40px; /* accommodates header search blocking target */
186186
margin-top: -40px;
187187
text-decoration: underline;
188188
}

docs/annot.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ There is a parent-child relationship between an annotation and its page. If the
1515
================================== ==============================================================
1616
**Attribute** **Short Description**
1717
================================== ==============================================================
18-
:meth:`Annot.delete_responses` delete all responding annotions
18+
:meth:`Annot.delete_responses` delete all responding annotations
1919
:meth:`Annot.get_file` get attached file content
2020
:meth:`Annot.get_oc` get :data:`xref` of an :data:`OCG` / :data:`OCMD`
2121
:meth:`Annot.get_pixmap` image of the annotation as a pixmap

docs/footer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
document.getElementById("footerDisclaimer").innerHTML = getHeaderAndFooterTranslation("This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at <a href='https://www.artifex.com?utm_source=rtd-pymupdf&utm_medium=rtd&utm_content=footer-link'>artifex.com</a> or contact Artifex Software Inc., 39 Mesa Street, Suite 108A, San Francisco CA 94129, United States for further information.");
4545
4646
47-
// more tranlsation for admonition-title as the in-built translation isn't great, needs: 注釈 -> 注
47+
// more translation for admonition-title as the in-built translation isn't great, needs: 注釈 -> 注
4848
if (docLanguage == "ja") {
4949
const collection = document.getElementsByClassName("admonition-title");
5050
for (var i=0;i<collection.length;i++) {

docs/glossary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Glossary
88

99
.. data:: coordinate
1010

11-
This is an esential general mathematical / geometrical term for understanding this documentation. Please see this section for a more detailed discussion: :ref:`Coordinates`.
11+
This is an essential general mathematical / geometrical term for understanding this documentation. Please see this section for a more detailed discussion: :ref:`Coordinates`.
1212

1313
.. data:: matrix_like
1414

docs/page.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ In a nutshell, this is what you can do with PyMuPDF:
15461546

15471547
Specifying `extended=True` significantly alters the output. Most importantly, new dictionary types are present: "clip" and "group". All paths will now be organized in a hierarchic structure which is encoded by the new integer key "level", the hierarchy level. Each group or clip establishes a new hierarchy, which applies to all subsequent paths having a *larger* level value. (New in v1.22.0)
15481548

1549-
Any path with a smaller level value than its predecessor will end the scope of (at least) the preceeding hierarchy level. A "clip" path with the same level as the preceding clip will end the scope of that clip. Same is true for groups. This is best explained by an example::
1549+
Any path with a smaller level value than its predecessor will end the scope of (at least) the preceding hierarchy level. A "clip" path with the same level as the preceding clip will end the scope of that clip. Same is true for groups. This is best explained by an example::
15501550

15511551
+------+------+--------+------+--------+
15521552
| line | lvl0 | lvl1 | lvl2 | lvl3 |

docs/recipes-optional-content.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ If you want to put an **existing** image under the control of an OCG, you must f
4242

4343
To **remove** an OCG from an image, do `doc.set_oc(img_xref, 0)`.
4444

45-
One single OCG can be assigned to mutiple PDF objects to control their visibility.
45+
One single OCG can be assigned to multiple PDF objects to control their visibility.
4646

4747
How to Define Complex Optional Content Conditions
4848
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

docs/recipes-stories.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ Outputting HTML tables is supported as follows:
335335
* Column widths are computed automatically based on column content. They cannot be directly set.
336336
* Table **cells may contain images** which will be considered in the column width calculation magic.
337337
* Row heights are computed automatically based on row content - leading to multi-line rows where needed.
338-
* The potentially multiple lines of a table row will always be kept together on one page (respectively "where" rectangle) and not be splitted.
338+
* The potentially multiple lines of a table row will always be kept together on one page (respectively "where" rectangle) and not be split.
339339
* Table header rows are only **shown on the first page / "where" rectangle.**
340340
* The "style" attribute is ignored when given directly in HTML table elements. Styling for a table and its elements must happen separately, in CSS source or within the :htmlTag:`style` tag.
341341
* Styling for :htmlTag:`tr` elements is not supported and ignored. Therefore, a table-wide grid or alternating row background colors are not supported. One of the following example scripts however shows an easy way to deal with this limitation.

docs/recipes-text.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ As these four font files are located in the system's folder `C:/Windows/Fonts` t
612612

613613
# These statements define which font file to use for regular, bold,
614614
# italic and bold-italic text.
615-
# We assign an arbitary common font-family for all 4 font files.
615+
# We assign an arbitrary common font-family for all 4 font files.
616616
# The Story algorithm will select the right file as required.
617617
# We request to use "comic" throughout the text.
618618
css = """

docs/the-basics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ Annotations (:ref:`Annot`) on pages can be retrieved with the `page.annots()` me
10011001
Redacting content from a **PDF**
10021002
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10031003

1004-
Redactions are special types of annotations which can be marked onto a document page to denote an area on the page which should be securely removed. After marking an area with a rectangle then this area will be marked for *redaction*, once the redaction is *applied* then the content is securly removed.
1004+
Redactions are special types of annotations which can be marked onto a document page to denote an area on the page which should be securely removed. After marking an area with a rectangle then this area will be marked for *redaction*, once the redaction is *applied* then the content is securely removed.
10051005

10061006
For example if we wanted to redact all instances of the name "Jane Doe" from a document we could do the following:
10071007

docs/vars.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ Possible values of :attr:`linkDest.kind` (link destination kind).
274274
275275
3 -- Launch (open) another file (of any "executable" type).
276276

277-
* |PyMuPDF| treats any external link that starts wth `file:` or doesn't
277+
* |PyMuPDF| treats any external link that starts with `file:` or doesn't
278278
contain a colon, as `LINK_LAUNCH`.
279279

280280
:rtype: int

src/__init__.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,7 +2369,7 @@ def set_properties(
23692369
):
23702370
"""Set any or all properties of a node.
23712371

2372-
To be used for existing nodes preferrably.
2372+
To be used for existing nodes preferably.
23732373
"""
23742374
root = self.root
23752375
temp = root.add_division()
@@ -2659,7 +2659,7 @@ def __init__(self, filename=None, stream=None, filetype=None, rect=None, width=0
26592659
on open (e.g. EPUB). Ignored if n/a.
26602660
"""
26612661
# We temporarily set JM_mupdf_show_errors=0 while we are constructing,
2662-
# then restore its orginal value in a `finally:` block.
2662+
# then restore its original value in a `finally:` block.
26632663
#
26642664
global JM_mupdf_show_errors
26652665
JM_mupdf_show_errors_old = JM_mupdf_show_errors
@@ -4393,7 +4393,7 @@ def insert_file(self,
43934393
Insert an arbitrary supported document to an existing PDF.
43944394

43954395
The infile may be given as a filename, a Document or a Pixmap.
4396-
Other paramters - where applicable - equal those of insert_pdf().
4396+
Other parameters - where applicable - equal those of insert_pdf().
43974397
'''
43984398
src = None
43994399
if isinstance(infile, Pixmap):
@@ -6909,7 +6909,7 @@ def __init__(self):
69096909
self.text_fontsize = 0
69106910
self.text_maxlen = 0 # text fields only
69116911
self.text_format = 0 # text fields only
6912-
self._text_da = "" # /DA = default apparance
6912+
self._text_da = "" # /DA = default appearance
69136913

69146914
self.script = None # JavaScript (/A)
69156915
self.script_stroke = None # JavaScript (/AA/K)
@@ -7949,7 +7949,7 @@ def _insert_image(self,
79497949
#log( 'do_have_imask')
79507950
# mupdf.FzCompressedBuffer is not copyable, so
79517951
# mupdf.fz_compressed_image_buffer() does not work - it cannot
7952-
# return by value. And sharing a fz_compressed_buffer betwen two
7952+
# return by value. And sharing a fz_compressed_buffer between two
79537953
# `fz_image`'s doesn't work, so we use a raw fz_compressed_buffer
79547954
# here, not a mupdf.FzCompressedBuffer.
79557955
#
@@ -7981,7 +7981,7 @@ def _insert_image(self,
79817981
# `fz_compressed_buffer`, which is not reference counted, and they
79827982
# both think that they own it.
79837983
#
7984-
# So we do what the classic implementataion does, and simply ensure
7984+
# So we do what the classic implementation does, and simply ensure
79857985
# that `fz_drop_image(image)` is never called. This will leak
79867986
# some of `image`'s allocations (for example the main `fz_image`
79877987
# allocation), but it's not trivial to avoid this.
@@ -10468,7 +10468,7 @@ def size(self):
1046810468
"""Pixmap size."""
1046910469
if mupdf_version_tuple >= (1, 23, 8):
1047010470
return mupdf.fz_pixmap_size( self.this)
10471-
# fz_pixmap_size() is not publically visible, so we implement it
10471+
# fz_pixmap_size() is not publicly visible, so we implement it
1047210472
# ourselves. fixme: we don't add on sizeof(fz_pixmap).
1047310473
pm = self.this
1047410474
return pm.n() * pm.w() * pm.h()
@@ -10859,7 +10859,7 @@ def is_convex(self):
1085910859
if p1.y * p2.y > 0:
1086010860
return False
1086110861
m = planish_line(self.ll, self.ur) # puts other diagonal on x-axis
10862-
p1 = self.lr * m # tranform the
10862+
p1 = self.lr * m # transform the
1086310863
p2 = self.ul * m # remaining points
1086410864
if p1.y * p2.y > 0:
1086510865
return False
@@ -11294,8 +11294,8 @@ def draw_bezier(
1129411294

1129511295
def draw_circle(self, center: point_like, radius: float):# -> Point:
1129611296
"""Draw a circle given its center and radius."""
11297-
if not radius > EPSILON:
11298-
raise ValueError("radius must be postive")
11297+
if not radius > EPSILON:s
11298+
raise ValueError("radius must be positive")
1129911299
center = Point(center)
1130011300
p1 = center - (radius, 0)
1130111301
return self.draw_sector(center, p1, 360, fullSector=False)
@@ -11884,7 +11884,7 @@ def add_pdf_links(document_or_stream, positions):
1188411884
`document_or_stream` if a `Document` instance, otherwise a
1188511885
new `Document` instance.
1188611886
We raise an exception if an `href` in `positions` refers to an
11887-
internal position `#<name>` but no item in `postions` has `id =
11887+
internal position `#<name>` but no item in `positions` has `id =
1188811888
name`.
1188911889
"""
1189011890
if isinstance(document_or_stream, Document):
@@ -12216,7 +12216,7 @@ def ret():
1221612216
def update(parameter):
1221712217
'''
1221812218
Evaluates `more, _ = self.place(fn(parameter))`. If `more` is
12219-
false, then `rect` is big enought to contain `self` and we
12219+
false, then `rect` is big enough to contain `self` and we
1222012220
set `state.pmax=parameter` and return True. Otherwise we set
1222112221
`state.pmin=parameter` and return False.
1222212222
'''
@@ -12402,7 +12402,7 @@ def _extractText(self, format_):
1240212402
# fixme: mupdfwrap.py thinks fz_output is not copyable, possibly
1240312403
# because there is no .refs member visible and no fz_keep_output() fn,
1240412404
# although there is an fz_drop_output(). So mupdf.fz_new_output_with_buffer()
12405-
# doesn't convert the returnd fz_output* into a mupdf.FzOutput.
12405+
# doesn't convert the returned fz_output* into a mupdf.FzOutput.
1240612406
#out = mupdf.FzOutput(out)
1240712407
if format_ == 1:
1240812408
mupdf.fz_print_stext_page_as_html(out, this_tpage, 0)
@@ -17002,7 +17002,7 @@ def JM_quad_from_py(r):
1700217002

1700317003
def JM_read_contents(pageref):
1700417004
'''
17005-
Read and concatenate a PDF page's /Conents object(s) in a buffer
17005+
Read and concatenate a PDF page's /Contents object(s) in a buffer
1700617006
'''
1700717007
assert isinstance(pageref, mupdf.PdfObj), f'{type(pageref)}'
1700817008
contents = mupdf.pdf_dict_get(pageref, mupdf.PDF_ENUM_NAME_Contents)
@@ -19147,7 +19147,7 @@ def write(self, ctx, data_raw, data_length):
1914719147

1914819148
def compute_scissor(dev):
1914919149
'''
19150-
Every scissor of a clip is a sub rectangle of the preceeding clip scissor
19150+
Every scissor of a clip is a sub rectangle of the preceding clip scissor
1915119151
if the clip level is larger.
1915219152
'''
1915319153
if dev.scissors is None:
@@ -19892,7 +19892,7 @@ def annot_preprocess(page: "Page") -> int:
1989219892

1989319893

1989419894
def annot_postprocess(page: "Page", annot: "Annot") -> None:
19895-
"""Clean up after annotation inertion.
19895+
"""Clean up after annotation insertion.
1989619896

1989719897
Set ownership flag and store annotation in page annotation dictionary.
1989819898
"""
@@ -20341,10 +20341,10 @@ def util_invert_matrix(matrix):
2034120341
or abs( matrix.c - 0) >= sys.float_info.epsilon
2034220342
or abs( matrix.d - 1) >= sys.float_info.epsilon
2034320343
):
20344-
# Invertion not possible.
20344+
# Inversion not possible.
2034520345
return 1, ()
2034620346
return 0, (ret.a, ret.b, ret.c, ret.d, ret.e, ret.f)
20347-
# Do invertion in python.
20347+
# Do inversion in python.
2034820348
src = JM_matrix_from_py(matrix)
2034920349
a = src.a
2035020350
det = a * src.d - src.b * src.c
@@ -20811,7 +20811,7 @@ def sRGB_to_pdf(srgb: int) -> tuple:
2081120811
Args:
2081220812
srgb: (int) RRGGBB (red, green, blue), each color in range(255).
2081320813
Returns:
20814-
Tuple (red, green, blue) each item in intervall 0 <= item <= 1.
20814+
Tuple (red, green, blue) each item in interval 0 <= item <= 1.
2081520815
"""
2081620816
t = sRGB_to_rgb(srgb)
2081720817
return t[0] / 255.0, t[1] / 255.0, t[2] / 255.0
@@ -20825,7 +20825,7 @@ def sRGB_to_rgb(srgb: int) -> tuple:
2082520825
Args:
2082620826
srgb: (int) RRGGBB (red, green, blue), each color in range(255).
2082720827
Returns:
20828-
Tuple (red, green, blue) each item in intervall 0 <= item <= 255.
20828+
Tuple (red, green, blue) each item in interval 0 <= item <= 255.
2082920829
"""
2083020830
r = srgb >> 16
2083120831
g = (srgb - (r << 16)) >> 8

tests/test_drawings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def test_3207():
180180
"""Example graphics with multiple "close path" commands within same path.
181181
182182
The fix translates a close-path commands into an additional line
183-
which connects the current point with a preceeding "move" target.
183+
which connects the current point with a preceding "move" target.
184184
The example page has 2 paths which each contain 2 close-path
185185
commands after 2 normal "line" commands, i.e. 2 command sequences
186186
"move-to, line-to, line-to, close-path".

0 commit comments

Comments
 (0)