We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee1f487 commit 13e496dCopy full SHA for 13e496d
printTaxes.py
@@ -0,0 +1,27 @@
1
+import PyPDF2
2
+
3
+def extract_taxes(filename):
4
5
+ # Open the PDF file
6
+ pdf = PyPDF2.PdfFileReader(filename)
7
8
+ # Get the first page
9
+ page = pdf.getPage(0)
10
11
+ # Extract the taxes from the page
12
+ taxes = page.extractText().split(";")
13
14
+ # Return the taxes
15
+ return taxes
16
17
18
+# Get the filenames of all the PDF files
19
+filenames = ["file1.pdf", "file2.pdf", "file3.pdf"]
20
21
+# Extract the taxes from all the files
22
+taxes = []
23
+for filename in filenames:
24
+ taxes.extend(extract_taxes(filename))
25
26
+# Print the taxes
27
+print(taxes)
0 commit comments