bec_lib.pdf_writer.PDFWriter#

class PDFWriter(file: str, title: str | None = None, font='Courier')[source]#

Bases: object

Class for writing pdfs.

Filer writer for pdfs.

Parameters:
  • file (str) – full path to the output file (including file extension).

  • title (str, optional) – Title of the document. Defaults to None.

Methods

close

close the pdf and write to disk

write

add text to the pdf

Attributes

FONT_SIZE

LEFT_MARGIN

RIGHT_MARGIN

TOP_MARGIN

close()[source]#

close the pdf and write to disk

write(text: str)[source]#

add text to the pdf