I need to extract the PDF version from a PDF document. I tried PDF miner but it provides the below info only:
- PDF Producer
- Created
- Modified
- Application
Below is the code I tried:
from pdfminer.pdfparser import PDFParser
from pdfminer.pdfdocument import PDFDocument
fp = open("ibs.servlets.pdf", 'rb')
parser = PDFParser(fp)
doc = PDFDocument(parser)
parser.set_document(doc)
if len(doc.info) > 0:
info = doc.info[0]
print(info)
Is there any other libraries apart from pdf miner I can use?