devasood devasood -4 years ago 171
Python Question

How to get font face and font type information in Python3 from PDF

I am trying to find out the font family and font size of text in PDF which contains various lines of different fonts and sizes. Also it has to be compatible with Python 3.5, I'm surprised there is no easy way to do this.




Just to iterate, I'm not looking for libraries. I'm looking for an easy way to read the font size of a pdf file

Answer Source

Finally I found the answer which involves using pdfminer.six The solution was that on github people fork the repository to make changes. One such fork is pdminer.six which is compatible with Python3. Please upvote such questions, the link shared above was viewed over 1000 times and was closed really early. Its essential for python to use libraries everywhere rather than to reinvent the wheel

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download