XpCancelPage(3Xp)
β¨ XpCancelPage π (XPRINT FUNCTIONS, bestie)
okay so real talk β this one lives in the XPRINT FUNCTIONS crew of the X Version 11 manuals, and it's genuinely the "nvm, abort the page" button of the X Print Service. Let's get into it π
πΈ NAME πΈ
XpCancelPage β cancels a print page. that's it, that's the whole vibe. one job, and it ate π
β¨ SYNOPSIS β¨
cc [ flag... ] file... -lXp [ library... ]
#include <X11/extensions/Print.h>
void XpCancelPage ( display, discard )
Display *display;
Bool discard;
like, you compile with -lXp, you pull in <X11/extensions/Print.h>, and then you call it. simple as π¦
π«Ά ARGUMENTS π«Ά
displayβ a pointer to theDisplaystructure, bestie. the one you got back fromXOpenDisplay. yk, the whole "which server am I even talking to" situation.discardβ when it'sTRUE, it means: toss out all thoseXPPrintNotifyevents whose detail isXPEndPageNotify. like, into the void. π³οΈ
π DESCRIPTION π
XpCancelPage cancels an in-progress print page. emphasis on in-progress, okay, it's not doing magic on pages that already finished and left the group chat.
so here's the tea π β if the job was started with output_mode XPGetData, then the data stream to XpGetDocumentData gets interrupted. no further data gets generated for the current page, but data for subsequent pages can still be generated. and listen, for many page description languages, that kind of arbitrary interruption may straight-up invalidate the output. so likeβ¦ be aware, no cap π
if the job was started with output_mode XPSpool, then depending on the driver and spooler implementation, either the entire page may be canceled or a partial page may be generated. it's giving "depends on the implementation" energy, we don't make the rules π«
if discard is True, then all the XPPrintNotify events with a detail field of XPEndPageNotify are discarded before XpCancelPage returns. like, they're gone-gone before the function even comes back. π
and for clients selecting XPPrintMask (see XpSelectInput), the event XPPrintNotify gets generated with its detail field set to XPEndPageNotify when the X Print Server has completed XpCancelPage. so you do get receipts, bestie π
π₯ DIAGNOSTICS π₯
XPBadSequenceβ the function was not called in the proper order with respect to the other X Print Service Extension calls. the example they give:XpStartPagewas called beforeXpStartJob, or it was called for a typeXPDocRawdocument. so like, sequence check said no π
π SEE ALSO π
XpGetDocumentData(3Xp)XpSelectInput(3Xp)XpStartJob(3Xp)XpStartPage(3Xp)
and that's the page, bestie π§ go cancel something responsibly. this was X Version 11, libXp 1.0.4, mwah ππ
π¦ 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