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
Copy file name to clipboardexpand all lines: docs/dev/testing.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,11 @@ pypdf uses [`pytest`](https://docs.pytest.org/en/7.1.x/) for testing.
5
5
To run the tests you need to install the CI (Continuous Integration) requirements by running `pip install -r requirements/ci.txt` or
6
6
`pip install -r requirements/ci-3.11.txt` if running Python ≥ 3.11.
7
7
8
-
## De-selecting groups of tests
8
+
## Deselecting groups of tests
9
9
10
10
pypdf makes use of the following pytest markers:
11
11
12
-
*`slow`: Tests that require more than 5 seconds
12
+
*`slow`: Tests that require more than 5 seconds.
13
13
*`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.
14
14
*`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.
15
15
* To successfully run the tests, please download most of the documents beforehand: `python -c "from tests import download_test_pdfs; download_test_pdfs()"`
Copy file name to clipboardexpand all lines: docs/user/add-watermark.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Adding a Stamp/Watermark to a PDF
1
+
# Adding a Stamp or Watermark to a PDF
2
2
3
3
Adding stamps or watermarks are two common ways to manipulate PDF files.
4
4
A stamp is adding something on top of the document, a watermark is in the
@@ -21,7 +21,7 @@ for page in writer.pages:
21
21
writer.write("out.pdf")
22
22
```
23
23
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.
Copy file name to clipboardexpand all lines: docs/user/viewer-preferences.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# Adding Viewer Preferences
2
2
3
-
It is possible to set viewer preferences of the PDF file.
3
+
It is possible to set viewer preferences of a PDF file.
4
4
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).
5
5
6
6
Note that the `/ViewerPreferences` dictionary does not exist by default.
7
7
If it's not already present, it must be created by calling the `create_viewer_preferences` method
8
8
of the `PdfWriter` object.
9
9
10
10
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`.
12
12
Otherwise, the `viewer_preferences` property will be set to `None`.
13
13
14
14
## Example
@@ -78,6 +78,6 @@ with open("output.pdf", "wb") as output_stream:
78
78
writer.write(output_stream)
79
79
```
80
80
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
82
82
included here to aid to anyone searching pypdf documentation
0 commit comments