pdfminer.six API reference
72 public APIs from pdfminer.six (pdfminer/pdfminer.six) — 28 classes, 31 functions, 13 methods. Signatures extracted by static analysis of the actual source.
Repository: pdfminer/pdfminer.six
| Kind | Count |
|---|---|
| Classes | 28 |
| Functions | 31 |
| Methods | 13 |
API list
func
fuzzing.utils.prepare_pdfminer_fuzzing() -> NoneUsed to disable logging of the pdfminer module
func
pdfminer._saslprep.saslprep(data:str, prohibit_unassigned_code_points:bool=True) -> strAn implementation of RFC4013 SASLprep.
class
pdfminer.data_structures.NumberTreeA PDF number tree.
func
pdfminer.encodingdb.name2unicode(name:str) -> strConverts Adobe glyph names to Unicode numbers.
func
pdfminer.fontmetrics.convert_font_metrics(path:str) -> NoneConvert an AFM file to a mapping of font metrics.
func
pdfminer.glyphlist.convert_glyphlist(path:str) -> NoneConvert a glyph list into a python representation.
class
pdfminer.jbig2.JBIG2StreamReaderRead segments from a JBIG2 byte stream
class
pdfminer.jbig2.JBIG2StreamWriterWrite JBIG2 segments to a file in JBIG2 format
class
pdfminer.layout.LTAnnoActual letter in the text as a Unicode string.
class
pdfminer.layout.LTCharActual letter in the text as a Unicode string.
class
pdfminer.layout.LTComponentObject with a bounding box
class
pdfminer.layout.LTContainerObject that can be extended and analyzed
class
pdfminer.layout.LTFigureRepresents an area used by PDF Form objects.
class
pdfminer.layout.LTImageAn image object.
class
pdfminer.layout.LTItemInterface for things that can be analyzed
method
pdfminer.layout.LTItem.analyze(laparams:LAParams) -> NonePerform the layout analysis.
func
pdfminer.layout.LTLayoutContainer.dist(obj1:LTComponent, obj2:LTComponent) -> floatA distance function between two TextBoxes.
func
pdfminer.layout.LTLayoutContainer.isany(obj1:ElementT, obj2:ElementT) -> set[ElementT]Check if there's any other object between obj1 and obj2.
class
pdfminer.layout.LTLineA single straight line.
class
pdfminer.layout.LTPageRepresents an entire page.
class
pdfminer.layout.LTRectA rectangle.
class
pdfminer.layout.LTTextInterface for things that have text
method
pdfminer.layout.LTText.get_text() -> strText contained in this object
class
pdfminer.layout.LTTextBoxRepresents a group of text chunks in a rectangular area.
class
pdfminer.pdfdocument.PDFDocumentPDFDocument object represents a PDF document.
method
pdfminer.pdfdocument.PDFDocument.find_xref(parser:PDFParser) -> intInternal function used to locate the first XRef.
method
pdfminer.pdfdocument.PDFDocument.get_page_labels() -> Iterator[str]Generate page label strings for the PDF document.
method
pdfminer.pdfdocument.PDFDocument.read_xref_from(parser:PDFParser, start:int, xrefs:list[PDFBaseXRef]) -> NoneReads XRefs from the given location.
class
pdfminer.pdfdocument.PDFEncryptionWarningLegacy warning for failed decryption.
class
pdfminer.pdfdocument.PDFNoValidXRefWarningLegacy warning for missing xref.
class
pdfminer.pdfdocument.PageLabelsPageLabels from the document catalog.
func
pdfminer.pdffont.get_widths(seq:Iterable[object]) -> dict[str | int, float]Build a mapping of character widths for horizontal writing.
func
pdfminer.pdffont.get_widths2(seq:Iterable[object]) -> dict[int, tuple[float, Point]]Build a mapping of character widths for vertical writing.
class
pdfminer.pdfinterp.PDFResourceManagerRepository of shared resources.
class
pdfminer.pdfpage.PDFPageAn object that holds the information about a page.
class
pdfminer.pdfparser.PDFParserPDFParser fetch PDF objects from a file stream.
method
pdfminer.pdfparser.PDFParser.do_keyword(pos:int, token:PSKeyword) -> NoneHandles PDF-related keywords.
method
pdfminer.pdfparser.PDFParser.set_document(doc:'PDFDocument') -> NoneAssociates the parser with a PDFDocument object.
class
pdfminer.pdftypes.DecipherCallableFully typed a decipher callback, with optional parameter.
func
pdfminer.pdftypes.decipher_all(decipher:DecipherCallable, objid:int, genno:int, x:object) -> AnyRecursively deciphers the given object.
func
pdfminer.pdftypes.resolve1(x:object, default:object=None) -> AnyResolves an object.
func
pdfminer.pdftypes.resolve_all(x:object, default:object=None) -> AnyRecursively resolves the given object and all the internals.
func
pdfminer.pdftypes.uint_value(x:object, n_bits:int) -> intResolve number and interpret it as a two's-complement unsigned number
method
pdfminer.psparser.PSBaseParser.nextline() -> tuple[int, bytes]Fetches a next line that ends either with \r or \n.
method
pdfminer.psparser.PSBaseParser.revreadlines() -> Iterator[bytes]Fetches a next line backward.
method
pdfminer.psparser.PSBaseParser.seek(pos:int) -> NoneSeeks the parser to the given position.
class
pdfminer.psparser.PSKeywordA class that represents a PostScript keyword.
class
pdfminer.psparser.PSLiteralA class that represents a PostScript literal.
class
pdfminer.psparser.PSObjectBase class for all PS or PDF-related data types.
class
pdfminer.psparser.PSSymbolTableA utility class for storing PSLiteral/PSKeyword objects.
class
pdfminer.utils.PlaneA set-like data structure for objects placed on a plane.
method
pdfminer.utils.Plane.add(obj:LTComponentT) -> NonePlace an object.
method
pdfminer.utils.Plane.find(bbox:Rect) -> Iterator[LTComponentT]Finds objects that are in a certain area.
method
pdfminer.utils.Plane.remove(obj:LTComponentT) -> NoneDisplace an object.
func
pdfminer.utils.apply_matrix_norm(m:Matrix, v:Point) -> PointEquivalent to apply_matrix_pt(M, (p,q)) - apply_matrix_pt(M, (0,0))
func
pdfminer.utils.apply_matrix_pt(m:Matrix, v:Point) -> PointApplies a matrix to a point.
func
pdfminer.utils.apply_matrix_rect(m:Matrix, rect:Rect) -> RectApplies a matrix to a rectangle.
func
pdfminer.utils.choplist(n:int, seq:Iterable[_T]) -> Iterator[tuple[_T, ...]]Groups every n elements of the list.
func
pdfminer.utils.decode_text(s:bytes) -> strDecodes a PDFDocEncoding string to Unicode.
func
pdfminer.utils.drange(v0:float, v1:float, d:int) -> rangeReturns a discrete range.
func
pdfminer.utils.enc(x:str) -> strEncodes a string for SGML/XML/HTML
func
pdfminer.utils.format_int_alpha(value:int) -> strFormat a number as lowercase letters a-z, aa-zz, etc.
func
pdfminer.utils.format_int_roman(value:int) -> strFormat a number as lowercase Roman numerals.
func
pdfminer.utils.fsplit(pred:Callable[[_T], bool], objs:Iterable[_T]) -> tuple[list[_T], list[_T]]Split a list into two classes according to the predicate.
func
pdfminer.utils.get_bound(pts:Iterable[Point]) -> RectCompute a minimal rectangle that covers all the points.
func
pdfminer.utils.make_compat_bytes(in_str:str) -> bytesConverts to bytes, encoding to unicode.
func
pdfminer.utils.make_compat_str(o:object) -> strConverts everything to string, if bytes guessing the encoding.
func
pdfminer.utils.nunpack(s:bytes, default:int=0) -> intUnpacks variable-length unsigned integers (big endian).
func
pdfminer.utils.pick(seq:Iterable[_T], func:Callable[[_T], float], maxobj:_T | None=None) -> _T | NonePicks the object obj where func(obj) has the highest value.
func
pdfminer.utils.translate_matrix(m:Matrix, v:Point) -> MatrixTranslates a matrix by (x, y) inside the projection.
func
pdfminer.utils.uniq(objs:Iterable[_T]) -> Iterator[_T]Eliminates duplicated elements.
func
pdfminer.utils.vecBetweenBoxes(obj1:'LTComponent', obj2:'LTComponent') -> PointA distance function between two TextBoxes.
About this data
These signatures were extracted from the public source of pdfminer/pdfminer.six
using Python's ast module. Argument names, default values,
type annotations and return types are taken verbatim from the code.
Implementation bodies are never stored. See
how it works for details.