background image
Functional specification
31
CDE/Motif PST
CDEnext
options
Specifies ddx driver dependent options. String limited to XPCS characters.
RETURN VALUE
None.
DESCRIPTION
Depending on
type
for
XpStartDoc
,
XPDocRaw
or
XPDocNormal
,
XpPutDocumentData
has
two modes of operation.
In
XPDocRaw
mode,
XpPutDocumentData
sends
data
directly to the output, and
drawable
must
be
None
, else a
BadDrawable
will be generated. The X Print Server does not emit document or page
control codes into the output, and
data
is passed through unmodified. This is useful for sending
previously constructed and complete documents (e.g. a PCL file), and using the X Print Server's job
control and submission capabilities. Since
XPDocRaw
implies that the client will be generating all
document output, an
XPBadSequence
error will be generated if
XpStartPage
is called in this mode.
The printer attribute
xp-raw-formats-supported
defines the valid values for
doc_fmt
in this
mode, with unsupported values for
doc_fmt
causing
BadValue
to be generated.
In
XPDocNormal
mode,
XpPutDocumentData
sends data to the X Print Server, and depending on the
ddx driver implementation, integrates
data
into the output. The parameters
doc_fmt
and
options
describe the format of
data
which guides the ddx driver in interpreting
data
. The printer attribute
xp-
embedded-formats-supported
defines the valid values for
doc_fmt
in this mode, with
unsupported values for
doc_fmt
causing
BadValue
to be generated.
Depending on the ddx driver implementation in use,
XpPutDocumentData
could be used, for example,
to send a simple text file to a Postscript ddx driver that is capable of wrapping the appropriate document
and page control constructs around the text so that it can be printed on a Postscript printer. Likewise,
Encapsulated Postscript Files could be handled. Another use could be to send a TIFF file to a PCL ddx
driver
that can convert the image from TIFF into PCL and then integrate it into the current PCL output.
There is no limit to the size of
data
that can be sent to the server using
XpPutDocumentData
.
XpPutDocumentData
automatically decomposes the call into multiple protocol requests to make sure
that the maximum request size of the server is not exceeded.
ERRORS/WARNINGS
The function can generate one of the following errors:
XPBadContext
A valid print context id has not been set prior to making this call.
XPBadSequence
The function was not called in the proper order with respect to the other X
Print Service Extension calls (example,
XpPutDocumentData
prior to
XpStartDoc
).
BadValue
The value specified for
doc_fmt
is not valid.
BadDrawable
The value specified for
drawable
is not valid.
XPBadResourceID
The value specified for
drawable
is not valid for the print context and
print screen. The resource in question must be created in the proper print
context and on the correct screen.