LlStgsysPrint

Syntax:

HLLSTG LlStgsysStoragePrint (HLLSTG hStg, LPCTSTR pszPrinterName1, LPCTSTR pszPrinterName2, INT nStartPageIndex, INT nEndPageIndex, INT nCopies, UINT nFlags, LPCTSTR pszMessage, HWND hWndParent);

Task:

Prints pages from an open preview file job

Parameter:

hStg: The handle returned by LlStgsysStorageOpen()

pszPrinterName1: Name of the printer to be used for the first page (can be NULL, see below)

pszPrinterName2: Name of the printer to be used for the following pages (can be NULL, see below)

nStartPageIndex: Index of the first page to be printed

nEndPageIndex: Index of the last page to be printed

nCopies: Number of copies

nFlags: A combination of the following flags:

Flag

Meaning

LS_PRINTFLAG_­FIT

Fits the print to the printable area of the printer

LS_PRINTFLAG_­STACKEDCOPIES

Print copies for each page, not the job (111222333 instead of 123123123)

LS_PRINTFLAG_­TRYPRINTERCOPIES

Try to make hardware copies if possible

LS_PRINTFLAG_­METER

Show a meter dialog

LS_PRINTFLAG_­ABORTABLEMETER

Show a meter dialog which has a "Cancel" button

LS_PRINTFLAG_­SHOWDIALOG

Shows a printer select dialog

LS_PRINTFLAG_FAX

Required for output on fax printer

LS_PRINTFLAG_IGNORE_PROJECT_TRAY

Paper bin will be ignored

LS_PRINTFLAG_IGNORE_PROJECT_DUPLEX

Duplex will be ignored

LS_PRINTFLAG_IGNORE_PROJECT_COLLATION

Page collation will be ignored

LS_PRINTFLAG_IGNORE_PROJECT_EXTRADATA

Printer specific settings will be ignored


pszMessage: Will be shown in the title of the optional meter dialog and is also used as document name for the print job. If NULL, the entry from the preview file (parameter of LlPrintWithBoxStart()) is used.

hWndParent: Window handle to be used as parent for the meter dialog

Return Value:

Error code

Hints:

Use this API routine if you want an easy way to print a page range from the current storage job. If a printer name is NULL, List & Label tries to get the printer and its settings from the values stored in the preview file (i.e. the printer settings selected during creation). If no printer with the specified device name is present, the default printer is selected.

You need to set the job (LlStgsysSetJob()) before you call this function.

See Also:

LlStgsysPrint, LlStgsysSetJob