2023-04-22

Get Metadata for each page from a batch PDF

I am trying to extract the page name (shown in the screenshot below) for each page from the batch PDF which has been produced from AutoCAD.

I have tried PyMuPDF, PyPDF2 and PDFMiner but I can't seem to find where this info is stored in the PDF document.

Image showing Page Name in a Batch PDF

import fitz
pdfLocation = "TestPDF.pdf"
doc = fitz.open(pdfLocation)

for i in range(doc.pageCount):
  page = doc[i]
  # cont = page.get_text() Need help here for the page name 
doc.close()


No comments:

Post a Comment