XpPutDocumentData(3Xp)
π XpPutDocumentData π
okay so bestie, welcome to the 3Xp page from XPRINT FUNCTIONS. this is the whole XpPutDocumentData story, and itβs giving βsend data and incorporate it into the outputβ main character energy. π«Ά no cap, every detail is still here.
π NAME π
void XpPutDocumentData - Sends and incorporates data into the output.
β¨ SYNOPSIS β¨
bestie, the compile-and-call vibe is literally this:
cc [ flag... ] file... -lXp [ library... ]
#include <X11/extensions/Print.h>
XpPutDocumentData ( display, drawable, data, data_len, doc_fmt, options
)
Display *display;
Drawable drawable;
unsigned char *data;
int data_len;
char *doc_fmt;
char *options;
π«Ά ARGUMENTS π«Ά
displayβ a pointer to theDisplaystructure; you get it back fromXOpenDisplay. iconic little handoff, honestly.drawableβ the destination drawable for rendering. thatβs where the output energy goes.dataβ the device-specific data being sent. yes, this is the actual payload.data_lenβ the number of bytes indata.doc_fmtβ the type of data sent. peek below for valid values. string limited to XPCS characters.optionsβ DDX driver dependent options. string limited to XPCS characters.
π DESCRIPTION π
Depending on the type for XpStartDoc, XpPutDocumentData has two modes of operation. periodt.
In XPDocRaw mode, XpPutDocumentData sends data directly to the output, and drawable must be None β else a BadDrawable error is generated. π¨
π¨ raw-mode vibe check: bestie,drawableMUST beNone. not optional. not a suggestion.
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 completed documents using the X Print Server job control and submission capabilities.
The printer attribute xp-raw-formats-supported defines the valid values for doc_fmt in this mode. Unsupported values for doc_fmt cause a BadMatch error 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 a BadMatch error to be generated.
If doc_fmt is not in either xp-raw-formats-supported or xp-embedded-formats-supported a BadValue error is generated. π
Depending on the DDX driver implementation in use, XpPutDocumentData might 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 might 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. itβs giving format glow-up, honestly.
There is no limit to the value of data_len. XpPutDocumentData automatically decomposes the call into multiple protocol requests to make sure that the maximum request size of the server is not exceeded. π¦
π¨ DIAGNOSTICS π¨
BadDrawableβ The value specified fordrawableis not valid.BadMatchβ The value specified fordoc_fmtis not valid for the current document type or the value specified for is not valid for the print context and print screen.BadValueβ The value specified fordoc_fmtis not supported.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 (for example,XpPutDocumentDataprior toXpStartDoc).
π SEE ALSO π
XpStartDoc(3Xp)β the see-also bestie. obviously.
π okay thatβs the whole page, bestie. cute little sign-off: X Version 11, libXp 1.0.4 β and yes, the page title energy is XpPutDocumentData(3Xp). periodt. π«Ά
π¦ where this page comes from
- arch rolling: libxp 1.0.4-3 Β· X11 AND X11-distribute-modifications-variant
- nixos 26.05: libxp 1.0.4
- nixpkgs unstable: libxp 1.0.4
- opensuse-leap 16.0: libXp-devel 1.0.4-bp160.1.12 Β· MIT
- opensuse-leap 16.0: libXp-devel 1.0.4-bp160.1.12 Β· MIT
- opensuse-leap 16.0: libXp-devel 1.0.4-bp160.1.12 Β· MIT
- opensuse-leap 16.0: libXp-devel 1.0.4-bp160.1.12 Β· MIT
- Copyright 1996 Hewlett-Packard Company
- Copyright 1996 International Business Machines Corp
- Copyright 1996, 1999, 2004, Oracle and/or its affiliates. All rights reserved
- Copyright 1996 Novell, Inc
- Copyright 1996 Digital Equipment Corp
- Copyright 1996 Fujitsu Limited
- Copyright 1996 Hitachi, Ltd
- Copyright 1996 X Consortium, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms