Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FPDF question
#1
I have an app that generates pdfs, i use it on a regular basis, using FPDF.
It works fine, thank you.

Recently I did a version 2, the big difference being that i put a second image on the one page each pdf has.
The first image is rater small , a jpg of 300x188 pixels.
The new one is bigger, a png of 1200 x 1000 pixels, that is rendered a bit smaller on the page.
But now, instead of instantaneous, it takes like 20 seconds to finish all my pages.(19 pdfs in total)
The code is not very tricky for either of them:

pdf1.image(foto1, x=10, y=15, w=50)
..... 
pdf1.image(foto2 , x=20, y=150, w=150)
Before you start telling me i should be using another package, my question is,
a) Is the size of the picture causing the delay?
b) is a png slower than a jpg. It is produced using matplotlib, maybe i could resize it.

The only thing that could convince me to walk away from FPDF, is that elsewhere
the page layout syntax would be much easier. I spent a lot of time puzzling to get
the headers on top of the right columns. Smile
thx,
Paul
Reply


Messages In This Thread
FPDF question - by DPaul - Oct-27-2020, 07:43 AM
RE: FPDF question - by Gribouillis - Oct-27-2020, 08:05 AM
RE: FPDF question - by DPaul - Oct-27-2020, 08:26 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Label Maker FPDF, Reportlab jamesaarr 1 2,603 Aug-09-2021, 11:57 PM
Last Post: Pedroski55
  fpdf orientation not working properly KatMac 1 3,259 May-02-2021, 10:47 AM
Last Post: Pedroski55
  fpdf star character issue KatMac 3 2,919 May-01-2021, 06:22 PM
Last Post: KatMac
  fpdf adding a new font to my report KatMac 0 2,125 Apr-23-2021, 02:19 PM
Last Post: KatMac
  ModuleNotFoundError: No module named 'fpdf' KatMac 4 11,021 Apr-19-2021, 01:23 PM
Last Post: KatMac
  Installing FPDF Batman 3 8,586 Jun-04-2019, 04:58 AM
Last Post: heiner55

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020