Solved Printing Access Report Using Thermal Printer with Custom Page Size (1 Viewer)

Pac-Man

Active member
Local time
Today, 18:40
Joined
Apr 14, 2020
Messages
428
Hi,

I want to print a payment receipt whose width is 3" (width of the paper roll in thermal printer) and height can vary from 3-6". In access I am unable define custom paper size and page size is set to A4. See the following image in which I tried to present a an A4 paper in portrait orientation. Only part 1 is the payment receipt (everything in the detail section) which is needed to be printed on the paper role but part 2, 3, & 4 is also being printed which cause wastage of paper roll and is not desired. My detail height is 3" which is the width of the roll.

I first set the orientation to landscape in VBA and then print command is executed. It prints the part 1 correctly but also print other parts in the form of blank paper. How can I get this sorted.

Best Regards
Screenshot_2024-06-28-12-47-17-028_cn.readpad.whiteboard.png
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 14:40
Joined
Sep 12, 2006
Messages
15,798
Surely you can use page layout/ set up to determine the size of your document.

If it's a continuous roll, can't you get the print routine to print a few extra blank lines, and then just tear off the print?

How do you actually expect to separate the receipt?

On reflection maybe you can't do that. Is it a serial printer. Can't you just print line after line to the printer output device without creating a report.
 

Pac-Man

Active member
Local time
Today, 18:40
Joined
Apr 14, 2020
Messages
428
Surely you can use page layout/ set up to determine the size of your document.

If it's a continuous roll, can't you get the print routine to print a few extra blank lines, and then just tear off the print?

How do you actually expect to separate the receipt?

On reflection maybe you can't do that. Is it a serial printer. Can't you just print line after line to the printer output device without creating a report.
I tear it to separate the receipt and the printer is connected through serial port. Printing line by line can be done but for that I have to learn the printer's programming. Secondly, I don't have the printer myself and I am doing this for someone else. Receipt is being printed okay but the next blank print (equivalent to three receipts) is the the issue. I believe it is due to page size (A4) in the page setup.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 14:40
Joined
Sep 12, 2006
Messages
15,798
Yes, it occurred to me that the variable report size must be the issue. The printer will always print a full A4 page with each iteration, won't it.

Other than printing a line at a time, I can't see an easy way round it.
 

Pac-Man

Active member
Local time
Today, 18:40
Joined
Apr 14, 2020
Messages
428
If I could define a page size that is 3" wide in page setup, I guess this might get resolved but I don't know how to do that.
 

Gasman

Enthusiastic Amateur
Local time
Today, 14:40
Joined
Sep 21, 2011
Messages
14,718
What version of Access is being used?
I have a User as the last of page setups?
7.62 * 12.7

Could someone else set up the report for you and send it back in a DB?

If I use that and go to change the margins ia reports it as North America 3 * 5
1719587505259.png
 

Pac-Man

Active member
Local time
Today, 18:40
Joined
Apr 14, 2020
Messages
428
Thanks for reply. I have resolved my issue. I have to define custom page size in Print Server Properties and then that page is available in the page sizes in access report page setup. Now extra space is not being printed. Thanks for the your time and effort to sort me out.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 14:40
Joined
Sep 12, 2006
Messages
15,798
Thanks for explaining how you did it. Did you set up more than one custom page, as you said the length varied?
 

Pac-Man

Active member
Local time
Today, 18:40
Joined
Apr 14, 2020
Messages
428
No, i set the page with w: 3", H: 8.3",
I set height equal to A4 page's width because height of the print is not expected to go beyond A4 width. Now the printed receipt is only part 1 of the image of my initial post. Now part 2, 3, 4 are not being printed. Sometime if receipt is small in that case a small portion of the part 1 is left blank but that is okay.
 

Users who are viewing this thread

Top Bottom