PDFMiner - Python PDF Parser and Analyzer

PDFMiner Tool

PDFMiner is an open source tool for extracting information from PDF documents. Unlike other PDF-related tools, it focuses entirely on getting and analyzing text data. 


It allows you to obtain the exact location of text on a page, as well as other information such as fonts or lines. It includes a PDF converter that can transform PDF files into other text formats (such as HTML). It has an extensible PDF parser that can be used for other purposes than text analysis.

Features:

  • Basic encryption (RC4) support.
  • CJK languages and vertical writing scripts support.
  • Outline (TOC) extraction.
  • PDF to HTML conversion (with a sample converter web app).
  • PDF-1.7 specification support. (well, almost)
  • Parse, analyze, and convert PDF documents.
  • Reconstruct the original layout by grouping text chunks.
  • Tagged contents extraction.
  • Various font types (Type1, TrueType, Type3, and CID) support.
  • Written entirely in Python. (for version 2.4 or newer)

DFMiner comes with two handy tools: pdf2txt.py and dumppdf.py.
  • pdf2txt.py:
pdf2txt.py extracts text contents from a PDF file. It extracts all the texts that are to be rendered programmatically, i.e. text represented as ASCII or Unicode strings. It cannot recognize text drawn as images that would require optical character recognition. It also extracts the corresponding locations, font names, font sizes, writing direction (horizontal or vertical) for each text portion. You need to provide a password for protected PDF documents when its access is restricted. You cannot extract any text from a PDF document which does not have extraction permission.

  • dumppdf.py:
dumppdf.py dumps the internal contents of a PDF file in pseudo-XML format. This program is primarily for debugging purposes, but it's also possible to extract some meaningful contents (e.g. images).




Source: www.effecthacking.com
PDFMiner - Python PDF Parser and Analyzer PDFMiner - Python PDF Parser and Analyzer Reviewed by Anonymous on 10:21 PM Rating: 5