pyfpdf
pyfpdf copied to clipboard
Simple PDF generation for Python (FPDF PHP port)
This change allows you to supply a font argument when invoking the write_html method since it defaults to Times. ```python class MyFPDF(FPDF, HTMLMixin): pass pdf = MyFPDF() pdf.add_page() pdf.write_html("THIS BETTER...
With this PR, images are processed using PIL. This adds support for any PIL supported image format. Additionally, numpy is used to speed up image processing. This PR effectively makes...
This is useful for spool type label printers. Default bottom margin is too big. Need to be able to set bottom margin. See #148 for example
Hi there, I've added support for images provided as StringIO objects to fpdf. Maybe it is useful to others. It was required by a cloud-based solution we created.
Minor Spanish (my native language) mistake corrections. For better comprehension.
Currently, when a JPEG image() is added to a PDF, the file is not properly closed. This prevents modifying the files until the entire program has quit. This pull request...
This is really useful to display only part of image. Usage example: ``` with pdf.rect_clip(x=..., y=..., w=..., h=...): pdf.image(filepath, x, y) ``` I can add tests if needed
GitHub Actions test pipeline preview: https://github.com/Lucas-C/pyfpdf/runs/897657469
Minimal Python code reproducng the issue with the current `rotate` method: ```python pdf = fpdf.FPDF() pdf.add_page() pdf.rotate(90) pdf.image("lena.gif") pdf.add_page() pdf.rotate(90) pdf.image("lena.gif") pdf.output("out.pdf") ``` The generated file contains the following stream:...
I tested this and the optional alt text gets displayed well as a tooltip by Sumatra PDF: 