How can I have printers to print my PDF as-is? #1794
-
|
Hi, I'm using fpf2 to generate PDFs to print labels from a Django application. The PDF looks perfectly right on the viewers, even when I voerly a grid with the exact label measures. But, then, when we print them, we have two printers that do different displacements, both horizontal and vertical, that place the texts at wrong places that do not fit with the label cuts. Is there a way to tell fpdf2 to take the displacements into account so I do not have to redo all positioning calculations? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @vgiralt! What you're experiencing is unfortunately quite common when printing labels, and I've had this kind of problems myself with PDFs as well as text editors.
The displacement you're seeing typically comes from the printing side, not the PDF generation. Printers and their drivers can introduce offsets due to things like non-printable margins, scaling settings (e.g. “fit to page”), or hardware calibration differences — which would explain why two printers produce different shifts.
That said, a common workaround is to measure the horizontal/vertical displacement for each printer and compensate the offset in your layout. You may also want to check:
|
Beta Was this translation helpful? Give feedback.
Hi @vgiralt! What you're experiencing is unfortunately quite common when printing labels, and I've had this kind of problems myself with PDFs as well as text editors.
fpdf2generates PDFs with precise coordinates in a virtual page space, and since your output aligns correctly in PDF viewers, it means the layout itself is correct.The displacement you're seeing typically comes from the printing side, not the PDF generation. Printers and their drivers can introduce offsets due to things like non-printable margins, scaling settings (e.g. “fit to page”), or hardware calibration differences — which would explain why two printers produce different shifts.
fpdf2does not have visibility into or …