Imported Upstream version 1.22.3
[platform/upstream/groff.git] / src / devices / gropdf / gropdf.1.man
1 .TH GROPDF @MAN1EXT@ "@MDATE@" "groff @VERSION@"
2 .SH NAME
3 gropdf \- PDF driver for groff
4 .
5 .
6 .\" Save and disable compatibility mode (for, e.g., Solaris 10/11).
7 .do nr gropdf_C \n[.C]
8 .cp 0
9 .
10 .
11 .\" ====================================================================
12 .\" Legal Terms
13 .\" ====================================================================
14 .\"
15 .\" Copyright (C) 2011-2018 Free Software Foundation, Inc.
16 .\"
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.
20 .\"
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.
25 .\"
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.
31 .
32 .
33 .de FT
34 .  if '\\*(.T'ps' .ft \\$1
35 .  if '\\*(.T'pdf' .ft \\$1
36 ..
37 .
38 .\" ====================================================================
39 .SH SYNOPSIS
40 .\" ====================================================================
41 .
42 .SY gropdf
43 .OP \-dels
44 .OP \-F dir
45 .OP \-I dir
46 .OP \-p paper-size
47 \#.OP \-w n
48 .RB [ \-u
49 .RI [ cmapfile ]]
50 .OP \-y foundry
51 .RI [ file
52 \&.\|.\|.\&]
53 .YS
54 .
55 .SY gropdf
56 .B \-v
57 .SY gropdf
58 .B \-\-version
59 .YS
60 .
61 .\" ====================================================================
62 .SH DESCRIPTION
63 .\" ====================================================================
64 .
65 .B gropdf
66 translates the output of GNU
67 .B troff
68 to PDF.
69 .
70 Normally
71 .B gropdf
72 should be invoked by using the groff command
73 with a
74 .B \-Tpdf
75 option.
76 .
77 If no files are given,
78 .B gropdf
79 reads the standard input.
80 .
81 A filename of
82 .B \-
83 also causes
84 .B gropdf
85 to read the standard input.
86 .
87 PDF output is written to the standard output.
88 .
89 When
90 .B gropdf
91 is run by
92 .B groff
93 options can be passed to
94 .B gropdf
95 using
96 .BR groff 's
97 .B \-P
98 option.
99 .
100 .
101 .LP
102 See section \[lq]Font Installation\[rq] below for a guide how to install
103 fonts for
104 .BR gropdf .
105 .
106 .
107 .\" ====================================================================
108 .SH OPTIONS
109 .\" ====================================================================
110 .
111 Whitespace is permitted between a command-line option and its argument.
112 .
113 .
114 .TP
115 .B \-d
116 Include debug information as comments within the PDF.
117 .
118 Also produces an uncompressed PDF.
119 .
120 .
121 .TP
122 .B \-e
123 Forces
124 .B gropdf
125 to embed
126 .I all
127 fonts (even the 14 base PDF fonts).
128 .
129 .
130 .TP
131 .BI \-F " dir"
132 Prepend directory
133 .IR dir /dev name
134 to the search path for font, and device description files;
135 .I name
136 is the name of the device, usually
137 .BR pdf .
138 .
139 .TP
140 .BI \-I " dir"
141 This option may be used to add a directory to the search path for
142 files named in
143 .B \[rs]X'pdf: pdfpic'
144 escape.
145 .
146 The current directory is always searched first.
147 .
148 This option may be specified more than once; the directories are then
149 searched in the order specified.
150 .
151 .IP
152 No directory search is performed for files with an absolute file name.
153 .
154 .TP
155 .B \-l
156 Orient the document in landscape format.
157 .
158 .TP
159 .BI \-p " paper-size"
160 Set physical dimension of output medium.
161 .
162 This overrides the
163 .BR papersize ,
164 .BR paperlength ,
165 and
166 .B paperwidth
167 commands in the
168 .I DESC
169 file; it accepts the same arguments as the
170 .B papersize
171 command.
172 .
173 See
174 .BR groff_font (@MAN5EXT@)
175 for details.
176 .
177 .
178 .TP
179 .B \-s
180 Append a comment line to end of PDF showing statistics,
181 i.e.\& number of pages in document.
182 .
183 Ghostscript's
184 .B ps2pdf
185 complains about this line if it is included, but works anyway.
186 .
187 .
188 .TP
189 .B \-u\c
190 .RI " [" cmapfile ]
191 .B Gropdf
192 normally includes a ToUnicode CMap with any font created using
193 .I text.enc
194 as the encoding file,
195 this makes it easier to search for words which contain ligatures.
196 .
197 You can include your own CMap by specifying a
198 .I cmapfile
199 or have no CMap at all by omitting the argument.
200 .
201 .
202 .TP
203 .B \-v
204 .TQ
205 .B \-\-version
206 Print the version number and exit.
207 .
208 .
209 .\" .TP
210 .\" .BI \-w n
211 .\" Lines should be drawn using a thickness of
212 .\" .IR n \~\c
213 .\" thousandths of an em.
214 .\" .
215 .\" If this option is not given, the line thickness defaults to 0.04\~em.
216 .\" .
217 .\" .
218 .TP
219 .BI \-y " foundry"
220 Set the foundry to use for selecting fonts of the same name.
221 .
222 .
223 .\" ====================================================================
224 .SH USAGE
225 .\" ====================================================================
226 .
227 The input to
228 .B gropdf
229 must be in the format output by
230 .BR @g@troff (@MAN1EXT@).
231 .
232 This is described in
233 .BR groff_out (@MAN5EXT@).
234 .
235 .
236 .LP
237 In addition, the device and font description files for the device used
238 must meet certain requirements:
239 .
240 The resolution must be an integer multiple of\~72 times the
241 .BR sizescale .
242 .
243 The
244 .B pdf
245 device uses a resolution of 72000 and a sizescale of 1000.
246 .
247 .
248 .LP
249 The device description file must contain a valid paper size; see
250 .BR groff_font (@MAN5EXT@)
251 for more information.
252 .
253 .B gropdf
254 uses the same Type\~1 Adobe PostScript fonts as the
255 .B grops
256 device driver.
257 .
258 Although the PDF Standard allows the use of other font types (like
259 TrueType) this implementation only accepts the Type\~1 PostScript
260 font.
261 .
262 Fewer Type\~1 fonts are supported natively in PDF documents than the
263 standard 35 fonts supported by
264 .B grops
265 and all PostScript printers, but all the fonts are available since any
266 which aren't supported natively are automatically embedded in the
267 PDF.
268 .
269 .
270 .LP
271 .B gropdf
272 supports the concept of foundries, that is different versions of basically
273 the same font.
274 .
275 During install a
276 .I Foundry
277 file controls where fonts are found and builds
278 .B groff
279 fonts from the files it discovers on your system.
280 .
281 .
282 .LP
283 Each font description file must contain a command
284 .
285 .IP
286 .BI internalname\  psname
287 .
288 .LP
289 which says that the PostScript name of the font is
290 .IR psname .
291 .
292 Lines starting with
293 .B #
294 and blank lines are ignored.
295 .
296 The code for each character given in the font file must correspond
297 to the code in the default encoding for the font.
298 .
299 This code can be used with the
300 .B \[rs]N
301 escape sequence in
302 .B troff
303 to select the character,
304 even if the character does not have a groff name.
305 .
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.
309 .
310 .
311 .LP
312 Note that
313 .B gropdf
314 is currently only able to display the first 256 glyphs in any font.
315 This restriction will be lifted in a later version.
316 .
317 .
318 .\" .LP
319 .\" Note that
320 .\" .B grops
321 .\" is able to display all glyphs in a PostScript font, not only 256.
322 .\" .I enc_file
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
326 .\" .B grops
327 .\" produces on the fly.
328 .
329 .
330 .LP
331 .B gropdf
332 can automatically include the downloadable fonts necessary
333 to print the document.
334 .
335 Fonts may be in PFA or PFB format.
336 .LP
337 .
338 Any downloadable fonts which should, when required, be included by
339 .B gropdf
340 must be listed in the file
341 .IR @FONTDIR@/devpdf/download ;
342 this should consist of lines of the form
343 .
344 .IP
345 .I
346 foundry font filename
347 .
348 .LP
349 where
350 .I foundry
351 is the foundry name or blank for the default foundry.
352 .
353 .I font
354 is the PostScript name of the font,
355 and
356 .I filename
357 is the name of the file containing the font;
358 lines beginning with
359 .B #
360 and blank lines are ignored;
361 fields must be separated by tabs
362 (spaces are
363 .B not
364 allowed);
365 .I filename
366 is searched for using the same mechanism that is used
367 for groff font metric files.
368 .
369 The
370 .I download
371 file itself is also searched for using this mechanism;
372 currently, only the first found file in the font path is used.
373 .
374 Foundry names are usually a single character (such as \[oq]U\[cq] for
375 the URW Foundry) or blank for the default foundry.
376 .
377 This default uses the same fonts as
378 .B ghostscript
379 uses when it embeds fonts in a PDF file.
380 .
381 .
382 .LP
383 In the default setup there are styles called
384 .BR R ,
385 .BR I ,
386 .BR B ,
387 and
388 .B BI
389 mounted at font positions 1 to\~4.
390 .
391 The fonts are grouped into families
392 .BR A ,
393 .BR BM ,
394 .BR C ,
395 .BR H ,
396 .BR HN ,
397 .BR N ,
398 .BR P ,
399 and\~\c
400 .B T
401 having members in each of these styles:
402 .
403 .RS
404 .TP
405 .B AR
406 .FT AR
407 AvantGarde-Book
408 .FT
409 .
410 .TQ
411 .B AI
412 .FT AI
413 AvantGarde-BookOblique
414 .FT
415 .
416 .TQ
417 .B AB
418 .FT AB
419 AvantGarde-Demi
420 .FT
421 .
422 .TQ
423 .B ABI
424 .FT ABI
425 AvantGarde-DemiOblique
426 .FT
427 .
428 .TQ
429 .B BMR
430 .FT BMR
431 Bookman-Light
432 .FT
433 .
434 .TQ
435 .B BMI
436 .FT BMI
437 Bookman-LightItalic
438 .FT
439 .
440 .TQ
441 .B BMB
442 .FT BMB
443 Bookman-Demi
444 .FT
445 .
446 .TQ
447 .B BMBI
448 .FT BMBI
449 Bookman-DemiItalic
450 .FT
451 .
452 .TQ
453 .B CR
454 .FT CR
455 Courier
456 .FT
457 .
458 .TQ
459 .B CI
460 .FT CI
461 Courier-Oblique
462 .FT
463 .
464 .TQ
465 .B CB
466 .FT CB
467 Courier-Bold
468 .FT
469 .
470 .TQ
471 .B CBI
472 .FT CBI
473 Courier-BoldOblique
474 .FT
475 .
476 .TQ
477 .B HR
478 .FT HR
479 Helvetica
480 .FT
481 .
482 .TQ
483 .B HI
484 .FT HI
485 Helvetica-Oblique
486 .FT
487 .
488 .TQ
489 .B HB
490 .FT HB
491 Helvetica-Bold
492 .FT
493 .
494 .TQ
495 .B HBI
496 .FT HBI
497 Helvetica-BoldOblique
498 .FT
499 .
500 .TQ
501 .B HNR
502 .FT HNR
503 Helvetica-Narrow
504 .FT
505 .
506 .TQ
507 .B HNI
508 .FT HNI
509 Helvetica-Narrow-Oblique
510 .FT
511 .
512 .TQ
513 .B HNB
514 .FT HNB
515 Helvetica-Narrow-Bold
516 .FT
517 .
518 .TQ
519 .B HNBI
520 .FT HNBI
521 Helvetica-Narrow-BoldOblique
522 .FT
523 .
524 .TQ
525 .B NR
526 .FT NR
527 NewCenturySchlbk-Roman
528 .FT
529 .
530 .TQ
531 .B NI
532 .FT NI
533 NewCenturySchlbk-Italic
534 .FT
535 .
536 .TQ
537 .B NB
538 .FT NB
539 NewCenturySchlbk-Bold
540 .FT
541 .
542 .TQ
543 .B NBI
544 .FT NBI
545 NewCenturySchlbk-BoldItalic
546 .FT
547 .
548 .TQ
549 .B PR
550 .FT PR
551 Palatino-Roman
552 .FT
553 .
554 .TQ
555 .B PI
556 .FT PI
557 Palatino-Italic
558 .FT
559 .
560 .TQ
561 .B PB
562 .FT PB
563 Palatino-Bold
564 .FT
565 .
566 .TQ
567 .B PBI
568 .FT PBI
569 Palatino-BoldItalic
570 .FT
571 .
572 .TQ
573 .B TR
574 .FT TR
575 Times-Roman
576 .FT
577 .
578 .TQ
579 .B TI
580 .FT TI
581 Times-Italic
582 .FT
583 .
584 .TQ
585 .B TB
586 .FT TB
587 Times-Bold
588 .FT
589 .
590 .TQ
591 .B TBI
592 .FT TBI
593 Times-BoldItalic
594 .FT
595 .RE
596 .
597 .
598 .LP
599 There is also the following font which is not a member of a family:
600 .
601 .RS
602 .TP
603 .B ZCMI
604 .FT ZCMI
605 ZapfChancery-MediumItalic
606 .FT
607 .RE
608 .
609 .
610 .LP
611 There are also some special fonts called
612 .B S
613 for the PS Symbol font.
614 .
615 The lower case greek characters are automatically slanted (to match
616 the SymbolSlanted font (SS) available to PostScript).
617 .
618 Zapf Dingbats is available as
619 .BR ZD ,
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.
623 .
624 .
625 .LP
626 The default color for
627 .B \[rs]m
628 and
629 .B \[rs]M
630 is black.
631 .
632 .LP
633 .B gropdf
634 understands some of the X\~commands produced using the
635 .B \[rs]X
636 escape sequences supported by
637 .B grops.
638 Specifically, the following is supported.
639 .
640 .TP
641 .B "\[rs]X'ps: invis'"
642 Suppress output.
643 .
644 .TP
645 .B "\[rs]X'ps: endinvis'"
646 Stop suppressing output.
647 .
648 .TP
649 .B "\[rs]X'ps: exec gsave currentpoint 2 copy translate \fIn\fP rotate neg exch neg exch translate'"
650 where
651 .I n
652 is the angle of rotation.
653 This is to support the
654 .I align
655 command in
656 .BR gpic .
657 .
658 .TP
659 .B "\[rs]X'ps: exec grestore'"
660 Again used by
661 .B gpic
662 to restore after rotation.
663 .
664 .TP
665 .BI "\[rs]X'ps: exec " "n " "setlinejoin'"
666 where
667 .I n
668 can be one of the following values.
669 .IP
670 0 = Miter join
671 .br
672 1 = Round join
673 .br
674 2 = Bevel join
675 .
676 .TP
677 .BI "\[rs]X'ps: exec " "n " "setlinecap'"
678 where
679 .I n
680 can be one of the following values.
681 .IP
682 0 = Butt cap
683 .br
684 1 = Round cap, and
685 .br
686 2 = Projecting square cap
687 .
688 .
689 .LP
690 .TP
691 .B "\[rs]X'ps: ... pdfmark'"
692 All the
693 .I pdfmark
694 macros installed by using
695 .I \-m pdfmark
696 or
697 .I \-m mspdf
698 (see documentation in
699 .IR pdfmark.pdf ).
700 .
701 A subset of these macros are installed automatically when you use
702 .B \-Tpdf
703 so you should not need to use \[oq]\-m pdfmark\[cq] for using most of
704 the PDF functionality.
705 .
706 .LP
707 .B gropdf
708 also supports a subset of the commands introduced in present.tmac.
709 Specifically it supports:-
710 .IP
711 PAUSE
712 .br
713 BLOCKS
714 .br
715 BLOCKE
716 .
717 .LP
718 Which allows you to create presentation type PDFs.
719 Many of the other
720 commands are already available in other macro packages.
721 .LP
722 These commands are implemented with
723 .B groff
724 X commands:-
725 .LP
726 .TP
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).
730 This command
731 can be introduced using the macro
732 .BR .pdfpause .
733 .TP
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
739 .I \%GROPDF_NOSLIDE
740 below, this text is ignored.
741 .LP
742 .TP
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.
747 .LP
748 The
749 .B mom
750 macro set already has integration with these extensions so you can build
751 slides with
752 .BR mom .
753 .LP
754 If you use present.tmac with
755 .B gropdf
756 there is no need to run the program
757 .BR presentps (@MAN1EXT@)
758 since the output will already be a presentation pdf.
759 .LP
760 All other
761 .B ps:
762 tags are silently ignored.
763 .
764 .
765 .LP
766 One
767 .B \[rs]X
768 special used by the DVI driver is also recognised:
769 .
770 .TP
771 .BI \[rs]X'papersize= paper-size '
772 where the
773 .I paper-size
774 parameter is the same as the
775 .B papersize
776 command.
777 .
778 See
779 .BR groff_font (@MAN5EXT@)
780 for details.
781 .
782 This means that you can alter the page size at will within the PDF file
783 being created by
784 .BR gropdf .
785 .
786 If you do want to change the paper size, it must be done before you start
787 creating the page.
788 .
789 .LP
790 In addition,
791 .B gropdf
792 supports its own suite of
793 .B pdf:
794 tags.
795 .
796 The following tags are supported:
797 .
798 .TP
799 .BI "\[rs]X'pdf: pdfpic " "file alignment width height line-length" '
800 Place an image of the specified
801 .I width
802 containing the PDF drawing from file
803 .I file
804 of desired
805 .I width
806 and
807 .I height
808 (if
809 .I height
810 is missing or zero then it is scaled proportionally).
811 .
812 If
813 .I alignment
814 is
815 .B \-L
816 the drawing is left aligned.
817 .
818 If it is
819 .B \-C
820 or
821 .B \-R
822 a
823 .I linelength
824 greater than the width of the drawing is required as well.
825 .
826 If
827 .I width
828 is specified as zero then the width is scaled in proportion to the height.
829 .
830 .\" .IP
831 .\" See
832 .\" .BR groff_tmac (@MAN7EXT@)
833 .\" for a description of the
834 .\" .B PSPIC
835 .\" macro which provides a convenient high-level interface for inclusion of
836 .\" PostScript graphics.
837 .
838 .TP
839 .B \[rs]X'pdf: xrev'
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.
843 .
844 This is useful for reversing the direction of glyphs in the Dingbats font.
845 .
846 To return to normal printing repeat the command again.
847 .
848 .TP
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
853 spot\[cq] region).
854 .
855 Normally this is never used except from within the pdfmark macros.
856 .
857 .TP
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
862 spot\[cq] region).
863 .
864 Normally this is never used except from within the pdfmark macros.
865 .
866 .TP
867 .B \[rs]X'pdf: marksuspend'
868 .TQ
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].
874 .
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,
877 respectively.
878 .
879 (These are just convenience macros which emit the \[rs]X code.
880 .
881 These macros must only be used within page traps.)
882 .
883 .TP
884 .BR "\[rs]X'pdf: transition'" "feature mode duration dimension motion direction scale bool"
885 where
886 .IP
887 .I feature
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.
892 .br
893 .I mode
894 is the transition type between slides:-
895 .RS
896 .IP
897 .B Split
898 - Two lines sweep across the screen, revealing the new page.
899 The lines
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
902 .I dimension
903 and
904 .I motion
905 entries, respectively.
906 .br
907 .B Blinds
908 - Multiple lines, evenly spaced across the screen, synchronously
909 sweep in the same direction to reveal the new page.
910 The lines may be
911 either horizontal or vertical, as specified by the
912 .I dimension
913  entry.
914 Horizontal
915 lines move downward; vertical lines move to the right.
916 .br
917 .B Box
918 - A rectangular box sweeps inward from the edges of the page or
919 outward from the center, as specified by the
920 .I motion
921 entry, revealing the new page.
922 .br
923 .B Wipe
924 - A single line sweeps across the screen from one edge to the other in
925 the direction specified by the
926 .I direction
927 entry, revealing the new page.
928 .br
929 .B Dissolve
930 - The old page dissolves gradually to reveal the new one.
931 .br
932 .B Glitter
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
936 .I direction
937 entry.
938 .br
939 .B R
940 - The new page simply replaces the old one with no special transition
941 effect; the
942 .I direction
943 entry shall be ignored.
944 .br
945 .B Fly
946 - (PDF 1.5) Changes are flown out or in (as specified by
947 .IR motion ),
948 in the
949 direction specified by
950 .IR direction ,
951 to or from a location that is offscreen except
952 when
953 .I direction
954 is
955 .BR None .
956 .br
957 .B Push
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
960 .IR direction .
961 .br
962 .B Cover
963 - (PDF 1.5) The new page slides on to the screen in the direction
964 specified by
965 .IR direction ,
966 covering the old page.
967 .br
968 .B Uncover
969 - (PDF 1.5) The old page slides off the screen in the direction
970 specified by
971 .IR direction ,
972 uncovering the new page in the direction
973 specified by
974 .IR direction .
975 .br
976 .B Fade
977 - (PDF 1.5) The new page gradually becomes visible through the
978 old one.
979 .LP
980 .RE
981 .IP
982 .I duration
983 is the length of the transition in seconds (default 1).
984 .LP
985 .IP
986 .I dimension
987 (Optional;
988 .BR Split " and " Blinds
989 transition styles only) The dimension in which the
990 specified transition effect shall occur:
991 .B H
992 Horizontal, or
993 .B V
994 Vertical.
995 .LP
996 .IP
997 .I motion
998 (Optional;
999 .BR Split ,
1000 .BR Box " and " Fly
1001 transition styles only) The direction of motion for
1002 the specified transition effect:
1003 .B I
1004 Inward from the edges of the page, or
1005 .B O
1006 Outward from the center of the page.
1007 .LP
1008 .IP
1009 .I direction
1010 (Optional;
1011 .BR Wipe ,
1012 .BR Glitter ,
1013 .BR Fly ,
1014 .BR Cover ,
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:
1020 .B 0
1021 = Left to right,
1022 .B 90
1023 = Bottom to top (Wipe only),
1024 .B 180
1025 = Right to left (Wipe only),
1026 .B 270
1027 = Top to bottom,
1028 .B 315
1029 = Top-left to bottom-right (Glitter only)
1030 The value can be
1031 .BR None ,
1032 which is relevant only for the
1033 .B Fly
1034 transition when the value of
1035 .I scale
1036 is not 1.0.
1037 .LP
1038 .IP
1039 .I scale
1040 (Optional; PDF 1.5;
1041 .B Fly
1042 transition style only) The starting or ending scale at
1043 which the changes shall be drawn.
1044 If
1045 .I motion
1046 specifies an inward transition, the scale
1047 of the changes drawn shall progress from
1048 .I scale
1049 to 1.0 over the course of the
1050 transition.
1051 If
1052 .I motion
1053 specifies an outward transition, the scale of the changes drawn
1054 shall progress from 1.0 to
1055 .I scale
1056 over the course of the transition
1057 .LP
1058 .IP
1059 .I bool
1060 (Optional; PDF 1.5;
1061 .B Fly
1062 transition style only) If
1063 .BR true ,
1064 the area that shall be flown
1065 in is rectangular and opaque.
1066 .LP
1067 .IP
1068 This command can be used by calling the macro
1069 .B .pdftransition
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.
1074 .LP
1075 .IP
1076 .B Note:
1077 not all PDF Readers support any or all these transitions.
1078 .LP
1079 .
1080 .\" ====================================================================
1081 .SS Importing graphics
1082 .\" ====================================================================
1083 .
1084 .B gropdf
1085 only supports importing other PDF files as graphics.
1086 .
1087 But that PDF file may contain any of the graphic formats supported by
1088 the PDF standard (such as JPEG, PNG, GIF, etc.).
1089 .
1090 So any application which outputs PDF can be used as an embedded file
1091 in
1092 .BR gropdf .
1093 .
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.
1096 .
1097 So, in
1098 .BR inkscape (1)
1099 or
1100 .BR gimp (1)
1101 (for example) make sure the canvas size just fits the image.
1102 .
1103 .
1104 .LP
1105 The PDF parser used in
1106 .B gropdf
1107 has not been rigorously tested with all possible applications which
1108 produce PDFs.
1109 .
1110 If you find a single page PDF which fails to import properly, it is
1111 worth running it through the
1112 .
1113 .BR pdftk (1)
1114 program by issuing the command:
1115 .
1116 .
1117 .RS
1118 .LP
1119 .B pdftk
1120 .I oldfile.pdf
1121 .B output
1122 .I newfile.pdf
1123 .RE
1124 .
1125 .
1126 .LP
1127 You may find that
1128 .I newfile.pdf
1129 will now load successfully.
1130 .
1131 .
1132 .\" ====================================================================
1133 .SS TrueType and other font formats
1134 .\" ====================================================================
1135 .
1136 .B gropdf
1137 does not support any other fonts except Adobe Type 1 (PFA or PFB).
1138 .
1139 .
1140 .\" ====================================================================
1141 .SH FONT INSTALLATION
1142 .\" ====================================================================
1143 .
1144 This section gives a summary of the above explanations; it can serve
1145 as a step-by-step font installation guide for
1146 .BR gropdf .
1147 .
1148 .ds BU \[bu]\ \ \"
1149 .de LI
1150 .IP "" 4
1151 \h'-\w'\*[BU]'u'\*[BU]\c
1152 ..
1153 .LI
1154 Convert your font to something groff understands.
1155 .
1156 This is either a PostScript Type\~1 font in either PFA or PFB,
1157 together with an AFM file.
1158 .
1159 .IP
1160 The very first line in a PFA/PFB file contains this:
1161 .
1162 .RS
1163 .IP
1164 .B %!PS\-AdobeFont\-1.0:
1165 .RE
1166 .
1167 .IP
1168 A PFB file has this also in the first line, but the string is
1169 preceded with some binary bytes.
1170 .
1171 .LI
1172 Convert the AFM file to a groff font description file with the
1173 .BR \%afmtodit (@MAN1EXT@)
1174 program.
1175 .
1176 An example call is
1177 .
1178 .RS
1179 .IP
1180 afmtodit Foo\-Bar\-Bold.afm map/textmap FBB
1181 .RE
1182 .
1183 .IP
1184 which converts the metric file \[oq]Foo\-Bar\-Bold.afm\[cq] to the groff
1185 font \[oq]FBB\[cq].
1186 .
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
1189 .BR R ,
1190 .BR B ,
1191 .BR I ,
1192 and
1193 .BR BI ,
1194 respectively, as postfixes in the groff font names to make groff's
1195 \[oq].fam\[cq] request work.
1196 .
1197 An example is groff's built-in Times-Roman font: The font family
1198 name is
1199 .BR T ,
1200 and the groff font names are
1201 .BR TR ,
1202 .BR TB ,
1203 .BR TI ,
1204 and
1205 .BR TBI .
1206 .
1207 .LI
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.
1210 .
1211 See section \[lq]Environment\[rq] in
1212 .BR @g@troff (@MAN1EXT@)
1213 for the actual value of the font path.
1214 .
1215 Note that groff doesn't use the AFM files (but it is a good idea to
1216 store them anyway).
1217 .
1218 .LI
1219 Register all fonts which must be downloaded to the printer in the
1220 .I devpdf/download
1221 file.
1222 .
1223 Only the first occurrence of this file in the font path is read.
1224 .
1225 This means that you should copy the default
1226 .I download
1227 file to the first directory in your font path and add your fonts there.
1228 .
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
1231 stored in the
1232 .B internalname
1233 field in the
1234 .I FBB
1235 file) and belongs to foundry \[oq]F\[cq]
1236 thus the following line should be added to
1237 .IR download :
1238 .
1239 .RS
1240 .IP
1241 .B F XY\-Foo\-Bar\-Bold Foo\-Bar\-Bold.pfa
1242 .
1243 .
1244 .LP
1245 Use a tab character to separate the fields, and the \[oq]foundry\[cq]
1246 field should be null for the default foundry.
1247 .RE
1248 .
1249 .
1250 .\" ====================================================================
1251 .SH ENVIRONMENT
1252 .\" ====================================================================
1253 .
1254 .TP
1255 .I GROFF_FONT_PATH
1256 A list of directories in which to search for the
1257 .IR dev name
1258 directory in addition to the default ones.
1259 .
1260 If, in the
1261 .I download
1262 file,
1263 the font file has been specified with a full path,
1264 no directories are searched.
1265 .
1266 See
1267 .BR @g@troff (@MAN1EXT@)
1268 and
1269 .BR \%groff_font (@MAN5EXT@)
1270 for more details.
1271 .
1272 .
1273 .TP
1274 .I GROPDF_NOSLIDE
1275 If this is set true,
1276 .B gropdf
1277 will ignore all commands which produce a presentation pdf,
1278 and produce a normal pdf instead.
1279 .TP
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.
1283 .
1284 .
1285 .\" ====================================================================
1286 .SH FILES
1287 .\" ====================================================================
1288 .
1289 .TP
1290 .I @FONTDIR@/devpdf/DESC
1291 Device description file.
1292 .
1293 .TP
1294 .IR @FONTDIR@/devpdf/ F
1295 Font description file for font\~\c
1296 .IR F .
1297 .
1298 .TP
1299 .IR @FONTDIR@/devpdf/ U\-F
1300 Font description file for font\~\c
1301 .I F
1302 (using foundry\~\c
1303 .I U
1304 rather than the default foundry).
1305 .
1306 .TP
1307 .I @FONTDIR@/devpdf/download
1308 List of downloadable fonts.
1309 .
1310 .TP
1311 .I @FONTDIR@/devpdf/Foundry
1312 A Perl script used during install to locate suitable fonts.
1313 .
1314 .TP
1315 .I @FONTDIR@/devpdf/enc/text.enc
1316 Encoding used for text fonts.
1317 .
1318 .TP
1319 .I @MACRODIR@/pdf.tmac
1320 Macros for use with
1321 .BR gropdf ;
1322 automatically loaded by
1323 .BR troffrc .
1324 .
1325 .\" .TP
1326 .\" .B @MACRODIR@/pspic.tmac
1327 .\" Definition of
1328 .\" .B PSPIC
1329 .\" macro,
1330 .\" automatically loaded by
1331 .\" .BR ps.tmac .
1332 .\" .
1333 .
1334 .
1335 .\" ====================================================================
1336 .SH "SEE ALSO"
1337 .\" ====================================================================
1338 .
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@),
1347 .
1348 .
1349 .\" Restore compatibility mode (for, e.g., Solaris 10/11).
1350 .cp \n[gropdf_C]
1351 .
1352 .
1353 .\" Local Variables:
1354 .\" mode: nroff
1355 .\" End:
1356 .\" vim: set filetype=groff: