New Printer Escapes in PostScript Driver Version 3.52Last reviewed: February 16, 1995Article ID: Q86647 |
The information in this article applies to:
SUMMARYVersions 3.52 and later of the PostScript driver for Microsoft Windows 3.1x (PSCRIPT.DRV) implements four new printer escape functions: OPENCHANNEL, DOWNLOADHEADER, CLOSECHANNEL, and SETGDIXFORM. The text below documents these four new printer escape functions.
MORE INFORMATIONThe numerical values for the four new printer escape functions are as follows:
#define OPENCHANNEL 4110 #define DOWNLOADHEADER 4111 #define CLOSECHANNEL 4112 #define SETGDIXFORM 4113 OPENCHANNELAn application can use the OPENCHANNEL printer escape in conjunction with the PASSTHROUGH printer escape to send data directly to the printer. The OPENCHANNEL printer escape prevents the PostScript driver from downloading a PostScript header to the printer. Note: To use this printer escape, an application must have complete information about how the particular printer operates.
short Escape(hdc, OPENCHANNEL, sizeof(WORD), NULL, NULL) Parameter Description --------- ----------- hdc HDC identifies the device context.Returns: Greater than zero if the printer escape is successful. This value is less than or equal to zero if the printer escape is not successful or not implemented.Comments: Send an OPENCHANNEL printer escape before sending any data to the printer. The OPENCHANNEL printer escape is an alternative to the STARTDOC printer escape; each print job uses either one, not both. OPENCHANNEL suppresses downloading a PostScript header. Because the NEWFRAME printer escape and the ResetDC function cause the driver to download a PostScript header, avoid using NEWFRAME and ResetDC in conjunction with OPENCHANNEL. DOWNLOADHEADERAn application uses the DOWNLOADHEADER printer escape to download one of four PostScript headers to the printer. The lpInData parameter contains a pointer to a WORD value that specifies the desired header.
BOOL Escape(hdc, DOWNLOADHEADER, sizeof(WORD), lpInData, NULL) Parameter Description --------- ----------- hdc HDC identifies the device context. lpInData LPINT Pointer to a WORD value.Returns: TRUE if the printer escape is successful. FALSE if the printer escape is not successful or not implemented.Comments: If lpInData == NULL, or if lpInData points to a WORD that contains a value other than one of the four choices listed below, the DOWNLOADHEADER printer escape will select a header depending on the current state of the DEVMODE data structure and the printer escapes previously issued by the application. This printer escape sends the selected header between the DSC comments %%BeginResource and %%EndResource.The lpInData parameter points to a WORD that contains one of the following four values:
#define PS_HEADER 1 // Full header (normal PostScript header) #define PS_1 4 // Assume header has been permanently // downloaded to the printer. Prints error // page if not. #define PS_2 8 // Minimal PostScript header #define TI_HEADER 13 // TrueImage header CLOSECHANNELThe CLOSECHANNEL printer escape closes the printer channel opened by the OPENCHANNEL printer escape.
short Escape(hdc, CLOSECHANNEL, sizeof(WORD), NULL, NULL) Parameter Description --------- ----------- hdc HDC Identifies the device context.Returns: Greater than zero if the printer escape is successful. This value is less than or equal to zero if the printer escape is not successful or not implemented. SETGDIXFORMThe SETGDIXFORM printer escape sends an /SM command to the printer to transform the printer coordinates to the default GDI coordinate system.
short Escape(hdc, SETGDIXFORM, sizeof(WORD), NULL, NULL) Parameter Description --------- ----------- hdc HDC identifies the device context.Returns: Greater than zero if the printer escape is successful. This value is less than or equal to zero if the printer escape is not successful or not implemented.Comments: The SETGDIXFORM printer escape sets the printer to "Portrait Mode without Mirroring" mode regardless of the settings in the Advanced Options dialog box. |
Additional reference words: 3.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |