2 .TH GROPDF @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
4 gropdf \- PDF driver for groff
9 Copyright \[co] 2011-2014 Free Software Foundation, Inc.
11 Permission is granted to make and distribute verbatim copies of
12 this manual provided the copyright notice and this permission notice
13 are preserved on all copies.
15 Permission is granted to copy and distribute modified versions of this
16 manual under the conditions for verbatim copying, provided that the
17 entire resulting derived work is distributed under the terms of a
18 permission notice identical to this one.
20 Permission is granted to copy and distribute translations of this
21 manual into another language, under the above conditions for modified
22 versions, except that this permission notice may be included in
23 translations approved by the Free Software Foundation instead of in
27 .\" Like TP, but if specified indent is more than half
28 .\" the current line-length - indent, use the default indent.
30 . ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
35 . if '\\*(.T'ps' .ft \\$1
36 . if '\\*(.T'pdf' .ft \\$1
39 .\" --------------------------------------------------------------------
41 .\" --------------------------------------------------------------------
57 It is possible to have whitespace between a command line option and its
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
104 below for a guide how to install fonts for
108 .\" --------------------------------------------------------------------
110 .\" --------------------------------------------------------------------
114 Include debug information as comments within the PDF.
116 Also produces an uncompressed PDF.
120 Force all fonts to be embedded in the PDF.
126 to the search path for font, and device description files;
128 is the name of the device, usually
133 .\" This option may be used to add a directory to the search path for
134 .\" files on the command line and files named in
135 .\" .B \[rs]X'ps: import'
137 .\" .B \[rs]X'ps: file'
140 .\" The search path is initialized with the current directory.
142 .\" This option may be specified more than once; the directories are then
143 .\" searched in the order specified (but before the current directory).
145 .\" If you want to make the current directory be read before other directories,
148 .\" at the appropriate place.
151 .\" No directory search is performed for files with an absolute file name.
157 Print the document in landscape format.
161 Set physical dimension of output medium.
170 file; it accepts the same arguments as the
175 .B groff_font (@MAN5EXT@)
180 .\" Lines should be drawn using a thickness of
182 .\" thousandths of an em.
184 .\" If this option is not given, the line thickness defaults to 0.04\~em.
189 Print the version number.
193 Set the foundry to use for selecting fonts of the same name.
199 to embed ALL fonts (even the 14 base PDF fonts).
203 Append a comment line to end of PDF showing statistics,
204 i.e.\& number of pages in document.
208 complains about this line if it is included, but works anyway.
215 normally includes a ToUnicode CMap with any font created using
217 as the encoding file,
218 this makes it easier to search for words which contain ligatures.
220 You can include your own CMap by specifying a
222 or have no CMap at all by omitting the argument.
225 .\" --------------------------------------------------------------------
227 .\" --------------------------------------------------------------------
231 must be in the format output by
232 .BR @g@troff (@MAN1EXT@).
235 .BR groff_out (@MAN5EXT@).
239 In addition, the device and font description files for the device used
240 must meet certain requirements:
242 The resolution must be an integer multiple of\~72 times the
247 device uses a resolution of 72000 and a sizescale of 1000.
251 The device description file must contain a valid paper size; see
252 .BR groff_font (@MAN5EXT@)
253 for more information.
256 uses the same Type\~1 Adobe postscript fonts as the
260 Although the PDF Standard allows the use of other font types (like
261 TrueType) this implementation only accepts the Type\~1 postscript
264 Fewer Type\~1 fonts are supported natively in PDF documents than the
265 standard 35 fonts supported by
267 and all postscript printers, but all the fonts are available since any
268 which aren\[aq]t supported natively are automatically embedded in the
274 supports the concept of foundries, that is different versions of basically
279 file controls where fonts are found and builds
281 fonts from the files it discovers on your system.
285 Each font description file must contain a command
288 .BI internalname\ psname
291 which says that the PostScript name of the font is
296 and blank lines are ignored.
298 The code for each character given in the font file must correspond
299 to the code in the default encoding for the font.
301 This code can be used with the
305 to select the character,
306 even if the character does not have a groff name.
308 Every character in the font file must exist in the PostScript font, and
309 the widths given in the font file must match the widths used
310 in the PostScript font.
316 is currently only able to display the first 256 glyphs in any font.
317 This restriction will be lifted in a later version.
323 .\" is able to display all glyphs in a PostScript font, not only 256.
325 .\" (or the default encoding if no encoding file specified) just defines the
326 .\" order of glyphs for the first 256 characters; all other glyphs are
327 .\" accessed with additional encoding vectors which
329 .\" produces on the fly.
334 can automatically include the downloadable fonts necessary
335 to print the document.
337 Fonts may be in PFA or PFB format.
340 Any downloadable fonts which should, when required, be included by
342 must be listed in the file
343 .BR @FONTDIR@/devpdf/download ;
344 this should consist of lines of the form
348 foundry font filename
353 is the foundry name or blank for the default foundry.
356 is the PostScript name of the font,
359 is the name of the file containing the font;
362 and blank lines are ignored;
363 fields must be separated by tabs
368 is searched for using the same mechanism that is used
369 for groff font metric files.
373 file itself is also searched for using this mechanism;
374 currently, only the first found file in the font path is used.
376 Foundry names are usually a single character (such as \[oq]U\[cq] for
377 the URW Foundry) or blank for the default foundry.
379 This default uses the same fonts as
381 uses when it embeds fonts in a PDF file.
385 In the default setup there are styles called
391 mounted at font positions 1 to\~4.
393 The fonts are grouped into families
403 having members in each of these styles:
415 AvantGarde-BookOblique
427 AvantGarde-DemiOblique
499 Helvetica-BoldOblique
511 Helvetica-Narrow-Oblique
517 Helvetica-Narrow-Bold
523 Helvetica-Narrow-BoldOblique
529 NewCenturySchlbk-Roman
535 NewCenturySchlbk-Italic
541 NewCenturySchlbk-Bold
547 NewCenturySchlbk-BoldItalic
601 There is also the following font which is not a member of a family:
607 ZapfChancery-MediumItalic
613 There are also some special fonts called
615 for the PS Symbol font.
617 The lower case greek characters are automatically slanted (to match
618 the SymbolSlanted font (SS) available to postscript).
620 Zapf Dingbats is available as
622 the "hand pointing left" glyph (\[rs][lh]) is available since it has
623 been defined using the \[rs]X'pdf: xrev' extension which reverses the
624 direction of letters within words.
628 The default color for
632 is black; for colors defined in the \[oq]rgb\[cq] color space
634 is used, for \[oq]cmy\[cq] and \[oq]cmyk\[cq]
636 and for \[oq]gray\[cq]
641 is a PostScript LanguageLevel\~2 command and thus not available on
647 understands some of the X\~commands produced using the
649 escape sequences supported by
651 Specifically, the following is supported.
654 .B "\[rs]X'ps: invis'"
658 .B "\[rs]X'ps: endinvis'"
659 Stop suppressing output.
662 .B "\[rs]X'ps: exec gsave currentpoint 2 copy translate \fIn\fP rotate neg exch neg exch translate'"
665 is the angle of rotation.
666 This is to support the
672 .B "\[rs]X'ps: exec grestore'"
675 to restore after rotation.
678 .BI "\[rs]X'ps: exec " "n " "setlinejoin'"
681 can be one of the following values.
690 .BI "\[rs]X'ps: exec " "n " "setlinecap'"
693 can be one of the following values.
699 2 = Projecting square cap
704 .B "\[rs]X'ps: ... pdfmark'"
707 macros installed by using
711 (see documentation in \[oq]pdfmark.pdf\[cq]).
713 A subset of these macros are installed automatically when you use
715 so you should not need to use \[oq]\-m pdfmark\[cq] for using most of
716 the PDF functionality.
722 tags are silently ignored.
728 special used by the DVI driver is also recognised:
731 .BI \[rs]X'papersize= paper-size '
734 parameter is the same as the
739 .BR groff_font (@MAN5EXT@)
742 This means that you can alter the page size at will within the PDF file
746 If you do want to change the paper size, it must be done before you start
752 supports its own suite of
756 The following tags are supported:
759 .BI "\[rs]X'pdf: pdfpic " "file alignment width height line-length" '
760 Place an image of the specified
762 containing the PDF drawing from file
770 is missing or zero then it is scaled proportionally).
776 the drawing is left aligned.
784 greater than the width of the drawing is required as well.
788 is specified as zero then the width is scaled in proportion to the height.
792 .\" .BR groff_tmac (@MAN5EXT@)
793 .\" for a description of the
795 .\" macro which provides a convenient high-level interface for inclusion of
796 .\" PostScript graphics.
800 This toggles a flag which reverses the direction of printing
801 .IR "letter by letter" ,
802 i.e., each separate letter is reversed, not the entire word.
804 This is useful for reversing the direction of glyphs in the Dingbats font.
806 To return to normal printing repeat the command again.
809 .BI "\[rs]X'pdf: markstart " "/ANN definition" '
810 The macros which support PDF Bookmarks use this call internally to
811 start the definition of bookmark hotspot (user will have called
812 \[oq].pdfhref\~L\[cq] with the text which will become the \[oq]hot
815 Normally this is never used except from within the pdfmark macros.
818 .B \[rs]X'pdf: markend'
819 The macros which support PDF Bookmarks use this call internally to
820 stop the definition of bookmark hotspot (user will have called
821 \[oq].pdfhref\~L\[cq] with the text which will become the \[oq]hot
824 Normally this is never used except from within the pdfmark macros.
827 .B \[rs]X'pdf: marksuspend'
829 .B \[rs]X'pdf: markrestart'
830 If you are using page traps to produce headings, footings, etc., you
831 need to use these in case a \[oq]hot spot\[cq] crosses a page
832 boundary, otherwise any text output by the heading or footing macro
833 will be marked as part of the \[oq]hot spot\[cq].
835 To stop this happening just place \[oq].pdfmarksuspend\[cq] and
836 \[oq].pdfmarkrestart\[cq] at the start and end of the page trap macro,
839 (These are just convenience macros which emit the \[rs]X code.
841 These macros must only be used within page traps.)
844 .\" --------------------------------------------------------------------
845 .SS Importing graphics
846 .\" --------------------------------------------------------------------
849 only supports importing other PDF files as graphics.
851 But that PDF file may contain any of the graphic formats supported by
852 the PDF standard (such as JPEG, PNG, GIF, etc.).
854 So any application which outputs PDF can be used as an embedded file
858 The PDF file you wish to insert must be a single page and the drawing
859 must just fit inside the media size of the PDF file.
865 (for example) make sure the canvas size just fits the image.
869 The PDF parser used in
871 has not been rigorously tested with all possible applications which
874 If you find a single page PDF which fails to import properly, it is
875 worth running it through the
878 program by issuing the command:
893 will now load successfully.
896 .\" --------------------------------------------------------------------
897 .SS TrueType and other font formats
898 .\" --------------------------------------------------------------------
901 does not support any other fonts except Adobe Type 1 (PFA or PFB).
904 .\" --------------------------------------------------------------------
905 .SH FONT INSTALLATION
906 .\" --------------------------------------------------------------------
908 This section gives a summary of the above explanations; it can serve
909 as a step-by-step font installation guide for
915 \h'-\w'\*[BU]'u'\*[BU]\c
918 Convert your font to something groff understands.
920 This is either a PostScript Type\~1 font in either PFA or PFB,
921 together with an AFM file.
924 The very first line in a PFA/PFB file contains this:
928 .B %!PS-AdobeFont-1.0:
932 A PFB file has this also in the first line, but the string is
933 preceded with some binary bytes.
936 Convert the AFM file to a groff font description file with the
937 .BR \%afmtodit (@MAN1EXT@)
944 afmtodit Foo-Bar-Bold.afm map/textmap FBB
948 which converts the metric file \[oq]Foo-Bar-Bold.afm\[cq] to the groff
951 If you have a font family which comes with normal, bold, italic, and
952 bold italic faces, it is recommended to use the letters
958 respectively, as postfixes in the groff font names to make groff\[aq]s
959 \[oq].fam\[cq] request work.
961 An example is groff\[aq]s built-in Times-Roman font: The font family
964 and the groff font names are
972 Install both the groff font description files and the fonts in a
973 \[oq]devpdf\[cq] subdirectory of the font path which groff finds.
978 .BR troff (@MAN1EXT@)
979 man page which lists the actual value of the font path.
981 Note that groff doesn\[aq]t use the AFM files (but it is a good idea to
985 Register all fonts which must be downloaded to the printer in the
986 \[oq]devpdf/download\[cq] file.
988 Only the first occurrence of this file in the font path is read.
990 This means that you should copy the default \[oq]download\[cq] file to
991 the first directory in your font path and add your fonts there.
993 To continue the above example we assume that the PS font name for
994 Foo-Bar-Bold.pfa is \[oq]XY-Foo-Bar-Bold\[cq] (the PS font name is
997 field in the \[oq]FBB\[cq] file) and belongs to foundry \[oq]F\[]cq]
998 thus the following line should be added to \[oq]download\[cq]:
1002 .B F XY-Foo-Bar-Bold Foo-Bar-Bold.pfa
1006 Use a tab character to separate the fields, and the \[oq]foundry\[cq]
1007 field should be null for the default foundry.
1011 .\" --------------------------------------------------------------------
1013 .\" --------------------------------------------------------------------
1018 A list of directories in which to search for the
1020 directory in addition to the default ones.
1022 If, in the \[oq]download\[cq] file, the
1023 font file has been specified with a full path, no directories are searched.
1026 .BR @g@troff (@MAN1EXT@)
1028 .BR \%groff_font (@MAN5EXT@)
1032 .\" --------------------------------------------------------------------
1034 .\" --------------------------------------------------------------------
1036 .Tp \w'\fB@FONTDIR@/devpdf/download'u+2n
1037 .B @FONTDIR@/devpdf/DESC
1038 Device description file.
1041 .BI @FONTDIR@/devpdf/ F
1042 Font description file for font\~\c
1046 .BI @FONTDIR@/devpdf/ U-F
1047 Font description file for font\~\c
1051 rather than the default foundry).
1054 .B @FONTDIR@/devpdf/download
1055 List of downloadable fonts.
1058 .B @FONTDIR@/devpdf/Foundry
1059 A Perl script used during install to locate suitable fonts.
1062 .B @FONTDIR@/devpdf/enc/text.enc
1063 Encoding used for text fonts.
1066 .B @MACRODIR@/pdf.tmac
1069 automatically loaded by
1073 .\" .B @MACRODIR@/pspic.tmac
1077 .\" automatically loaded by
1082 .\" --------------------------------------------------------------------
1084 .\" --------------------------------------------------------------------
1088 .BR \%afmtodit (@MAN1EXT@),
1089 .BR groff (@MAN1EXT@),
1090 .BR grops (@MAN1EXT@),
1091 .BR @g@troff (@MAN1EXT@),
1092 .BR grops (@MAN1EXT@),
1093 .BR \%pfbtops (@MAN1EXT@),
1094 .BR \%groff_out (@MAN5EXT@),
1095 .BR \%groff_font (@MAN5EXT@),
1096 .BR \%groff_char (@MAN7EXT@),
1097 .BR \%groff_tmac (@MAN5EXT@)
1100 .\" --------------------------------------------------------------------
1102 .\" --------------------------------------------------------------------
1106 .\" Local Variables: