Recent

Author Topic: LazReport: how to export to PDF in A4 when the only printer is 80mm?  (Read 2330 times)

lainz

  • Hero Member
  • *****
  • Posts: 4685
  • Web, Desktop & Android developer
    • https://lainz.github.io/
LazReport: how to export to PDF in A4 when the only printer available in the system is 80mm?

The main problem is that the report gets chopped at the right, loosing important information from the report. Say we loss about 2 centimeters.

Code: Pascal  [Select][+][-]
  1. |                     ||
  2. |                     ||
  3. |                     ||
  4. |                     ||
  5.                         ^ normal A4
  6.                      ^ chopped here

zeljko

  • Hero Member
  • *****
  • Posts: 1692
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: LazReport: how to export to PDF in A4 when the only printer is 80mm?
« Reply #1 on: January 30, 2024, 09:43:20 pm »
Install CUPS-PDF driver and print to that virtual printer ?

lainz

  • Hero Member
  • *****
  • Posts: 4685
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: LazReport: how to export to PDF in A4 when the only printer is 80mm?
« Reply #2 on: January 30, 2024, 09:47:32 pm »
I forget to say it's Linux Mint 32 bit... nothing can be installed, the fix should come from patching or changing the code of lazreport....

We can generate the PDF, but is chopped at the right... :'(

TRon

  • Hero Member
  • *****
  • Posts: 3930
Re: LazReport: how to export to PDF in A4 when the only printer is 80mm?
« Reply #3 on: January 30, 2024, 10:01:18 pm »
I forget to say it's Linux Mint 32 bit... nothing can be installed, the fix should come from patching or changing the code of lazreport....
Uhm... I fear that in that case you can expect to have to wait a long time. I fail to recognize how this can be solved by lazreport. Could you elaborate why lazreport could be accountable for the chopped off bits ? (I really can't seem to wrap my head around it)

fwiw: I use many programs (on Linux) and while I actually do (still) have a printer, make use of a virtual pdf printer using cups which allows me to print to a variety of different 'paper formats', even a0 if required :)
I do not have to remember anything anymore thanks to total-recall.

lainz

  • Hero Member
  • *****
  • Posts: 4685
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: LazReport: how to export to PDF in A4 when the only printer is 80mm?
« Reply #4 on: January 30, 2024, 10:09:05 pm »
Is an ESC/POS printer with a linux system. There are no other printers available.

Our system is cross platform and the bug is only in that Linux machine. So it should be about lazreport trying to get A4 size that's predefined somewhere in that printer, but there's no way of fixing the A4 size? If is wrong defined in that 80mm printer?


lainz

  • Hero Member
  • *****
  • Posts: 4685
  • Web, Desktop & Android developer
    • https://lainz.github.io/
Re: LazReport: how to export to PDF in A4 when the only printer is 80mm?
« Reply #5 on: January 30, 2024, 10:25:55 pm »
I forget to say it's Linux Mint 32 bit... nothing can be installed, the fix should come from patching or changing the code of lazreport....
Uhm... I fear that in that case you can expect to have to wait a long time. I fail to recognize how this can be solved by lazreport. Could you elaborate why lazreport could be accountable for the chopped off bits ? (I really can't seem to wrap my head around it)

fwiw: I use many programs (on Linux) and while I actually do (still) have a printer, make use of a virtual pdf printer using cups which allows me to print to a variety of different 'paper formats', even a0 if required :)

You're lucky, you can install that software, but the problem is that we can't install in each customer device now...

TRon

  • Hero Member
  • *****
  • Posts: 3930
Re: LazReport: how to export to PDF in A4 when the only printer is 80mm?
« Reply #6 on: January 30, 2024, 10:34:35 pm »
You're lucky, you can install that software, but the problem is that we can't install in each customer device now...
Yeah, I understand and indeed I am a lucky in the way that for customers I can use that solution as well.

Our system is cross platform and the bug is only in that Linux machine. So it should be about lazreport trying to get A4 size that's predefined somewhere in that printer, but there's no way of fixing the A4 size? If is wrong defined in that 80mm printer?
I understand but that is what I more or less expected and tried to express with my initial reply: wrong information returned by printer causing software related issues. I am not familiar with lazreport's internal details enough to make any statements but could it perhaps be addressed with fiddling the margins (the right margin in particular) ?

The only other solution I see that some software offer is to try and fit the produced document to the printer canvas by means of scaling (and sometime offers a user defined scaling factor)
I do not have to remember anything anymore thanks to total-recall.

zeljko

  • Hero Member
  • *****
  • Posts: 1692
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: LazReport: how to export to PDF in A4 when the only printer is 80mm?
« Reply #7 on: January 31, 2024, 09:11:30 pm »
Is an ESC/POS printer with a linux system. There are no other printers available.

Our system is cross platform and the bug is only in that Linux machine. So it should be about lazreport trying to get A4 size that's predefined somewhere in that printer, but there's no way of fixing the A4 size? If is wrong defined in that 80mm printer?

And you're printing via some ppd driver in that case ? What is exactly that printer ? Some Bixolon 350 or similar ?

Nicole

  • Hero Member
  • *****
  • Posts: 1009
Re: LazReport: how to export to PDF in A4 when the only printer is 80mm?
« Reply #8 on: March 05, 2024, 06:31:08 pm »
Is there a chance, to edit the pdfs?
http://www.xpdfreader.com/opensource.html

Thaddy

  • Hero Member
  • *****
  • Posts: 16520
  • Kallstadt seems a good place to evict Trump to.
Re: LazReport: how to export to PDF in A4 when the only printer is 80mm?
« Reply #9 on: March 05, 2024, 06:49:45 pm »
Do you use points or pixels for font sizes. Should be points, not pixels. eg negative vs positive values.
But I am sure they don't want the Trumps back...

 

TinyPortal © 2005-2018