Skip to content

Commit a363c9f

Browse files
authored
Update pdf_tools.py
1 parent f219c98 commit a363c9f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pdf_tools/pdf_tools.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
from PyPDF2 import PdfFileReader, PdfFileWriter, PdfFileMerger
1414
from pathlib import Path
1515

16-
print("this script can print, edit, modify, rotate and add passwords to PDF doc
17-
uments if used properly")
16+
print("this script can print, edit, modify, rotate and add passwords to PDF documents if used properly")
1817
pdf_path = (Path.home() / "myfile.pdf")
1918
pdf = PdfFileReader(str(pdf_path))
2019
print("to get info on your file type INFO")
@@ -31,7 +30,7 @@
3130
print("text will be saved in a txt file")
3231
with open('fulltext.txt', 'w') as f:
3332
f.write(page.extractText())
34-
if input() = ="PAGE":
33+
if input() =="PAGE":
3534
print("which page do you want?")
3635
n = int(input())
3736
page = pdf.getPage(n)
@@ -60,8 +59,7 @@
6059
output_path = Path.home() / "concatenated.pdf"
6160
with output_path.open(mode="wb") as output_file:
6261
pdf_merger.write(output_file)
63-
print("if you want to rotate all pages clockwise
64-
write CW or write ACW for anticlockwise")
62+
print("if you want to rotate all pages clockwise write CW or write ACW for anticlockwise")
6563
if input() == "CW":
6664
pdf_reader = PdfFileReader(str(pdf_path))
6765
pdf_writer = PdfFileWriter()

0 commit comments

Comments
 (0)