new interperter
This commit is contained in:
1 parent
56dd4c7ef4
commit
1d11cd1c7f
35 files changed
+2781
-2
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import os
|
||||
|
||||
from pdfmajor.extractor import v2_extract_items_from_pdf
|
||||
from pdfmajor.interpreter_v2 import PDFText
|
||||
|
||||
CUR_PATH = os.path.dirname(os.path.dirname(__file__))
|
||||
CUR_PATH = os.path.dirname(os.getcwd())
|
||||
|
||||
FILE_NAME = os.path.join(
|
||||
CUR_PATH,
|
||||
"samples/pdf/fonts.pdf"
|
||||
)
|
||||
|
||||
for page in v2_extract_items_from_pdf(FILE_NAME):
|
||||
for item in page:
|
||||
if isinstance(item, PDFText):
|
||||
print(item.chars)
|
||||
else:
|
||||
print(item)
|
||||
Reference in new issue
Block a user