Page 1 of 1

Print a Receipt Ticket in Pdf

Posted: Fri Aug 11, 2023 11:06 am
by PedroAlex
Hello!

Can anyone give a tip for this problem!
I'm using DcPrint On commands to print to a receipt printer. But sometimes it is necessary to send this receipt by email in Pdf.
It turns out that when I send it to PDF, the paper format is always A4. And the receipt appears with a large area around it in white!
How can I set the paper format?
I did some tests so I'm not getting it.

I wrote a small program to demonstrate the situation.

Many Thanks!

Re: Print a Receipt Ticket in Pdf

Posted: Fri Aug 11, 2023 2:25 pm
by rdonnay
This appears to me to be a limitation of the Acrobat PDF viewer.

Re: Print a Receipt Ticket in Pdf

Posted: Sat Aug 12, 2023 2:54 am
by PedroAlex
Hi Roger.

I found the source of the problem.
It is related to the FormSize of BullZip Pdf.
I found this excellent example \exp20\samples\printer\printerforms.prg and managed to create a specific formsize for 80 mm wide paper.
FormPrint.jpg
FormPrint.jpg (195.78 KiB) Viewed 2205 times
Then in Dcprint On .... Formsize I refer to the formsize ID that I created and that works Ok.
T_Pdf.jpg
T_Pdf.jpg (142.47 KiB) Viewed 2205 times

Re: Print a Receipt Ticket in Pdf

Posted: Sun Aug 13, 2023 6:28 am
by rdonnay
That's great! Good work!