PRINT(4)
π¨οΈ Print β print a document
okay bestie, welcome to the Print(special file) page β the one where we print a document, and yes, itβs giving main-character energy for your printer π¨οΈβ¨
πΈ NAME πΈ
Print β print a document. periodt π
β¨ SYNOPSIS β¨
[file] Print(in mediaType contents,
in boolean inquisitive,
in boolean covert
[in title docName]);
π DESCRIPTION π
okay so the Print request causes the handler to print a document. The handler must act as if the user had issued, via the handler's user interface, either a Print One or Print... command β which one depends on the value of the inquisitive argument. no cap, thatβs the vibe check π«Ά
The contents argument is the contents of the document. If this argument is unset β in other words, it has a value of (char *)0 β then the contents of the document are in the file named in the message's file attribute. The data type (mediaType) of the contents argument should be string, unless nulls are valid in the given media type, in which case the data type must be bytes. lowkey important, bestie π
The inquisitive argument is a boolean value indicating whether the handler is allowed to block on user input while carrying out the request. However, even if inquisitive is True, the handler is not required to seek such input. so it may ask, not must ask β got it? π
The covert argument is a boolean value indicating whether the handler may make itself apparent to the user as it carries out the request. If False, the recipient need not make itself apparent. stealth mode-ish, but make it legal π΅οΈββοΈ
If both the inquisitive argument and the covert argument are True, the recipient should attempt to limit its presence to the minimum needed to receive any user input desired; for example, through iconification. tiny window energy, iconic π
The docName argument contains the name of the document. If the docName argument is absent and the file attribute is set, the file name is considered to be the title of the document. This string would be suitable for display in a window title bar, for example. title-bar-ready, literally π
π οΈ APPLICATION USAGE π οΈ
The ttmedia_ptype_declare(3) function can be used to register for, and help process, this message. slay, registration handled β¨
This message can be sent with the ttmedia_load(3) function. send it, bestie π¨
π EXAMPLES π
To print a PostScript document, the application can send a request of the form:
Print(in PostScript contents,
in boolean inquisitive,
in boolean covert);
with a first argument whose value is a vector of bytes such as:
%!0inch {72 mul} def...
The 0fP in the example represents the newline character. The notation is the same as in the ISO C standard. cute newline notation, no cap π
To print a PostScript document contained in a file, the application can send the Print request as above, with the file attribute set to the relevant file and with the value of the first argument not set. file-based print request, periodt π
π ERRORS π
The ToolTalk service may return one of the following errors in processing the Print request:
TT_DESKTOP_ENOENTβ the file that was alleged to contain the document does not exist.TT_DESKTOP_ENODATAβ the in-modecontentsargument had no value and thefileattribute of the message was not set.TT_MEDIA_ERR_FORMATβ the document is not a valid instance of the media type.
not the error era, but at least you know whatβs up π¨
π¦ SEE ALSO π¦
ttmedia_ptype_declare(3)ttmedia_load(3)IntroStatusrequests
go read those too, iykyk ππ
cute sign-off for the Print(special file) page, bestie β source/version + date footer energy, and thatβs a wrap π«Άπ
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms