Report from Listbox: a lot of blank space!

It could be, but why can the example do it? That is the strangest part of it. We can’t Finance Plugins. I feel we shouldn’t have too…

OS is Windows 10

When it is a Driver Problem, the example shouldn’t be able to do it either. But it does. I now deleted all my rows in my listBox and it still prints the huge blank space.

[quote=473487:@Rick Araujo]This is a continuous feeding printer, designed for infinite printing. Not sure if a paper size fits here (except paper width, not length).[/quote]

Yes, but it works with the example. It cuts off at the correct Moment an doesn’t print the full size as defined in the Setup Dialog.

In the example the PS has a height value much Shorter as in my Code. But where is this set? I did not.

Very trivially: take a look at the Body Section height….

It was the first thing I asked :slight_smile:

Ok it looks like your app is somehow getting the page height from the default printer (the invoice) and using that for the receipt printer.

Do you do anything with printer setups during startup?

Try removing controls from your report one by one until you get down to just a few report fields, one of the controls might be causing the issue.

Basically, work back in your project until you have something similar to the example, then check any existing controls to see if they have different properties.

The page height is set to something around 50cm, so, at some point isn’t to expect a blank “jump” to the “next page”?

[quote=473490:@]It was the first thing I asked :slight_smile:

Ok it looks like your app is somehow getting the page height from the default printer (the invoice) and using that for the receipt printer.

Do you do anything with printer setups during startup?

Try removing controls from your report one by one until you get down to just a few report fields, one of the controls might be causing the issue.

Basically, work back in your project until you have something similar to the example, then check any existing controls to see if they have different properties.[/quote]

I actually save the Setup string when someone uses it once, this is to Prevent giving the border margin sizes every time we want to print. But this is still in development and I don’t pass this saved string to the Printer.

I removed all fields and only left the labels. The Body is now empty, but the blank space is still there.

Why does it? Or am I misunderstanding this. More importantly, why is the page height set. I didn’t. I guess Xojo does this automatically, but with a huge space. Can I let Xojo recalculate ps.height?

Continuous printers does not have the page concept. You just feed it with data sending continuous data, usually Epson/POS, and other printer commands like line feed and cut the paper. Most desktop OSs drivers see printers as “page printers”, a page is a repeatable drawing area of fixed size, that after done your job, some layer will dump a series of commands to print such content of that size and feed another page for a new drawing. Your “page” has 2104 dots at 108 dots per inch, it does a bit more than 9 inches, around 49 and a bit centimeters.

Yes, but why does the example do it correctly? It works with the same EPSON POS Receipt Printer and does cut off after the last row. My big height must be defined somewhere, and since I’m not doing that and selecting the same paper size as in the example, it is definitely strange.

Continuously? Do they have a way to set the page length? How the printer knows where to cut? Do you send a cut page command or it does by itself after a time out not receiving data? When you say “the example works”, what example is this?

Just so we’re on the right page here (pun intended); in the original image you posted, the left receipt, did you remove entries from the example listbox to print that because if not, there’s missing output and the footer is the wrong size.

Out of curiosity could you post a picture of the example printed all the way down to y and z ?

The usual way of using such printers is sending commands direct to them. I don’t know If some friend here already wrote a Xojo ESC/POS lib like:

https://python-escpos.readthedocs.io/en/latest/

https://github.com/mike42/escpos-php

Also:

https://forum.xojo.com/25549-printing-on-dot-matrix/p2#p219564

So let me get started. Thanks for all your amazing help! I didn’t know that the community here was so helpful. It really helped me to find the solution:

The issue was actually kinda my fault. I had the footer in a pageFooter. This will mean that it will Always be on the and of a page. The footer, should however have been in a groupFooter. This way he has Nothing to print afterward and doesn’t print to the end of the page.

That’s correct. But what happens when closing this print job and opening a new one? The driver skips the page feeding? (blank spacing)