render_pdf is python script based on weasyprint that converts any source code to pdf file.
This script has the following features.
- syntax highlighting for any source code using pygments.
- line number for the source code.
- rendering any online materials or source code by downloading it.
You can install this package from the pypi index using the following commands.
For Linux Based OS
pip install render_pdfFor windows
python -m pip install render_pdfThis script can be used in variety of ways. The following examples and the results are stored in the example directory in this repository.
- rendering single source code from local directory
render ./example/render.py -o ./example/render.pdf- rendering multiple source codes from local directory
render ./setup.py ./example/render.py -o ./example/render.pdfrender -y ./setup.py ./example/render.py -o ./example/render.pdfTo render the setup.py file from this repository by downloading it from github server. P
render https://raw.githubusercontent.com/endalk200/render_pdf/main/setup.py -o setup.pdfYou can see the source code by cloning the repository as follows.
git clone https://github.com/endalk200/render_pdf.git
