Skip to content

Instantly share code, notes, and snippets.

View xnorxnor's full-sized avatar

Georg Wehrmann xnorxnor

View GitHub Profile
@xnorxnor
xnorxnor / extract_pdf_info.py
Last active May 16, 2022 13:06
Extract positions and fontsize of objects in a pdf file. Coordinates are printed in mm. Coordinate system starts in upper left corner.
from pathlib import Path
from typing import Iterable, Any
from pdfminer.high_level import extract_pages
page_height = 0
page_width = 0
def show_ltitem_hierarchy(o: Any, depth=0):