DTHELPPRINT(1)
π dthelpprint β the manual, but make it make sense
okay so real talk: the header of this page is dthelpprint(user cmd) β that's the title plus the manual section, and yes it's a user command, and yes we're gonna get into it.
πΈ NAME
dthelpprint β the print utility for DtHelpDialog and DtHelpQuickDialog widgets. that's the whole vibe. it prints help stuff. iconic behavior honestly.
β¨ SYNOPSIS
dthelpprint [options]
π Options
the "what am i even printing" squad:
-helpTypetype β the type of Help data. like, what flavor of help are we dealing with.-helpTypetype β okay so the page lists this one twice (go off king π ) but here's the actual tea: type is a number, andtype = 0(help volume),1(string),2(man page),3(help file).-helpVolumevolume β full path of the Help volume file.-locationIdlocation β name of the Help topic inside the volume.-allTopicsβ print all topics, toc, & index.-subTopicsβ print topiclocationIdand all its subtopics.-oneTopicβ print just the topiclocationId.-tocβ print the Help volume table of contents.-indexβ print the Help volume index.-frontMatterβ print the Help volume front matter.-manPagemanpagename β name of the man page.-stringDatastring β the Help text you actually want printed.-helpFilefilename β file containing the Help text.-topicTitletitle β the title string for the Help text.
ngl there's a weird little tgroup dispwid="6.10in"Caret artifact sitting in the raw source right about here β that's table-formatting goo from the man page itself, not a flag you can pass. ignore her. she's just vibing. π«Ά
the "ok but HOW do we print it" squad:
-printerprintername β which printer to use.-copiesnumber β how many copies to print.-outputFilefilename β write the output to this file instead.-paperSizesize β format the content to this paper size.-paperSizesize β listed twice again (double trouble π) but the full 411: format content to this paper size, where size ={help_papersize_letter|help_papersize_legal|help_papersize_executive|help_papersize_a4|help_papersize_b5}.-displaydisplayname β display to grab resources from.-namename β program name used when getting resources.-classname β class name used when getting resources.-xrmresourcestring β extra resources, sprinkle as needed.
and then, again, the source has a tgroup dispwid="6.14in" table artifact chilling at the bottom of the list. also not a flag. also ignore. π§
π DESCRIPTION
so the dthelpprint utility is a private utility used by DtHelpDialog(3) and DtHelpQuickDialog(3) to print Help information. bestie, read that again: private. it is not a public utility, and no effort to maintain backwards compatibility will be made across versions. like, zero effort. they said it themselves. π« that said, it is sometimes useful to use dthelpprint directly and to configure how it operates, which is why we're all here.
the dthelpprint utility processes help topics and can send the output to a printer or to a specified output file. it's an integral part of the CDE Help System. access to dthelpprint is provided by the dthelpview(1) client's Print dialog, an application's Help window, or through a utility line shell. three doors, same room. β¨
the dthelpprint utility can print plain text strings, plain text files, Unix man pages, and CDE Help volumes. now the important part: CDE Help volumes are printed without any graphics, and there is no indication of missing graphics. so no "oops we lost the image" placeholder β it's just gone, silently. that's the whole rule. π
the standard man(1) and dthelpview(1) search paths are used to find manual pages and CDE Help volumes; Help volumes and files may be specified with an absolute pathname. so yes, you can be absolute about it. main character energy. π
π OPTIONS
the dthelpprint utility has two sets of utility line options. set one controls what should be printed. set two controls how it should be printed. all option names must be used exactly as given β no creative spelling, no vibes-based abbreviations. π
an alternative to specifying options on the utility line is to specify them using resources in an app-defaults file. super useful for changing the default values from the ones given below. see the RESOURCE OVERVIEW heading in this manual page for more info. iykyk.
π₯ Options controlling what to print
-helpTypetype β the type of Help data to print. this is a numeric value, as follows:0=help volume,1=string,2=man page,3=help file. the default value is0, a Help volume. so if you say nothing, you get a volume. periodt.-helpVolumevolume β the name of the volume holding the topics to be printed. if volume is unqualified, the standarddthelpview(1)search paths are used to locate the volume; these are also covered in the ENVIRONMENT VARIABLES heading in this manual page. the volume may also be specified relative to the current directory by beginning the volume name with./or../. β this option is useful only in conjunction with a-helpTypeof0(zero).-locationIdlocation β the starting topic for processing topics of a Help volume. the location must be a text string used by the author to mark a location in the volume. the default value is_hometopic, which is the top topic of a CDE Help volume. π this option is useful only in conjunction with-helpVolume.-allTopicsβ instructsdthelpprintto print the entire help volume, including front matter, table of contents, all topics, and an index. the whole thing. the deluxe package. this option is useful only in conjunction with-helpVolume.-subTopicsβ instructsdthelpprintto print the topic specified by-locationIdand all the subtopics of that topic. it's giving family tree. π³ this option is useful only in conjunction with-helpVolume.-oneTopicβ instructsdthelpprintto print the topic specified by-locationId. just the one. no plus-ones. this option is useful only in conjunction with-helpVolume.-tocβ instructsdthelpprintto print the Table of Contents of the specified helpVolume. this option is useful only in conjunction with-helpVolume.-indexβ instructsdthelpprintto print the Index of the specified helpVolume. this option is useful only in conjunction with-helpVolume.-frontMatterβ instructsdthelpprintto print the front matter of the specified helpVolume. front matter includes the volume title, abstract, and copyright information. π this option is useful only in conjunction with-helpVolume.-stringDatastring β specifies a string to print. this option is useful only in conjunction with a-helpTypeof1.-manPagemanpagename β specifies the name of the Unix man page to print. this option is useful only in conjunction with a-helpTypeof2.-helpFilefilename β specifies a file to print. this option is useful only in conjunction with a-helpTypeof3.
π Options controlling how to print
-printerprintername β specifies which printer to use. if this isn't specified as a utility-line option or resource, the default value is taken from the environment variableLPDEST. π¨οΈ-copiesnumber β specifies how many copies to produce. the default value is1. this option is only ignored when generating an output file.-outputFilefilename β specifies a file to hold the print-ready output. if this option is specified, no output is sent to the printer. like, at all. choose one. π«Ά-paperSizesize β specifies a size of paper to which the output should be formatted. there are five valid values for size:help_papersize_letter,help_papersize_legal,help_papersize_executive,help_papersize_a4,help_papersize_b5. the default value ishelp_papersize_letter. the source lists this option twice, but there are only five sizes, so don't come for me. π-displaydisplayname β specifies the X display used to retrieve resource values. typical format for displayname ishostname:display_number.screen_number. if no screen number is specified, the first screen (0) is used. see alsoX(1). π-namename β specifies the application name under which resources are to be obtained. the default isdthelpprint. the resourceapplication.nameway also be used to specify the name. (yes, that's how it's written in the original β "way", not "may". i'm just the messenger π)-classclassname β specifies the application class name under which resources are to be obtained. the default isdthelpprint. the resourceapplication.classmay also be used to specify the class name.-xrmresourcestring β specifies an addition to the resource database used by this invocation of the program. little extra sprinkle, just for this run. β¨
π¦ RESOURCE OVERVIEW
the dthelpprint utility uses resources in addition to utility-line options to configure its operation. and bestie, there are many more resources available for this purpose than utility-line options. like, a lot more. to set a resource on the utility line, use the -xrm option. π
the application class is dthelpprint unless specified otherwise with the application.class or Application.Class resource or the -class option. the application instance name is the name used to run the program (usually dthelpprint) unless specified otherwise with the application.class or Application.Class resource or the -name option. in the following coverage of resource specifications, the application's class name and instance name can be used interchangably (that spelling is from the original, bestie, don't @ me); however, if the same resource is specified more than once, the instance-specific resource takes precedence over the class resource. and in addition, when a value can be specified using either a resource or a utility-line option, the utility-line option value takes precedence. π hierarchy is real.
the dthelpprint utility has three types of resources.
π Help Content
these resoures (again β original spelling π) specify what to print. typically, these values are specified using utility-line options instead of resources. it's the "why would you" category. π
π Content Processing
these resources specify in more detail the configuration of how to print. these resources include some values that can be specified with utility-line options, but also many others. the overachiever of the three. π
π Printer Configuration:
the dthelpprint utility allows printer-specific configurations to be specified. the configuration used is controlled by the value of the printer resource or -printer option. π¨οΈβ¨
β¨ ok that's chunk one β the resource lists themselves are coming up next, so stay tuned, don't touch that dial π
π HELP CONTENT RESOURCES π
These resources specify what to print. The syntax for specifying the resources is:
Dthelpprint* resource:resource value
For example, Dthelpprint*helpVolume: aVolume.sdl is used to specify the name of the Help volume. Slay, syntax handled.
πΈ Basic Resource Set πΈ
Here's the whole crew, with class/type/default exactly as listed:
locationIdβ Class:LocationId; Type:string; Default:_HOMETOPIChelpVolumeβ Class:HelpVolume; Type:string; Default:NULLmanPageβ Class:ManPage; Type:string; Default:NULLstringDataβ Class:StringData; Type:string; Default:NULLhelpFileβ Class:HelpFile; Type:string; Default:NULLtopicTitleβ Class:TopicTitle; Type:string; Default:NULLhelpTypeβ Class:HelpType; Type:string; Default:NULL
Source-table wiring check: tgroup dispwid="5.39in" β preserved, bestie. Nothing vanishes on my watch.
These Help-content resources are defined in DtHelpDialog(3). The following content options are specific to dthelpprint. Setting the resource to any value makes it True. Any value. Not a vibe check, just facts.
π¦ Additional Resource Set π¦
allTopicsβ Class:AllTopics; Type:string; Default:NULLsubTopicsβ Class:SubTopics; Type:string; Default:NULLoneTopicβ Class:OneTopic; Type:string; Default:NULLtocβ Class:Toc; Type:string; Default:NULLindexβ Class:Index; Type:string; Default:NULLfrontMatterβ Class:FrontMatter; Type:string; Default:NULL
These Help-content resources have the same meaning as the dthelpprint utility-line options of the same name. Same name, same energy.
β¨ HELP PROCESSING RESOURCES β¨
These resources specify how to print. The syntax for specifying the resources is:
Dthelpprint* resource:resource value
For example, Dthelpprint*printer: aPrinter is used to specify the name of the printer. Printer name goes brrr.
π Basic Resource Set π
printerβ Class:Printer; Type:string; Default:NULLcopiesβ Class:Copies; Type:string; Default:NULLoutputFileβ Class:OutputFile; Type:string; Default:NULLpaperSizeβ Class:PaperSize; Type:string; Default:NULLdisplayβ Class:Display; Type:string; Default:NULL
These Help-processing resources have the same meaning as the dthelpprint utility-line options of the same name. It is used to specify the name of the printer. Yes, that's the sentence. I'm keeping it.
π Additional Resource Set π
evenTocHeaderβ Class:EvenTocHeader; Type:string; Default:see belowoddTocHeaderβ Class:OddTocHeader; Type:string; Default:see belowevenTocFooterβ Class:EvenTocFooter; Type:string; Default:see belowoddTocFooterβ Class:OddTocFooter; Type:string; Default:see belowevenBodyHeaderβ Class:EvenBodyHeader; Type:string; Default:see belowoddBodyHeaderβ Class:OddBodyHeader; Type:string; Default:see belowevenBodyFooterβ Class:EvenBodyFooter; Type:string; Default:see belowoddBodyFooterβ Class:OddBodyFooter; Type:string; Default:see belowevenIndexHeaderβ Class:EvenIndexHeader; Type:string; Default:see belowoddIndexHeaderβ Class:OddIndexHeader; Type:string; Default:see belowevenIndexFooterβ Class:EvenIndexFooter; Type:string; Default:see belowoddIndexFooterβ Class:OddIndexFooter; Type:string; Default:see belowechoCommandβ Class:EchoCommand; Type:string; Default:echoechoArgsβ Class:EchoArgs; Type:string; Default:"%s"foldCommandβ Class:FoldCommand; Type:string; Default:foldfoldArgsβ Class:FoldArgs; Type:string; Default:-w %d %sprCommandβ Class:PrCommand; Type:string; Default:prprArgsβ Class:PrArgs; Type:string; Default:see belowprOffsetArgβ Class:PrOffsetArg; Type:string; Default:-o%dmanCommandβ Class:ManCommand; Type:string; Default:manmanArgsβ Class:ManArgs; Type:string; Default:%sredirectCmdAndArgsβ Class:RedirectCmdAndArgs; Type:string; Default:> %slpCommandβ Class:LpCommand; Type:string; Default:lpshCommandβ Class:ShCommand; Type:string; Default:see belowiconvCmdAndArgsβ Class:IconvCmdAndArgs; Type:string; Default:see below
Source-table wiring check: the raw page also carriestgroup dispwid="6.46in"andtgroup dispwid="6.85in", and it repeats those header/footer names in four columns:evenTocHeader,oddTocHeader,evenTocFooter,oddTocFooter;evenBodyHeader,oddBodyHeader,evenBodyFooter,oddBodyFooter;evenIndexHeader,oddIndexHeader,evenIndexFooter,oddIndexFooter. Same twelve icons, different table crumbs. Preserved.
The values of these resources are used as the header and footer strings only when printing Help volumes. Header and footer strings are specified separately for odd and even pages to support double sided printing. The strings may contain symbolic names for dynamic values.
Dynamic values are updated each time the string is to be used. Valid dynamic values are as follows:
$LMARGINβ left margin blanks.$TODAYβ today's date.$VOLDATEβ date on the help volume file.$VOLUMEβ volume name.$VOLUMEFILLβ filler for fixed sized 50 column volume name.$TOPICβ section topic title.$TOPICFILLβ filler for fixed sized 50 column section topic title.$PAGENUMβ page number.$PAGENUMFILLβ filler for fixed sized 3 column page number.$SECTNUMβ section number or name.$SECTNUMFILLβ filler for fixed sized 8 column section number or name.
The default values for the resources are as follows. To improve understanding, the blank spaces have been replaced with .:
evenTocHeader and oddTocHeader:
$LMARGIN....$VOLUME
evenTocFooter and oddTocFooter:
0LMARGIN...$SECTNUM
evenBodyHeader and oddBodyHeader:
$LMARGIN$VOLUME$VOLUMEFILL....$PAGENUMFILLPage.$PAGENUMn
evenBodyFooter and oddBodyFooter:
0LMARGIN$TOPIC$TOPICFILL.....$SECTNUMFILLSection.$SECTNUM
evenIndexHeader and oddIndexHeader:
$LMARGIN$VOLUME$VOLUMEFILL.....$PAGENUMFILLPage.$PAGENUM
evenIndexFooter and oddIndexFooter:
0LMARGIN.......$SECTNUM
And yes, that is 0LMARGIN with a zero in the footer defaults β I am not "fixing" it, bestie. Character-for-character.
echoCommandβ The utility used to echo thestringDatafrom stdin to stdout.echoArgsβ The argument string to theechoCommand. The string must use printf formatting and may reference this argument:STRINGstring.foldCommandβ The utility used to fold a long string into a formatted string with a maximum column width.foldArgsβ The argument string to thefoldCommand. The string must use printf formatting and may reference these arguments:INTcolumn width,STRINGfilename.prCommandβ The utility used to format a file in preparation for printing.prArgsβ The argument string to theprCommand. The string must use printf formatting and may reference these arguments:STRINGjob title,INTpage height,STRINGfilename. The default value is-h %s -f -l%d %s".prOffsetArgβ Sometimes theprArgsis augmented with the option to offset the contents by n columns. The value contains the offset argument. The string must use printf formatting and may reference this argument:INTcolumn-offset.manCommandβ The utility used to recover a formatted Unix man page.manArgsβ The argument string to themanCommand. The string must use printf formatting and may reference these arguments:STRINGman-page-name.redirectCmdAndArgsβ When stdout is to be redirected to a file, this utility and arguments are used. The string must use printf formatting and may reference these arguments:STRINGfilename.lpCommandβ The utility is used to print a file. The utility must accept the standardlp(1)utility-line arguments.shCommandβ The shell script used bydthelpprintto actually invoke thelpCommandon the target file. The default value is/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/bin/dthelpprint.sh.iconvCmdAndArgsβ The utility is used to translate a file from one character set to another. The argument string must use printf formatting and may reference these arguments:STRINGfrom-charset,STRINGto-charset,STRINGsource-file,STRINGdest-file. The default value isiconv -f %s -t %s %s > %s.
π PRINTER CONFIGURATION RESOURCES π
These resources are literally all about printer configuration, bestie β both the default setup and the per-printer setups. The syntax for specifying them is:
Dthelpprint*printer. resource:resource value
Dthelpprint*printer.printerName.resource :resource value
For example, these two:
Dthelpprint*printer.paperSize: help_papersize_legal
Dthelpprint*printer.laser-c4.paperSize: help_papersize_executive
set the default paper size to legal and the paper size on the printer named "laser-c4" to executive. Slay π
π Basic Resource Set π
paperSizeβ classPaperSize, typeString, defaulthelp_papersize_lettercolsWidthβ classColsWidth, typeint, default0rowsHeightβ classRowsHeight, typeint, default0colsLeftMarginβ classColsLeftMargin, typeint, default10colsRightMarginβ classColsRightMargin, typeint, default10rowsTopMarginβ classRowsTopMargin, typeint, default6rowsBottomMarginβ classRowsBottomMargin, typeint, default6
These resources configure the printer, especially the paper situation. You can set paper size with the paperSize resource, or go explicit with colsWidth and rowsHeight. The margin values are the amount of white space kept around the page. Very demure, very mindful π
paperSizeβ sets the paper size to predefined dimensions. Valid values are:help_papersize_letterβ 8.5 x 11 in; 69 rows x 91 colshelp_papersize_legalβ 8.5 x 14 in; 88 rows x 91 colshelp_papersize_executiveβ 7.25 x 10.5 in, 66 rows x 77 colshelp_papersize_a4β 210 x 297 mm, 73 rows x 88 colshelp_papersize_b5β 182 x 257 mm, 63 rows x 76 cols
If those dimensions aren't enough, use colsWidth and rowsHeight to provide explicit dimensions. All dimensions are in columns and rows of text in the default printer font. No cap β¨
colsWidthβ width of the paper in columns of characters in the default printer font. The value may not be0(zero).rowsHeightβ height of the paper in rows of text in the default printer font. The value may not be0(zero).colsLeftMarginβ width of the left margin in columns of characters in the default printer font.colsRightMarginβ width of the right margin in columns of characters in the default printer font.rowsTopMarginβ height of the top margin in rows of text in the default printer font.rowsBottomMarginβ height of the bottom margin in rows of text in the default printer font.
πΈ ENVIRONMENT VARIABLES πΈ
The CDE Help system uses two environment variables for locating Help volume files within the desktop environment:
DTHELPSEARCHPATHβ system search path environment variable for locating Help volumes on local and/or remote nfs mounted systems.DTHELPUSERSEARCHPATHβ user's search path environment variable for locating user-specific Help volumes on local and/or remote nfs mounted systems.
Refer to DtHelpDialog(3) or DtHelpQuickDialog(3) for info on setting the DTHELP environment variables. iykyk π¦
π¦ INPUT FILES π¦
These input files and resource databases are merged by dthelpprint to construct the complete resource database used by the program. Resource collisions are resolved by having the last value take precedence. Last one wins, periodt π
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/app-defaults/C/Dthelpprint/usr/lib/X11/app-defaults/Dthelpprint$HOME/Dthelpprint- display resources or
$HOME/.Xdefaults - screen resources
$XENVIRONMENTor$HOME/.Xdefaults-&<hostname>- utility-line resources
π OUTPUT FILES π
The dthelpprint utility always generates an output file β either for sending to the printer or for placing in a user-specified file. It's giving "there will be output, bestie" β¨
$HOME/.dt/tmp/phlp&<process id>_&<cnt>.txtβ these are the temporary files generated by thedthelpprintutility. They're placed under the user's directory so remote systems can reach the file via NFS.$PWD/db.dthelpprintβ this file is generated in the current directory when thedebugHelpPrintresource is defined. It contains the complete set of resources used bydthelpprintto configure its operation.
π Warning Messages π
Ngl, the source text drops a literal 10 after some quoted messages, so I'm leaving it in. No details lost, okay? π«Ά
Warning: Illegal or missing paper size. help_papersize_letter used." 10β indicates an invalid or missing value of thepaperSizeresource or-paperSizeoption. Specify the option on the utility line or set a default resource value.Warning: Missing paper size and height and/or width. help_papersize_letter used." 10β indicates that theprinter.colsWidthorprinter.rowsHeightresource was used to override thepaperSizeresource and at least one is set to0(zero) or has an invalid value.Warning: Unable to open display &<display>β indicates that the display specified by the display resource or-displayoption could not be opened. This means the display's resources cannot be used to configuredthelpprint.
π Error Messages π
Same 10 situation in some of these too β kept it visible, bestie π
Error: helpType is topic, but no helpVolume specified.β indicates that thehelpTyperesource or-helpTypeoption was0(zero) or unspecified and defaulted to0(zero) and nohelpVolumewas specified.Error: unable to locate help volume &<volume>β indicates that the Help volume could not be found. This occurs when the volume isn't correctly specified by a full or relative path, or doesn't exist in any directory listed by theDtHelpenvironment variables.Error: problem processing help volume &<volume>β a problem occurred while processing some part of the Help volume.Error: memory allocation failedβ the program was unable to allocate necessary memory.Error: unable to get topic information:volume &<vol>, locationId &<loc>" 10β information about the specified location in the specified volume was unavailable or an error occurred while retrieving it from the volume.Error: helpType is string, but no stringData specified." 10β thehelpTyperesource or-helpTypeoption is1(string) but nostringDataresource or-stringDataoption was specified.Error: helpType is dynamic string, but no stringData specified." 10β thehelpTyperesource or-helpTypeoption is1(dynamic string) but nostringDataresource or-stringDataoption was specified.Error: helpType is man page, but no manPage specified.β thehelpTyperesource or-helpTypeoption is2(manual page) but nomanPageresource or-manPageoption was specified.Error: helpType is file, but no helpFile specified.β thehelpTyperesource or-helpTypeoption is3(plain text file) but nohelpFileresource or-helpFileoption was specified.Error: Illegal helpType &<number>.β thehelpTyperesource or-helpTypeoption is not in the range0to3.Error: unable to allocate memory for temporary file" 10β the memory needed to create the temporary file name couldn't be allocated.Error: unable to open temporary fileβ the temporary file couldn't be opened for writing.
π₯ EXAMPLES π₯
Run 'em exactly like this, bestie:
dthelpprint -helpVolume Help4Help -allTopics -outputFile Help4Help.asc
dthelpprint -helpVolume Help4Help -toc -index -printer hplj3
dthelpprint -helpType 1 -stringData 'test string' -printer hplj3
dthelpprint -helpType 2 -manPage grep -outputFile grep.man
dthelpprint -helpType 3 -helpFile aFile -printer hplj3
π SEE ALSO π
DtHelpDialog(3)DtHelpQuickDialog(3)dthelpview(1)man(1)- CDE Help System Author's and Programmer's Guide
xoxo, the dthelpprint(user cmd) page π
π«Ά β official footer stamp included; the source/version + date live in that footer, and I'm not out here inventing extra ones, bestie β¨
π¦ 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