1 .TH GROPDF @MAN1EXT@ "@MDATE@" "groff @VERSION@"
3 gropdf \- PDF driver for groff
6 .\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
11 .\" ====================================================================
13 .\" ====================================================================
15 .\" Copyright (C) 2011-2018 Free Software Foundation, Inc.
17 .\" Permission is granted to make and distribute verbatim copies of this
18 .\" manual provided the copyright notice and this permission notice are
19 .\" preserved on all copies.
21 .\" Permission is granted to copy and distribute modified versions of
22 .\" this manual under the conditions for verbatim copying, provided that
23 .\" the entire resulting derived work is distributed under the terms of
24 .\" a permission notice identical to this one.
26 .\" Permission is granted to copy and distribute translations of this
27 .\" manual into another language, under the above conditions for
28 .\" modified versions, except that this permission notice may be
29 .\" included in translations approved by the Free Software Foundation
30 .\" instead of in the original English.
34 . if '\\*(.T'ps' .ft \\$1
35 . if '\\*(.T'pdf' .ft \\$1
38 .\" ====================================================================
40 .\" ====================================================================
61 .\" ====================================================================
63 .\" ====================================================================
66 translates the output of GNU
72 should be invoked by using the groff command
77 If no files are given,
79 reads the standard input.
85 to read the standard input.
87 PDF output is written to the standard output.
93 options can be passed to
102 See section \[lq]Font Installation\[rq] below for a guide how to install
107 .\" ====================================================================
109 .\" ====================================================================
111 Whitespace is permitted between a command-line option and its argument.
116 Include debug information as comments within the PDF.
118 Also produces an uncompressed PDF.
127 fonts (even the 14 base PDF fonts).
134 to the search path for font, and device description files;
136 is the name of the device, usually
141 This option may be used to add a directory to the search path for
143 .B \[rs]X'pdf: pdfpic'
146 The current directory is always searched first.
148 This option may be specified more than once; the directories are then
149 searched in the order specified.
152 No directory search is performed for files with an absolute file name.
156 Orient the document in landscape format.
159 .BI \-p " paper-size"
160 Set physical dimension of output medium.
169 file; it accepts the same arguments as the
174 .BR groff_font (@MAN5EXT@)
180 Append a comment line to end of PDF showing statistics,
181 i.e.\& number of pages in document.
185 complains about this line if it is included, but works anyway.
192 normally includes a ToUnicode CMap with any font created using
194 as the encoding file,
195 this makes it easier to search for words which contain ligatures.
197 You can include your own CMap by specifying a
199 or have no CMap at all by omitting the argument.
206 Print the version number and exit.
211 .\" Lines should be drawn using a thickness of
213 .\" thousandths of an em.
215 .\" If this option is not given, the line thickness defaults to 0.04\~em.
220 Set the foundry to use for selecting fonts of the same name.
223 .\" ====================================================================
225 .\" ====================================================================
229 must be in the format output by
230 .BR @g@troff (@MAN1EXT@).
233 .BR groff_out (@MAN5EXT@).
237 In addition, the device and font description files for the device used
238 must meet certain requirements:
240 The resolution must be an integer multiple of\~72 times the
245 device uses a resolution of 72000 and a sizescale of 1000.
249 The device description file must contain a valid paper size; see
250 .BR groff_font (@MAN5EXT@)
251 for more information.
254 uses the same Type\~1 Adobe PostScript fonts as the
258 Although the PDF Standard allows the use of other font types (like
259 TrueType) this implementation only accepts the Type\~1 PostScript
262 Fewer Type\~1 fonts are supported natively in PDF documents than the
263 standard 35 fonts supported by
265 and all PostScript printers, but all the fonts are available since any
266 which aren't supported natively are automatically embedded in the
272 supports the concept of foundries, that is different versions of basically
277 file controls where fonts are found and builds
279 fonts from the files it discovers on your system.
283 Each font description file must contain a command
286 .BI internalname\ psname
289 which says that the PostScript name of the font is
294 and blank lines are ignored.
296 The code for each character given in the font file must correspond
297 to the code in the default encoding for the font.
299 This code can be used with the
303 to select the character,
304 even if the character does not have a groff name.
306 Every character in the font file must exist in the PostScript font, and
307 the widths given in the font file must match the widths used
308 in the PostScript font.
314 is currently only able to display the first 256 glyphs in any font.
315 This restriction will be lifted in a later version.
321 .\" is able to display all glyphs in a PostScript font, not only 256.
323 .\" (or the default encoding if no encoding file specified) just defines the
324 .\" order of glyphs for the first 256 characters; all other glyphs are
325 .\" accessed with additional encoding vectors which
327 .\" produces on the fly.
332 can automatically include the downloadable fonts necessary
333 to print the document.
335 Fonts may be in PFA or PFB format.
338 Any downloadable fonts which should, when required, be included by
340 must be listed in the file
341 .IR @FONTDIR@/devpdf/download ;
342 this should consist of lines of the form
346 foundry font filename
351 is the foundry name or blank for the default foundry.
354 is the PostScript name of the font,
357 is the name of the file containing the font;
360 and blank lines are ignored;
361 fields must be separated by tabs
366 is searched for using the same mechanism that is used
367 for groff font metric files.
371 file itself is also searched for using this mechanism;
372 currently, only the first found file in the font path is used.
374 Foundry names are usually a single character (such as \[oq]U\[cq] for
375 the URW Foundry) or blank for the default foundry.
377 This default uses the same fonts as
379 uses when it embeds fonts in a PDF file.
383 In the default setup there are styles called
389 mounted at font positions 1 to\~4.
391 The fonts are grouped into families
401 having members in each of these styles:
413 AvantGarde-BookOblique
425 AvantGarde-DemiOblique
497 Helvetica-BoldOblique
509 Helvetica-Narrow-Oblique
515 Helvetica-Narrow-Bold
521 Helvetica-Narrow-BoldOblique
527 NewCenturySchlbk-Roman
533 NewCenturySchlbk-Italic
539 NewCenturySchlbk-Bold
545 NewCenturySchlbk-BoldItalic
599 There is also the following font which is not a member of a family:
605 ZapfChancery-MediumItalic
611 There are also some special fonts called
613 for the PS Symbol font.
615 The lower case greek characters are automatically slanted (to match
616 the SymbolSlanted font (SS) available to PostScript).
618 Zapf Dingbats is available as
620 the "hand pointing left" glyph (\[rs][lh]) is available since it has
621 been defined using the \[rs]X'pdf: xrev' extension which reverses the
622 direction of letters within words.
626 The default color for
634 understands some of the X\~commands produced using the
636 escape sequences supported by
638 Specifically, the following is supported.
641 .B "\[rs]X'ps: invis'"
645 .B "\[rs]X'ps: endinvis'"
646 Stop suppressing output.
649 .B "\[rs]X'ps: exec gsave currentpoint 2 copy translate \fIn\fP rotate neg exch neg exch translate'"
652 is the angle of rotation.
653 This is to support the
659 .B "\[rs]X'ps: exec grestore'"
662 to restore after rotation.
665 .BI "\[rs]X'ps: exec " "n " "setlinejoin'"
668 can be one of the following values.
677 .BI "\[rs]X'ps: exec " "n " "setlinecap'"
680 can be one of the following values.
686 2 = Projecting square cap
691 .B "\[rs]X'ps: ... pdfmark'"
694 macros installed by using
698 (see documentation in
701 A subset of these macros are installed automatically when you use
703 so you should not need to use \[oq]\-m pdfmark\[cq] for using most of
704 the PDF functionality.
708 also supports a subset of the commands introduced in present.tmac.
709 Specifically it supports:-
718 Which allows you to create presentation type PDFs.
720 commands are already available in other macro packages.
722 These commands are implemented with
727 .B "\[rs]X'ps: exec %%%%PAUSE"
728 The section before this is treated as a block and is introduced using the
729 current BLOCK transition setting (see \[oq]pdf: transition\[cq] below).
731 can be introduced using the macro
734 .B "\[rs]X'ps: exec %%%%BEGINONCE"
735 Any text following this command (up to %%%%ENDONCE) is shown only once,
736 the next %%%%PAUSE will remove it.
737 If producing a non presentation pdf, i.e.\&
738 ignoring the pauses, see
740 below, this text is ignored.
743 .B "\[rs]X'ps: exec %%%%ENDONCE"
744 This terminates the block defined by %%%%BEGINONCE.
745 This pair of commands
746 is what implements the .BLOCKS Once/.BLOCKE commands in present.tmac.
750 macro set already has integration with these extensions so you can build
754 If you use present.tmac with
756 there is no need to run the program
757 .BR presentps (@MAN1EXT@)
758 since the output will already be a presentation pdf.
762 tags are silently ignored.
768 special used by the DVI driver is also recognised:
771 .BI \[rs]X'papersize= paper-size '
774 parameter is the same as the
779 .BR groff_font (@MAN5EXT@)
782 This means that you can alter the page size at will within the PDF file
786 If you do want to change the paper size, it must be done before you start
792 supports its own suite of
796 The following tags are supported:
799 .BI "\[rs]X'pdf: pdfpic " "file alignment width height line-length" '
800 Place an image of the specified
802 containing the PDF drawing from file
810 is missing or zero then it is scaled proportionally).
816 the drawing is left aligned.
824 greater than the width of the drawing is required as well.
828 is specified as zero then the width is scaled in proportion to the height.
832 .\" .BR groff_tmac (@MAN7EXT@)
833 .\" for a description of the
835 .\" macro which provides a convenient high-level interface for inclusion of
836 .\" PostScript graphics.
840 This toggles a flag which reverses the direction of printing
841 .IR "letter by letter" ,
842 i.e., each separate letter is reversed, not the entire word.
844 This is useful for reversing the direction of glyphs in the Dingbats font.
846 To return to normal printing repeat the command again.
849 .BI "\[rs]X'pdf: markstart " "/ANN definition" '
850 The macros which support PDF Bookmarks use this call internally to
851 start the definition of bookmark hotspot (user will have called
852 \[oq].pdfhref\~L\[cq] with the text which will become the \[oq]hot
855 Normally this is never used except from within the pdfmark macros.
858 .B \[rs]X'pdf: markend'
859 The macros which support PDF Bookmarks use this call internally to
860 stop the definition of bookmark hotspot (user will have called
861 \[oq].pdfhref\~L\[cq] with the text which will become the \[oq]hot
864 Normally this is never used except from within the pdfmark macros.
867 .B \[rs]X'pdf: marksuspend'
869 .B \[rs]X'pdf: markrestart'
870 If you are using page traps to produce headings, footings, etc., you
871 need to use these in case a \[oq]hot spot\[cq] crosses a page
872 boundary, otherwise any text output by the heading or footing macro
873 will be marked as part of the \[oq]hot spot\[cq].
875 To stop this happening just place \[oq].pdfmarksuspend\[cq] and
876 \[oq].pdfmarkrestart\[cq] at the start and end of the page trap macro,
879 (These are just convenience macros which emit the \[rs]X code.
881 These macros must only be used within page traps.)
884 .BR "\[rs]X'pdf: transition'" "feature mode duration dimension motion direction scale bool"
888 can be either SLIDE or BLOCK.
889 When it is SLIDE the transition is used
890 when a new slide is introduced to the screen, if BLOCK then this transition
891 is used for the individual blocks which make up the slide.
894 is the transition type between slides:-
898 - Two lines sweep across the screen, revealing the new page.
900 may be either horizontal or vertical and may move inward from the
901 edges of the page or outward from the center, as specified by the
905 entries, respectively.
908 - Multiple lines, evenly spaced across the screen, synchronously
909 sweep in the same direction to reveal the new page.
911 either horizontal or vertical, as specified by the
915 lines move downward; vertical lines move to the right.
918 - A rectangular box sweeps inward from the edges of the page or
919 outward from the center, as specified by the
921 entry, revealing the new page.
924 - A single line sweeps across the screen from one edge to the other in
925 the direction specified by the
927 entry, revealing the new page.
930 - The old page dissolves gradually to reveal the new one.
933 - Similar to Dissolve, except that the effect sweeps across the page in a
934 wide band moving from one side of the screen to the other in the
935 direction specified by the
940 - The new page simply replaces the old one with no special transition
943 entry shall be ignored.
946 - (PDF 1.5) Changes are flown out or in (as specified by
949 direction specified by
951 to or from a location that is offscreen except
958 - (PDF 1.5) The old page slides off the screen while the new page
959 slides in, pushing the old page out in the direction specified by
963 - (PDF 1.5) The new page slides on to the screen in the direction
966 covering the old page.
969 - (PDF 1.5) The old page slides off the screen in the direction
972 uncovering the new page in the direction
977 - (PDF 1.5) The new page gradually becomes visible through the
983 is the length of the transition in seconds (default 1).
988 .BR Split " and " Blinds
989 transition styles only) The dimension in which the
990 specified transition effect shall occur:
1001 transition styles only) The direction of motion for
1002 the specified transition effect:
1004 Inward from the edges of the page, or
1006 Outward from the center of the page.
1015 .BR Uncover " and " Push
1016 transition styles only)
1017 The direction in which the specified transition effect shall moves, expressed in
1018 degrees counterclockwise starting from a left-to-right direction.
1019 If the value is a number, it shall be one of:
1023 = Bottom to top (Wipe only),
1025 = Right to left (Wipe only),
1029 = Top-left to bottom-right (Glitter only)
1032 which is relevant only for the
1034 transition when the value of
1042 transition style only) The starting or ending scale at
1043 which the changes shall be drawn.
1046 specifies an inward transition, the scale
1047 of the changes drawn shall progress from
1049 to 1.0 over the course of the
1053 specifies an outward transition, the scale of the changes drawn
1054 shall progress from 1.0 to
1056 over the course of the transition
1062 transition style only) If
1064 the area that shall be flown
1065 in is rectangular and opaque.
1068 This command can be used by calling the macro
1070 using the parameters described above.
1071 Any of the parameters may be
1072 replaced with a "." which signifies the parameter retains its
1073 previous value, also any trailing missing parameters are ignored.
1077 not all PDF Readers support any or all these transitions.
1080 .\" ====================================================================
1081 .SS Importing graphics
1082 .\" ====================================================================
1085 only supports importing other PDF files as graphics.
1087 But that PDF file may contain any of the graphic formats supported by
1088 the PDF standard (such as JPEG, PNG, GIF, etc.).
1090 So any application which outputs PDF can be used as an embedded file
1094 The PDF file you wish to insert must be a single page and the drawing
1095 must just fit inside the media size of the PDF file.
1101 (for example) make sure the canvas size just fits the image.
1105 The PDF parser used in
1107 has not been rigorously tested with all possible applications which
1110 If you find a single page PDF which fails to import properly, it is
1111 worth running it through the
1114 program by issuing the command:
1129 will now load successfully.
1132 .\" ====================================================================
1133 .SS TrueType and other font formats
1134 .\" ====================================================================
1137 does not support any other fonts except Adobe Type 1 (PFA or PFB).
1140 .\" ====================================================================
1141 .SH FONT INSTALLATION
1142 .\" ====================================================================
1144 This section gives a summary of the above explanations; it can serve
1145 as a step-by-step font installation guide for
1151 \h'-\w'\*[BU]'u'\*[BU]\c
1154 Convert your font to something groff understands.
1156 This is either a PostScript Type\~1 font in either PFA or PFB,
1157 together with an AFM file.
1160 The very first line in a PFA/PFB file contains this:
1164 .B %!PS\-AdobeFont\-1.0:
1168 A PFB file has this also in the first line, but the string is
1169 preceded with some binary bytes.
1172 Convert the AFM file to a groff font description file with the
1173 .BR \%afmtodit (@MAN1EXT@)
1180 afmtodit Foo\-Bar\-Bold.afm map/textmap FBB
1184 which converts the metric file \[oq]Foo\-Bar\-Bold.afm\[cq] to the groff
1187 If you have a font family which comes with normal, bold, italic, and
1188 bold italic faces, it is recommended to use the letters
1194 respectively, as postfixes in the groff font names to make groff's
1195 \[oq].fam\[cq] request work.
1197 An example is groff's built-in Times-Roman font: The font family
1200 and the groff font names are
1208 Install both the groff font description files and the fonts in a
1209 \[oq]devpdf\[cq] subdirectory of the font path which groff finds.
1211 See section \[lq]Environment\[rq] in
1212 .BR @g@troff (@MAN1EXT@)
1213 for the actual value of the font path.
1215 Note that groff doesn't use the AFM files (but it is a good idea to
1219 Register all fonts which must be downloaded to the printer in the
1223 Only the first occurrence of this file in the font path is read.
1225 This means that you should copy the default
1227 file to the first directory in your font path and add your fonts there.
1229 To continue the above example we assume that the PS font name for
1230 Foo\-Bar\-Bold.pfa is \[oq]XY\-Foo\-Bar\-Bold\[cq] (the PS font name is
1235 file) and belongs to foundry \[oq]F\[cq]
1236 thus the following line should be added to
1241 .B F XY\-Foo\-Bar\-Bold Foo\-Bar\-Bold.pfa
1245 Use a tab character to separate the fields, and the \[oq]foundry\[cq]
1246 field should be null for the default foundry.
1250 .\" ====================================================================
1252 .\" ====================================================================
1256 A list of directories in which to search for the
1258 directory in addition to the default ones.
1263 the font file has been specified with a full path,
1264 no directories are searched.
1267 .BR @g@troff (@MAN1EXT@)
1269 .BR \%groff_font (@MAN5EXT@)
1275 If this is set true,
1277 will ignore all commands which produce a presentation pdf,
1278 and produce a normal pdf instead.
1280 .I SOURCE_DATE_EPOCH
1281 A timestamp (expressed as seconds since the Unix epoch) to use as the
1282 creation timestamp in place of the current time.
1285 .\" ====================================================================
1287 .\" ====================================================================
1290 .I @FONTDIR@/devpdf/DESC
1291 Device description file.
1294 .IR @FONTDIR@/devpdf/ F
1295 Font description file for font\~\c
1299 .IR @FONTDIR@/devpdf/ U\-F
1300 Font description file for font\~\c
1304 rather than the default foundry).
1307 .I @FONTDIR@/devpdf/download
1308 List of downloadable fonts.
1311 .I @FONTDIR@/devpdf/Foundry
1312 A Perl script used during install to locate suitable fonts.
1315 .I @FONTDIR@/devpdf/enc/text.enc
1316 Encoding used for text fonts.
1319 .I @MACRODIR@/pdf.tmac
1322 automatically loaded by
1326 .\" .B @MACRODIR@/pspic.tmac
1330 .\" automatically loaded by
1335 .\" ====================================================================
1337 .\" ====================================================================
1339 .BR \%afmtodit (@MAN1EXT@),
1340 .BR groff (@MAN1EXT@),
1341 .BR @g@troff (@MAN1EXT@),
1342 .BR \%groff_font (@MAN5EXT@),
1343 .BR \%groff_out (@MAN5EXT@)
1344 .\" Not actually referenced in above discussion.
1345 .\" .BR \%pfbtops (@MAN1EXT@),
1346 .\" .BR \%groff_tmac (@MAN5EXT@),
1349 .\" Restore compatibility mode (for, e.g., Solaris 10/11).
1353 .\" Local Variables:
1356 .\" vim: set filetype=groff: