Skip to content

Commit a201407

Browse files
committed
Simplify ch 13 second challenge solution
1 parent 1bac150 commit a201407

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ch13-interact-with-pdf-files/7-challenge-unscramble-a-pdf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ def get_page_text(page):
2121

2222
for page in pages:
2323
rotation_degrees = page["/Rotate"]
24-
if rotation_degrees < 0:
25-
page.rotateClockwise(-rotation_degrees)
26-
elif rotation_degrees > 0:
24+
if rotation_degrees != 0:
2725
page.rotateCounterClockwise(rotation_degrees)
2826
pdf_writer.addPage(page)
2927

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy