ImageGear Professional DLL v17.1 for Windows Accusoft
AT_PDF_PRINTOPTIONS
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > PDF Component API Reference > PDF Component Structures Reference > AT_PDF_PRINTOPTIONS

Glossary Item Box

This structure provides printing parameters for the IG_PDF_doc_print function.

Declaration:

  Copy Code
typedef struct tagAT_PDF_PRINTOPTIONS
{
    AT_DWORD size;
    AT_PDF_BOOL emitToFile;
    LPAT_PDF_PRINTPARAMS printParams;
    HIG_PDF_STREAM printStm;
    AT_WORD paperWidth;
    AT_WORD paperHeight;
    AT_DWORD dontEmitListLen; 
    char ** dontEmitList; 
    AT_PDF_BOOL emitToPrinter; 
    char *inFileName;
    char *outFileName;
    char *deviceName;
    char *driverName;
    char *portName;
    DEVMODE *pDevMode;
    int   startPage;
    int   endPage;
    int   shrinkToFit;
    int   printAnnots;
    int   psLevel;
    int   nCopies;
    int   binaryOK;
    int   emitHalftones;
    int   reverse;
    int   farEastFontOpt;
    int   transQuality;
    int   doOPP;
    LPVOID cancelProc;
    LPVOID clientData;
    int   startResult;  
    AT_WORD *inFileNameW;
    AT_WORD *outFileNameW;
    AT_WORD *deviceNameW;
    AT_WORD *driverNameW;
    AT_WORD *portNameW;
    DEVMODEW * pDevModeW;
    HDC pDC;
    LPVOID userCallbacks;
    AT_PDF_BOOL forceGDIPrint;
    HDC hDC;
    AT_UINT PPDFeatures;
    AT_UINT ppdFileName;
} AT_PDF_PRINTOPTIONS;
typedef AT_PDF_PRINTOPTIONS FAR* LPAT_PDF_PRINTOPTIONS;

Members:

emitToFile

Create a PostScript file, must be FALSE for now.

printParams

AT_PDF_PRINTPARAMS structure. Applies to PostScript file.

printStm

Writeable HIG_PDF_STREAM that points to file stm or proc stm.

paperWidth

Width of paper in points.

paperHeight

Height of paper in points.

dontEmitListLen

Number of fonts that should not be downloaded.

dontEmitList

List of fonts (T1, TT, CID) that should not be downloaded.

emitToPrinter

Output PDF file to a PS or non-PS printer, must be TRUE for now.

inFileName

DOCINFO structure -> lpszDocName. Points to a null-terminated string that specifies the name of the document.

outFileName

DOCINFO structure -> lpszOutput. Points to a null-terminated string that specifies the name of an output file. If this pointer is NULL, the output will be sent to the device identified by deviceName, driverName, and portName.

deviceName

Name of device to which to print. Available devices can be found in the Windows Registry at HKEY_CURRENT_USER\Software\Microsoft\WindowsNT\CurrentVersion\Devices. Applies to printer.

driverName

Name of driver. For example, "winspool" Applies to printer.

portName

Name of Port. For example, "Ne00" See registry key for deviceName. Applies to printer.

pDevMode

Optional - allows you to pass a DEVMODE structure in if you have one.

If you do not pass in your own DEVMODE structure, the new one will be created by calling OpenPrinter(), DocumentProperties(), and ClosePrinter().

We never call SetPrinter() and have no facility to offer the features provided by SetPrinter() (e.g., pause/resume, deleting jobs, changing printer status, etc.). DocumentProperties() is called only in the case where the client doesn’t provide a DEVMODE.

If you provide your own DEVMODE, you will certainly want to call DocumentProperties() to populate it and/or display the print dialog.

startPage

Page to start printing with, 0-based.

endPage

Page to end printing on.

shrinkToFit

1 turns on shrinkToFit, 0 turns it off.

printAnnots

1 turns on printing annots, 0 turns it off.

psLevel

PostScript printing only - PostScript level.

nCopies

PostScript printing only - number of copies to print.

binaryOK

PostScript printing only - 1 turns on binary data, 0 turns it off.

emitHalftones

PostScript printing only - 1 turns on emitHalftones, 0 turns it off.

reverse

PostScript printing only - 1 reverses print order, 0 does regular order.

farEastFontOpt

PostScript printing only.

transQuality

Transparency flattening quality - 1 is fastest, 5 is best. Default is 3.

doOPP

PostScript printing only - 1 uses Overprint Preview, 0 does not. Default is 0

cancelProc

CancelProc and clientData are optional for emitToFile or emitToPrinter. LPFNIG_PDF_PRINTCANCELPROC callback function.

clientData

Optional data passed to cancelProc. Applies to both PostScript printer and file.

startResult

Spooler ID from StartDoc().

inFileNameW

Used for the Windows DOCINFO structure (lpszDocName) that points to a NULL-terminated string that specifying the name of the document. In case of printing/exporting to Postscript, this field sets the Title DSC comment in the generated Postscript file. inFileNameW has precedence over the deprecated inFileName. If neither is provided, the Title DSC comment is filled with the name of pdf document.

outFileNameW

Used for the Windows DOCINFO structure (lpszOutput). It points to a NULL-terminated string that specifies the name of an output file. If this pointer is NULL, the output will be sent to the device identified by deviceName, driverName, and portName. It applies to a printer.

deviceNameW

The name of the device to print to (for example, "Distiller Assistant v3.01"). Available devices can be found in the Windows Registry at HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices. It applies to a printer.

driverNameW

The name of the driver (for example, "winspool"). See the registry key for deviceName. It applies to the printer.

portNameW

The name of the port (for example, "Ne00"). See the registry key for deviceName. It applies to the printer.

pDevModeW

(Optional) Allows you to pass a DEVMODE structure in if you have one.

If you do not pass in your own DEVMODE structure, one is created by calling OpenPrinter(), DocumentProperties(), and ClosePrinter().

ImageGear never calls SetPrinter() and has no facility to offer the features provided by SetPrinter() (for example, pause/resume, deleting jobs, changing printer status, etc.). DocumentProperties() is called only in the case where the client does not provide a DEVMODE.

If you provide your own DEVMODE, call DocumentProperties() to populate it or display the print dialog box.

pDC

(Optional) Allows you to pass a DeviceContext structure.

If you do not pass in your own DeviceContext structure PDFL creates its own.

userCallbacks

Optional pointer to structure containing pointers to user callback functions.

forceGDIPrint

Optional value used for Postscript printing that allows printing with the code path used by the non-ps printer instead of the code used by the PS printer.

hDC

Optional device handle used to allow the device handle used in the user's sample with StartDoc and EndDoc to be passed to the library to be used in StartPage and EndPage.

PPDFeatures

Unused. Set to 0.

ppdFileName

Unused. Set to 0.

Remarks:

To print, set printing method to printer, and fill in inFileName, outFileName, deviceName, driverName, portName, dpi, nCopies, startPage, endPage, psLevel, shrinkToFit, binaryOK, emitHalftones.

©2012. Accusoft Corporation. All Rights Reserved.