PaperHeight on POS-printers

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

PaperHeight on POS-printers

Postby Herkel » Thu Jan 13, 2005 3:10 pm

How do I set PaperHeight when printing to a POS printer?
Any clues?
Herkel
 
Posts: 2
Joined: Thu Jan 13, 2005 3:04 pm
Location: Sweden

Postby IDEAL Software Support » Thu Jan 13, 2005 4:16 pm

Normally, you can simply set the property PageHeight.

During printing, this sets an individual paper height for the current selected output device to the specified value in 0.1mm.

If this does not work, due to a bad printer driver, try the following:
In order to make a printer accept the automatic selection of user defined page formats, it might be necessary to define a custom form of the desired page format (if this is required depends on the printer driver).

Example: with "Start Menu | Settings | Printers" the window with the installed printers will appear. Right-click on a blank area of the window and choose "Server Properties" from the pop-up menu. In the upcoming dialog, define a custom form of the desired dimensions. For example name it "Test" and set the width to 760 and height to 1280. In your source code, select the printer and the desired page format like this:

VPE.Device = "Epson LQ-550"
VPE.PageWidth = 760
VPE.PageHeight = 1280

That's it.

If this also doesn't work, the printer driver does not support custom page formats.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Infinite paper

Postby Herkel » Thu Jan 13, 2005 5:22 pm

Thanks for your reply. The problem is that a POS-printer has an infinite page height. The paper is cut when you're finished.

BTW POS is Point Of Sale

Regards Per Herkel
System Technologies
Sweden
Herkel
 
Posts: 2
Joined: Thu Jan 13, 2005 3:04 pm
Location: Sweden

Postby IDEAL Software Support » Fri Jan 14, 2005 1:25 pm

I was already informed, what a POS printer is. :)

If this printer has a Windows driver which supports True-Type fonts (the fonts supported by VPE), it is likely that it will cut the paper either if a page is done, or if the whole document is done (some info on this would be appreciated).

If there is somehow the requirement to have the whole document on one page (especially if the paper is cut after a page break), do the following:
create a temporary document of the desired page width and with a page height of 999cm (this is the maximum supported by VPE).
Render your document and find the bottom-most coordinate.
Afterwards create a new document and set the page height to the bottom-most coordinate of the temporary document (plus, say, 1 cm for a bottom margin, in addition set VPE.nBottomMargin = page height to avoid unwanted automatic page breaks).
Then render your report into the final document.

As far as I understand you, your printer will cut the paper after the whole document is done. If the printer driver ignores page breaks, there shouldn't be any problem and the above is not necessary, otherwise please explain.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 44 guests

cron