Bagikan melalui


POSTSCRIPT_IDENTIFY Printer Escape function

The POSTSCRIPT_IDENTIFY printer escape function sets a PostScript driver to GDI-centric mode or PostScript-centric mode.

To perform this operation, call the ExtEscape function with the following parameters.

Syntax

int ExtEscape(
  _In_  HDC    hdc,
  _In_  int    nEscape,
  _In_  int    cbInput,
  _In_  LPCSTR lpszInData,
  _In_  int    cbOutput,
  _Out_ LPSTR  lpszOutData
);

Parameters

  • hdc [in]
    A handle to the printer device context.

  • nEscape [in]
    The escape function to be performed.

    Value Meaning
    POSTSCRIPT_IDENTIFY

    Sets a PostScript driver to GDI-centric or PostScript-centric mode.

     

  • cbInput [in]
    The number of bytes of data pointed to by the lpszInData parameter.

    For this escape, set this value to sizeof ( DWORD ).

  • lpszInData [in]
    A pointer to the input structure required for the specified escape.

    Value Meaning
    PSIDENT_GDICENTRIC

    GDI-centric mode. Specify this value if the PostScript driver supports the PASSTHROUGH printer escape function, but not the POSTSCRIPT_PASSTHROUGH printer escape function.

    PSIDENT_PSCENTRIC

    PostScript-centric mode. Specify this value if the PostScript driver supports the POSTSCRIPT_PASSTHROUGH printer escape function, but not the PASSTHROUGH printer escape function.

     

  • cbOutput [in]
    The number of bytes of data pointed to by the lpszOutData parameter.

    For this printer escape function, the value of this parameter is 0.

  • lpszOutData [out]
    A pointer to the structure that receives output from this escape.

    For this printer escape function, the value of the parameter is NULL.

Return value

The return value is greater than zero if the function is successful and less than zero if not. A return value of zero indicates that the printer does not support this escape.

Remarks

To put the driver in GDI-centric or PostScript-centric modes, first call the QUERYESCSUPPORT printer escape function to determine whether the driver supports the POSTSCRIPT_IDENTIFY printer escape function. If so, you can assume the driver is PSCRIPT 5.0. Then, before you call any other printer escape function, you must call POSTSCRIPT_IDENTIFY and specify either PSIDENT_GDICENTRIC or PSIDENT_PSCENTRIC. You must call the QUERYESCSUPPORT and POSTSCRIPT_IDENTIFY printer escape functions before calling any other printer escape function.

Note  After the PostScript driver is set to GDI-centric mode or PostScript-centric mode, you will not be allowed to call the POSTSCRIPT_IDENTIFY printer escape function anymore.

 

If you do not use the POSTSCRIPT_IDENTIFY printer escape function, the PostScript driver is in compatibility mode and provides identical support for the PASSTHROUGH, POSTSCRIPT_PASSTHROUGH, and POSTSCRIPT_DATA printer escape functions.

For PostScript drivers that support the POSTSCRIPT_PASSTHROUGH, PASSTHROUGH, and POSTSCRIPT_PASSTHROUGH printer escape functions are identical.

In PostScript-centric mode, the application is responsible for all PostScript output that marks the paper using the POSTSCRIPT_PASSTHROUGH escape function. GDI functions are not allowed. The driver is responsible for the overall document structure and printer control settings. The application can use the POSTSCRIPT_INJECTION printer escape function to inject a block of raw data (including DSC comments) into the job stream at specific places.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

See also

Printing

GDI Printer Escape Functions

ExtEscape

PASSTHROUGH

POSTSCRIPT_PASSTHROUGH