Skip to content

Commit d3d2503

Browse files
committed
Add rotated arabic file
1 parent d89d531 commit d3d2503

File tree

4 files changed

+39
-5
lines changed

4 files changed

+39
-5
lines changed

.github/workflows/json_consistency.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class PdfEntry(BaseModel):
1212
path: str
1313
encrypted: bool
14-
producer: str
14+
producer: str | None
1515
pages: NonNegativeInt
1616
images: NonNegativeInt | None
1717
forms: NonNegativeInt

015-arabic/habibi-rotated.pdf

15.5 KB
Binary file not shown.

015-arabic/rotate.py

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from pypdf import PdfReader, PdfWriter
2+
3+
reader = PdfReader("habibi.pdf")
4+
writer = PdfWriter()
5+
page = reader.pages[0]
6+
7+
page.rotate(90)
8+
9+
writer.add_page(page)
10+
11+
page.rotate(90)
12+
13+
writer.add_page(page)
14+
15+
page.rotate(90)
16+
17+
writer.add_page(page)
18+
19+
page.rotate(90)
20+
21+
writer.add_page(page)
22+
23+
24+
with open("habibi-rotated.pdf", "wb") as fp:
25+
writer.write(fp)

files.json

+13-4
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,15 @@
162162
"images": 0,
163163
"forms": 0
164164
},
165+
{
166+
"path": "015-arabic/habibi-rotated.pdf",
167+
"producer": "pypdf",
168+
"creation_date": null,
169+
"encrypted": false,
170+
"pages": 4,
171+
"images": 0,
172+
"forms": 0
173+
},
165174
{
166175
"path": "015-arabic/habibi-oneline-cmap.pdf",
167176
"producer": "WeasyPrint 54.1",
@@ -200,17 +209,17 @@
200209
},
201210
{
202211
"path": "019-grayscale-image/grayscale-image.pdf",
203-
"producer": "",
204-
"creation_date": "2022-09-20T08:15:17",
212+
"producer": null,
213+
"creation_date": null,
205214
"encrypted": false,
206215
"pages": 1,
207216
"images": 1,
208217
"forms": 0
209218
},
210219
{
211220
"path": "020-xmp/output_with_metadata_pymupdf.pdf",
212-
"producer": "",
213-
"creation_date": "2022-09-20T08:15:17",
221+
"producer": null,
222+
"creation_date": "2023-04-10T07:46:54",
214223
"encrypted": false,
215224
"pages": 1,
216225
"images": 1,

0 commit comments

Comments
 (0)