The scripts that generates PDF files from MS Office files and manipulate them.
This document describes how to set up the environment for the application.
Install Python 3.10 from https://www.python.org/downloads/.
Add python3 to the PATH environment.
All the below packages can be install by following commands. Or each package can be installed one by one.
pip install -r requirement.txt
https://pbpython.com/windows-com.html
https://johannesfilter.com/python-and-pdf-a-review-of-existing-tools/ https://nanonets.com/blog/pypdf2-library-working-with-pdf-files-in-python/ https://realpython.com/pdf-python/
There are several command patterns and two of them produce PDFs from Access and Word files.
Others like gen_pdf_cmd
, combine_pdf_cmd
and impose_pdf_cmd
manipulate PDF and produce another PDF.
CommandExecutor
manages all these and produces the final output the developer wants to produce.
The base_pdf_cmd
is the base class for all the xxx_pdf_cmd
that has input parameters and output PDF files.
This command produces PDF file from a Access report.
This command produces PDF files from Word document files by creating a docx file first and exporting the range as a PDF.
The gen_pdf_cmd command generates PDF from scratch using reportlab.
The combine_pdf_cmd
combines multiple pdfs into one by choosing specified ranges of PDF pages.
It uses PyPDF2
to do the job.
The impose_pdf_cmd
command imposes source PDF and produced imposed PDF.
i.e. Perfect or Saddle Stitch.
The CommandExecutor
manages list of xxx_pdf_cmd
s and run them based on their dependency
and produce the final output PDF.