The PDF Utils Module (tendril.utils.pdfutils)

This module contains small helper functions to handle PDF files. These functions are independent of the rest of the software and can be reused wherever needed.

tendril.utils.files.pdf.merge_pdf(pdflist, outfilepath, remove_sources=False)[source]

Merges PDF files. Sources are PDF files whose paths are listed in pdflist and the combined PDF is written out to outfilepath.

Parameters:
  • pdflist – List of paths to PDF files to be merged.
  • outfilepath – Path where output PDF file is to be written.
Returns:

outfilepath

tendril.utils.files.pdf.conv_ps2pdf(pspath, pdfpath)[source]

Runs ps2pdf to convert a PS file specified in pspath to a PDF file writen out to pdfpath.

Parameters:
  • pspath – Path to PS file to be converted.
  • pdfpath – Path of PDF file to be generated.