pdfreader.document submodule

class pdfreader.document.PDFDocument(fobj)

Constructor method

root = None

references to document’s Catalog instance

header = None

contains PDF file header data

trailer = None

contains PDF file trailer data

pages()

Yields document pages one by one.

Returns:Page generator.
build(obj, visited=None, lazy=True)

Resolves all indirect references for the object.

Parameters:
  • obj (one of supported PDF types) – an object from the document
  • lazy (bool) – don’t resolve subsequent indirect references if True (default).
  • visited – Shouldn’t be used. Internal param containing already resolved objects to not fall into infinite loops
locate_object(num, gen)