Printing on 10"x6" paper

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
sudip
Posts: 1456
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Printing on 10"x6" paper

Post by sudip »

Hi All,

I want to print cash memo or money receipts on 10"x6" (ie., 10" width and 6" height) paper. How can I use this paper size programatically?

TIA.

With best regards.

Sudip
With best regards,
Sudip
User avatar
Rathinagiri
Posts: 5480
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Printing on 10"x6" paper

Post by Rathinagiri »

Had you used "PRINTER_PAPER_USER"?

From HMG Doc.

Code: Select all

SELECT PRINTER <cPrinter> | DEFAULT

    [ TO <lSuccessVar> ]

    [ ORIENTATION <nOrientation> ]

    [ PAPERSIZE <nPaperSize> ]

    [ PAPERLENGTH <nPaperLength> ]

    [ PAPERWIDTH <nPaperWidth> ]

    [ COPIES <nCopies> ]

    [ DEFAULTSOURCE <nDefaultSource> ]

    [ QUALITY <nQuality> ]

    [ COLOR <nColor> ]

    [ DUPLEX <nDuplex> ]

    [ COLLATE <nCollate> ]

    [ PREVIEW ] 

PAPERLENGTH / PAPERWIDTH: Sets a custom paper length/width (millimeters).

To use custom paper size, you must specify PRINTER_PAPER_USER as paper size. 

East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
sudip
Posts: 1456
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Printing on 10"x6" paper

Post by sudip »

Hello Rathi,

Thanks a lot. I should check documentation before asking :) . Now, it works fine with following code. :D

Code: Select all

	SELECT PRINTER mPrinter ORIENTATION PRINTER_ORIENT_PORTRAIT PREVIEW PAPERSIZE PRINTER_PAPER_USER PAPERLENGTH (6*25.4) PAPERWIDTH (10*25.4)
With best regards.

Sudip
With best regards,
Sudip
bels79
Posts: 37
Joined: Fri Sep 09, 2011 8:01 am
DBs Used: DBF, MySQL

Re: Printing on 10"x6" paper

Post by bels79 »

asked to print back and forth in the " SELECT PRINTER PREVIEW mPrinter ORIENTATION PRINTER_ORIENT_PORTRAIT PAPERSIZE PRINTER_PAPER_USER PAPERLENGTH ( 6 * 25.4 ) PAPERWIDTH ( 10 * 25.4 ) " add command ---> DUPLEX 1 ?


and how to let the print right justify


tq
Post Reply