boltzkit.utils.pdf
Functions
Convert a matplotlib Figure or Axes to a PDF stored in memory. |
|
|
|
|
|
|
This function is mainly for debugging purposes |
|
Save a pdf in the form of a buffer into a PDF file. |
|
Save a dict of pdfs into a directory. |
Classes
A wrapper to allow differentiation of raw data by type. |
- class boltzkit.utils.pdf.PdfBuffer[source]
Bases:
objectA wrapper to allow differentiation of raw data by type.
- buffer: BytesIO
- __init__(buffer: BytesIO) None
- boltzkit.utils.pdf.matplotlib_to_pdf_buffer(obj: Figure | Axes) PdfBuffer[source]
Convert a matplotlib Figure or Axes to a PDF stored in memory.
- Returns:
Buffer containing PDF bytes.
- Return type:
io.BytesIO
- boltzkit.utils.pdf.save_pdf(obj: PdfBuffer, path: str) None[source]
Save a pdf in the form of a buffer into a PDF file.