Skip to content

Commit c7a07ec

Browse files
authored
DOC: Minor improvements (#2501)
1 parent fb1f5df commit c7a07ec

10 files changed

+23
-23
lines changed

docs/dev/deprecations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pypdf strives to be an excellent library for its current users and for new
44
ones. We are careful with introducing potentially breaking changes, but we
55
will do them if they provide value for the community on the long run.
66

7-
We hope and think that deprecations will not happen soon again. If they do,
7+
We hope and think that deprecations will not happen frequently. If they do,
88
users can rely on the following procedure.
99

1010
## Semantic Versioning

docs/dev/intro.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Git is a command line application for version control. If you don't know it,
3535
you can [play ohmygit](https://ohmygit.org/) to learn it.
3636

3737
GitHub is the service where the pypdf project is hosted. While git is free and
38-
open source, GitHub is a paid service by Microsoft - but for free in lot of
38+
open source, GitHub is a paid service by Microsoft, but free in a lot of
3939
cases.
4040

4141
[pre-commit](https://pypi.org/project/pre-commit/) is a command line application
@@ -47,7 +47,7 @@ you `git commit`.
4747
## Commit Messages
4848

4949
Having a clean commit message helps people to quickly understand what the commit
50-
was about, without actually looking at the changes. The first line of the
50+
is about, without actually looking at the changes. The first line of the
5151
commit message is used to [auto-generate the CHANGELOG](https://github.com/py-pdf/pypdf/blob/main/make_release.py).
5252
For this reason, the format should be:
5353

@@ -67,14 +67,14 @@ The `PREFIX` can be:
6767
A bug is always an issue for pypdf users - test code or CI that was fixed is
6868
not considered a bug here.
6969
* `ENH`: A new feature! Describe in the body what it can be used for.
70-
* `DEP`: A deprecation - either marking something as "this is going to be removed"
70+
* `DEP`: A deprecation. Either marking something as "this is going to be removed"
7171
or actually removing it.
7272
* `PI`: A performance improvement. This could also be a reduction in the
7373
file size of PDF files generated by pypdf.
7474
* `ROB`: A robustness change. Dealing better with broken PDF files.
7575
* `DOC`: A documentation change.
76-
* `TST`: Adding / adjusting tests.
77-
* `DEV`: Developer experience improvements - e.g. pre-commit or setting up CI
76+
* `TST`: Adding or adjusting tests.
77+
* `DEV`: Developer experience improvements, e.g. pre-commit or setting up CI.
7878
* `MAINT`: Quite a lot of different stuff. Performance improvements are for sure
7979
the most interesting changes in here. Refactorings as well.
8080
* `STY`: A style change. Something that makes pypdf code more consistent.

docs/dev/releasing.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ A `pypdf` release contains the following artifacts:
1313
`pypdf` should typically only be released by one of the core maintainers / the
1414
core maintainer. At the moment, this is Martin Thoma.
1515

16-
Any owner of the py-pdf organization has also the technical permissions to
16+
Any owner of the py-pdf organization also has the technical permissions to
1717
release.
1818

1919
## How is it done?
2020

2121
The release contains the following steps:
2222

2323
1. Update the CHANGELOG.md and the _version.py via `python make_release.py`.
24-
This also prepares the release commit message
24+
This also prepares the release commit message.
2525
2. Create a release commit: `git commit -eF RELEASE_COMMIT_MSG.md`.
2626
3. Tag that commit: `git tag -s {{version}} -eF RELEASE_TAG_MSG.md`.
27-
4. Push both: `git push && git push --tags`
27+
4. Push both: `git push && git push --tags`.
2828
5. CI now builds a source and a wheels package which it pushes to PyPI. It also
2929
creates a GitHub release.
3030

@@ -33,7 +33,7 @@ The release contains the following steps:
3333
### The Release Tag
3434

3535
* Use the release version as the tag name. No need for a leading "v".
36-
* Use the changelog entry as the body
36+
* Use the changelog entry as the body.
3737

3838

3939
## When are releases done?

docs/dev/testing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ pypdf uses [`pytest`](https://docs.pytest.org/en/7.1.x/) for testing.
55
To run the tests you need to install the CI (Continuous Integration) requirements by running `pip install -r requirements/ci.txt` or
66
`pip install -r requirements/ci-3.11.txt` if running Python ≥ 3.11.
77

8-
## De-selecting groups of tests
8+
## Deselecting groups of tests
99

1010
pypdf makes use of the following pytest markers:
1111

12-
* `slow`: Tests that require more than 5 seconds
12+
* `slow`: Tests that require more than 5 seconds.
1313
* `samples`: Tests that require the [the `sample-files` git submodule](https://github.com/py-pdf/sample-files) to be initialized. As of October 2022, this is about 25 MB.
1414
* `enable_socket`: Tests that download PDF documents. They are stored locally and thus only need to be downloaded once. As of October 2022, this is about 200 MB.
1515
* To successfully run the tests, please download most of the documents beforehand: `python -c "from tests import download_test_pdfs; download_test_pdfs()"`

docs/user/add-watermark.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Adding a Stamp/Watermark to a PDF
1+
# Adding a Stamp or Watermark to a PDF
22

33
Adding stamps or watermarks are two common ways to manipulate PDF files.
44
A stamp is adding something on top of the document, a watermark is in the
@@ -21,7 +21,7 @@ for page in writer.pages:
2121
writer.write("out.pdf")
2222
```
2323

24-
Else use `merge_transformed_page()` with `Transformation()` if you need to translate, rotate, scale, etc. the stamp before merging it to the content page.
24+
Otherwise use `merge_transformed_page()` with `Transformation()` if you need to translate, rotate, scale, etc. the stamp before merging it to the content page.
2525

2626
```python
2727
from pathlib import Path

docs/user/adding-pdf-annotations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ with open("annotated-pdf.pdf", "wb") as fp:
304304
Text markup annotations refer to a specific piece of text within the document.
305305

306306
Those are a bit more complicated as you need to know exactly where the text
307-
is. Those are the "Quad points".
307+
is, the so-called "Quad points".
308308

309309
### Highlighting
310310

docs/user/merging-pdfs.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ writer.append(reader, "page 1 and 10", [0, 9])
6363

6464
During merging, the relevant named destination will also imported.
6565

66-
If you want to insert pages in the middle of the destination, use `merge` (which provides (insertion) position).
66+
If you want to insert pages in the middle of the destination, use `merge` (which provides an insertion position).
6767
You can insert the same page multiple times, if necessary even using a list-based syntax:
6868

6969
```python
@@ -126,7 +126,7 @@ Please note that if you clone an object, you will clone all the objects below as
126126
including the objects pointed by *IndirectObject*. Due to this, if you clone a page that
127127
includes some articles (`"/B"`), not only the first article, but also all the chained articles
128128
and the pages where those articles can be read will be copied.
129-
It means that you may copy lots of objects which will be saved in the output PDF as well.
129+
This means that you may copy lots of objects which will be saved in the output PDF as well.
130130

131131
In order to prevent this, you can provide the list of fields in the dictionaries to be ignored:
132132

docs/user/reading-pdf-annotations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ for page in reader.pages:
3131
print(annotation)
3232
```
3333

34-
Reading the most common ones is described here.
34+
Examples of reading three of the most common annotations:
3535

3636
## Text
3737

docs/user/streaming-data.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
In some cases you might want to avoid saving things explicitly as a file
44
to disk, e.g. when you want to store the PDF in a database or AWS S3.
55

6-
pypdf supports streaming data to a file-like object and here is how.
6+
pypdf supports streaming data to a file-like object:
77

88
```python
99
from io import BytesIO

docs/user/viewer-preferences.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Adding Viewer Preferences
22

3-
It is possible to set viewer preferences of the PDF file.
3+
It is possible to set viewer preferences of a PDF file.
44
These properties are described in Section 12.2 of the [PDF 1.7 specification](https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf).
55

66
Note that the `/ViewerPreferences` dictionary does not exist by default.
77
If it's not already present, it must be created by calling the `create_viewer_preferences` method
88
of the `PdfWriter` object.
99

1010
If viewer preferences exist in a PDF file being read with `PdfReader`,
11-
you can access them as properties of the `viewer_preferences` properties.
11+
you can access them as properties of `viewer_preferences`.
1212
Otherwise, the `viewer_preferences` property will be set to `None`.
1313

1414
## Example
@@ -78,6 +78,6 @@ with open("output.pdf", "wb") as output_stream:
7878
writer.write(output_stream)
7979
```
8080

81-
(The names beginning with a slash character are part of the PDF file format. They are
81+
The names beginning with a slash character are part of the PDF file format. They are
8282
included here to aid to anyone searching pypdf documentation
83-
for these names from the PDF specification.)
83+
for these names from the PDF specification.

0 commit comments

Comments
 (0)