Convert PDF/TIF to Excel Table using Python

36 views Asked by At

I'm trying to write a script that gets some information like mass, material and others from technical drawing and write it as a table. Using pyMupdf I've got to extract the information, but I would need some help iterating it on all files in a folder and adding it to a table (csv or something like that).

import fitz

doc = fitz.open("test.pdf") # open document
page = doc[0] # get the 1st page of the document

mass = fitz.Rect(3240, 2230, 3348, 2246)
material = fitz.Rect(2786,2248,3050,2276)


print(page.get_textbox(material))

This code runs well, but as I said I would need some help to iterate in all files inside a folder and make a report of some kind.

0

There are 0 answers