{
    "mode": "man",
    "parameter": "gropdf",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/gropdf/1/json",
    "generated": "2026-06-15T22:57:36Z",
    "synopsis": "gropdf [-dels] [-F dir] [-I dir] [-p paper-size] [-u [cmapfile]] [-y foundry] [file ...]",
    "sections": {
        "NAME": {
            "content": "gropdf - PDF driver for groff\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "gropdf [-dels] [-F dir] [-I dir] [-p paper-size] [-u [cmapfile]] [-y foundry] [file ...]\n",
            "subsections": [
                {
                    "name": "gropdf -v",
                    "content": ""
                },
                {
                    "name": "gropdf --version",
                    "content": ""
                }
            ]
        },
        "DESCRIPTION": {
            "content": "gropdf translates the output of GNU troff to PDF.  Normally gropdf should be invoked by using\nthe groff command with a -Tpdf option.  If no files are given, gropdf reads the standard  in‐\nput.   A  filename of - also causes gropdf to read the standard input.  PDF output is written\nto the standard output.  When gropdf is run by groff options can be passed  to  gropdf  using\ngroff's -P option.\n\nSee section “Font Installation” below for a guide how to install fonts for gropdf.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "Whitespace is permitted between a command-line option and its argument.\n",
            "subsections": [
                {
                    "name": "-d",
                    "content": "PDF.\n",
                    "flag": "-d"
                },
                {
                    "name": "-e",
                    "content": "",
                    "flag": "-e"
                },
                {
                    "name": "-F",
                    "content": "files; name is the name of the device, usually pdf.\n",
                    "flag": "-F"
                },
                {
                    "name": "-I",
                    "content": "\\X'pdf: pdfpic' escape.  The current directory is always searched first.  This  option\nmay be specified more than once; the directories are then searched in the order speci‐\nfied.\n\nNo directory search is performed for files with an absolute file name.\n",
                    "flag": "-I"
                },
                {
                    "name": "-l",
                    "content": "",
                    "flag": "-l"
                },
                {
                    "name": "-p",
                    "content": "Set physical dimension of output medium.  This overrides the  papersize,  paperlength,\nand  paperwidth commands in the DESC file; it accepts the same arguments as the paper‐‐\nsize command.  See grofffont(5) for details.\n",
                    "flag": "-p"
                },
                {
                    "name": "-s",
                    "content": "ment.   Ghostscript's  ps2pdf  complains  about this line if it is included, but works\nanyway.\n",
                    "flag": "-s"
                },
                {
                    "name": "-u",
                    "content": "Gropdf normally includes a ToUnicode CMap with any font created using text.enc as  the\nencoding  file, this makes it easier to search for words which contain ligatures.  You\ncan include your own CMap by specifying a cmapfile or have no CMap at all by  omitting\nthe argument.\n",
                    "flag": "-u"
                },
                {
                    "name": "-v",
                    "content": "",
                    "flag": "-v"
                },
                {
                    "name": "--version",
                    "content": "Print the version number and exit.\n",
                    "long": "--version"
                },
                {
                    "name": "-y",
                    "content": "Set the foundry to use for selecting fonts of the same name.\n",
                    "flag": "-y"
                }
            ]
        },
        "USAGE": {
            "content": "The  input  to  gropdf  must  be  in  the  format  output  by troff(1).  This is described in\ngroffout(5).\n\nIn addition, the device and font description files for the device used must meet certain  re‐\nquirements:  The  resolution  must be an integer multiple of 72 times the sizescale.  The pdf\ndevice uses a resolution of 72000 and a sizescale of 1000.\n\nThe device description file must contain a valid paper size; see grofffont(5) for  more  in‐\nformation.   gropdf  uses  the same Type 1 Adobe PostScript fonts as the grops device driver.\nAlthough the PDF Standard allows the use of other font types (like TrueType) this implementa‐\ntion  only  accepts the Type 1 PostScript font.  Fewer Type 1 fonts are supported natively in\nPDF documents than the standard 35 fonts supported by grops and all PostScript printers,  but\nall  the  fonts are available since any which aren't supported natively are automatically em‐\nbedded in the PDF.\n\ngropdf supports the concept of foundries, that is different versions of  basically  the  same\nfont.   During  install  a Foundry file controls where fonts are found and builds groff fonts\nfrom the files it discovers on your system.\n\nEach font description file must contain a command\n\ninternalname psname\n\nwhich says that the PostScript name of the font is psname.  Lines starting with #  and  blank\nlines are ignored.  The code for each character given in the font file must correspond to the\ncode in the default encoding for the font.  This code can be used with the \\N escape sequence\nin  troff  to  select the character, even if the character does not have a groff name.  Every\ncharacter in the font file must exist in the PostScript font, and the  widths  given  in  the\nfont file must match the widths used in the PostScript font.\n\nNote  that  gropdf  is currently only able to display the first 256 glyphs in any font.  This\nrestriction will be lifted in a later version.\n\ngropdf can automatically include the downloadable fonts  necessary  to  print  the  document.\nFonts may be in PFA or PFB format.\n\nAny  downloadable  fonts which should, when required, be included by gropdf must be listed in\nthe file /usr/share/groff/1.22.4/font/devpdf/download; this should consist of  lines  of  the\nform\n\nfoundry font filename\n\nwhere  foundry  is the foundry name or blank for the default foundry.  font is the PostScript\nname of the font, and filename is the name of the file containing the font;  lines  beginning\nwith  #  and  blank  lines  are ignored; fields must be separated by tabs (spaces are not al‐\nlowed); filename is searched for using the same mechanism that is used for groff font  metric\nfiles.   The  download file itself is also searched for using this mechanism; currently, only\nthe first found file in the font path is used.  Foundry names are usually a single  character\n(such  as  ‘U’  for the URW Foundry) or blank for the default foundry.  This default uses the\nsame fonts as ghostscript uses when it embeds fonts in a PDF file.\n\nIn the default setup there are styles called R, I, B, and BI  mounted  at  font  positions  1\nto  4.   The  fonts  are grouped into families A, BM, C, H, HN, N, P, and T having members in\neach of these styles:\n\nAR     AvantGarde-Book\nAI     AvantGarde-BookOblique\nAB     AvantGarde-Demi\nABI    AvantGarde-DemiOblique\nBMR    Bookman-Light\nBMI    Bookman-LightItalic\nBMB    Bookman-Demi\nBMBI   Bookman-DemiItalic\nCR     Courier\nCI     Courier-Oblique\nCB     Courier-Bold\nCBI    Courier-BoldOblique\nHR     Helvetica\nHI     Helvetica-Oblique\nHB     Helvetica-Bold\nHBI    Helvetica-BoldOblique\nHNR    Helvetica-Narrow\nHNI    Helvetica-Narrow-Oblique\nHNB    Helvetica-Narrow-Bold\nHNBI   Helvetica-Narrow-BoldOblique\nNR     NewCenturySchlbk-Roman\nNI     NewCenturySchlbk-Italic\nNB     NewCenturySchlbk-Bold\nNBI    NewCenturySchlbk-BoldItalic\nPR     Palatino-Roman\nPI     Palatino-Italic\nPB     Palatino-Bold\nPBI    Palatino-BoldItalic\nTR     Times-Roman\nTI     Times-Italic\nTB     Times-Bold\nTBI    Times-BoldItalic\n\nThere is also the following font which is not a member of a family:\n\nZCMI   ZapfChancery-MediumItalic\n\nThere are also some special fonts called S for the PS Symbol  font.   The  lower  case  greek\ncharacters are automatically slanted (to match the SymbolSlanted font (SS) available to Post‐\nScript).  Zapf Dingbats is available as ZD, the \"hand pointing left\" glyph (\\[lh]) is  avail‐\nable since it has been defined using the \\X'pdf: xrev' extension which reverses the direction\nof letters within words.\n\nThe default color for \\m and \\M is black.\n\ngropdf understands some of the X commands produced using the \\X escape sequences supported by\ngrops.  Specifically, the following is supported.\n",
            "subsections": [
                {
                    "name": "\\X'ps: invis'",
                    "content": "Suppress output.\n"
                },
                {
                    "name": "\\X'ps: endinvis'",
                    "content": "Stop suppressing output.\n\n\\X'ps: exec gsave currentpoint 2 copy translate n rotate neg exch neg exch translate'\nwhere n is the angle of rotation.  This is to support the align command in gpic.\n"
                },
                {
                    "name": "\\X'ps: exec grestore'",
                    "content": "Again used by gpic to restore after rotation.\n\n\\X'ps: exec n setlinejoin'\nwhere n can be one of the following values.\n\n0 = Miter join\n1 = Round join\n2 = Bevel join\n\n\\X'ps: exec n setlinecap'\nwhere n can be one of the following values.\n\n0 = Butt cap\n1 = Round cap, and\n2 = Projecting square cap\n"
                },
                {
                    "name": "\\X'ps: ... pdfmark'",
                    "content": "All the pdfmark macros installed by using -m pdfmark or -m mspdf (see documentation in\npdfmark.pdf).  A subset of these macros are installed automatically when you use -Tpdf\nso you should not need to use ‘-m pdfmark’ for using most of the PDF functionality.\n\ngropdf  also  supports  a subset of the commands introduced in present.tmac.  Specifically it\nsupports:-\n\nPAUSE\nBLOCKS\nBLOCKE\n\nWhich allows you to create presentation type PDFs.  Many of the other  commands  are  already\navailable in other macro packages.\n\nThese commands are implemented with groff X commands:-\n"
                },
                {
                    "name": "\\X'ps: exec %%%%PAUSE",
                    "content": "The  section  before  this  is  treated as a block and is introduced using the current\nBLOCK transition setting (see ‘pdf: transition’ below).  This command  can  be  intro‐\nduced using the macro .pdfpause.\n"
                },
                {
                    "name": "\\X'ps: exec %%%%BEGINONCE",
                    "content": "Any  text  following  this  command  (up  to %%%%ENDONCE) is shown only once, the next\n%%%%PAUSE will remove it.  If producing a non  presentation  pdf,  i.e.  ignoring  the\npauses, see GROPDFNOSLIDE below, this text is ignored.\n"
                },
                {
                    "name": "\\X'ps: exec %%%%ENDONCE",
                    "content": "This terminates the block defined by %%%%BEGINONCE.  This pair of commands is what im‐\nplements the .BLOCKS Once/.BLOCKE commands in present.tmac.\n\nThe mom macro set already has integration with these extensions so you can build slides  with\nmom.\n\nIf  you  use  present.tmac with gropdf there is no need to run the program presentps(1) since\nthe output will already be a presentation pdf.\n\nAll other ps: tags are silently ignored.\n\nOne \\X special used by the DVI driver is also recognised:\n\n\\X'papersize=paper-size'\nwhere  the  paper-size  parameter  is  the  same  as  the  papersize   command.    See\ngrofffont(5) for details.  This means that you can alter the page size at will within\nthe PDF file being created by gropdf.  If you do want to change  the  paper  size,  it\nmust be done before you start creating the page.\n\nIn addition, gropdf supports its own suite of pdf: tags.  The following tags are supported:\n\n\\X'pdf: pdfpic file alignment width height line-length'\nPlace an image of the specified width containing the PDF drawing from file file of de‐\nsired width and height (if height is missing or zero then  it  is  scaled  proportion‐\nally).   If  alignment  is  -L the drawing is left aligned.  If it is -C or -R a line‐\nlength greater than the width of the drawing is required as well.  If width is  speci‐\nfied as zero then the width is scaled in proportion to the height.\n"
                },
                {
                    "name": "\\X'pdf: xrev'",
                    "content": "This  toggles  a flag which reverses the direction of printing letter by letter, i.e.,\neach separate letter is reversed, not the entire word.  This is useful  for  reversing\nthe direction of glyphs in the Dingbats font.  To return to normal printing repeat the\ncommand again.\n\n\\X'pdf: markstart /ANN definition'\nThe macros which support PDF Bookmarks use this call internally to start  the  defini‐\ntion  of bookmark hotspot (user will have called ‘.pdfhref L’ with the text which will\nbecome the ‘hot spot’ region).  Normally this is never used  except  from  within  the\npdfmark macros.\n"
                },
                {
                    "name": "\\X'pdf: markend'",
                    "content": "The macros which support PDF Bookmarks use this call internally to stop the definition\nof bookmark hotspot (user will have called ‘.pdfhref L’ with the text which  will  be‐\ncome  the ‘hot spot’ region).  Normally this is never used except from within the pdf‐\nmark macros.\n"
                },
                {
                    "name": "\\X'pdf: marksuspend'",
                    "content": ""
                },
                {
                    "name": "\\X'pdf: markrestart'",
                    "content": "If you are using page traps to produce headings, footings, etc., you need to use these\nin case a ‘hot spot’ crosses a page boundary, otherwise any text output by the heading\nor footing macro will be marked as part of the ‘hot spot’.   To  stop  this  happening\njust  place  ‘.pdfmarksuspend’  and ‘.pdfmarkrestart’ at the start and end of the page\ntrap macro, respectively.  (These are just convenience macros which emit the \\X  code.\nThese macros must only be used within page traps.)\n\n\\X'pdf: transition'feature mode duration dimension motion direction scale bool\nwhere\n\nfeature  can be either SLIDE or BLOCK.  When it is SLIDE the transition is used when a\nnew slide is introduced to the screen, if BLOCK then this transition is used  for  the\nindividual blocks which make up the slide.\nmode is the transition type between slides:-\n\nSplit  -  Two lines sweep across the screen, revealing the new page.  The lines\nmay be either horizontal or vertical and may move inward from the edges of  the\npage  or  outward from the center, as specified by the dimension and motion en‐\ntries, respectively.\nBlinds - Multiple lines, evenly spaced across the screen,  synchronously  sweep\nin the same direction to reveal the new page.  The lines may be either horizon‐\ntal or vertical, as specified by the dimension\nentry.  Horizontal lines move downward; vertical lines move to the right.\nBox - A rectangular box sweeps inward from the edges of  the  page  or  outward\nfrom the center, as specified by the motion entry, revealing the new page.\nWipe - A single line sweeps across the screen from one edge to the other in the\ndirection specified by the direction entry, revealing the new page.\nDissolve - The old page dissolves gradually to reveal the new one.\nGlitter - Similar to Dissolve, except that the effect sweeps across the page in\na  wide  band  moving from one side of the screen to the other in the direction\nspecified by the direction entry.\nR - The new page simply replaces the old one with no special transition effect;\nthe direction entry shall be ignored.\nFly  -  (PDF  1.5) Changes are flown out or in (as specified by motion), in the\ndirection specified by direction, to or from a location that is  offscreen  ex‐\ncept when direction is None.\nPush  -  (PDF 1.5) The old page slides off the screen while the new page slides\nin, pushing the old page out in the direction specified by direction.\nCover - (PDF 1.5) The new page slides on to the screen in the direction  speci‐\nfied by direction, covering the old page.\nUncover  - (PDF 1.5) The old page slides off the screen in the direction speci‐\nfied by direction, uncovering the new page in the direction specified by direc‐\ntion.\nFade - (PDF 1.5) The new page gradually becomes visible through the old one.\n\nduration is the length of the transition in seconds (default 1).\n\ndimension  (Optional;  Split and Blinds transition styles only) The dimension in which\nthe specified transition effect shall occur: H Horizontal, or V Vertical.\n\nmotion (Optional; Split, Box and Fly transition styles only) The direction  of  motion\nfor the specified transition effect: I Inward from the edges of the page, or O Outward\nfrom the center of the page.\n\ndirection (Optional; Wipe, Glitter, Fly, Cover, Uncover  and  Push  transition  styles\nonly) The direction in which the specified transition effect shall moves, expressed in\ndegrees counterclockwise starting from a left-to-right direction.  If the value  is  a\nnumber,  it  shall be one of: 0 = Left to right, 90 = Bottom to top (Wipe only), 180 =\nRight to left (Wipe only), 270 = Top to bottom, 315 = Top-left to bottom-right  (Glit‐\nter  only)  The  value can be None, which is relevant only for the Fly transition when\nthe value of scale is not 1.0.\n\nscale (Optional; PDF 1.5; Fly transition style only) The starting or ending  scale  at\nwhich the changes shall be drawn.  If motion specifies an inward transition, the scale\nof the changes drawn shall progress from scale to 1.0 over the course of  the  transi‐\ntion.  If motion specifies an outward transition, the scale of the changes drawn shall\nprogress from 1.0 to scale over the course of the transition\n\nbool (Optional; PDF 1.5; Fly transition style only) If true, the area  that  shall  be\nflown in is rectangular and opaque.\n\nThis  command can be used by calling the macro .pdftransition using the parameters de‐\nscribed above.  Any of the parameters may be replaced with a \".\" which  signifies  the\nparameter  retains  its  previous  value, also any trailing missing parameters are ig‐\nnored.\n\nNote: not all PDF Readers support any or all these transitions.\n"
                },
                {
                    "name": "Importing graphics",
                    "content": "gropdf only supports importing other PDF files as graphics.  But that PDF  file  may  contain\nany  of the graphic formats supported by the PDF standard (such as JPEG, PNG, GIF, etc.).  So\nany application which outputs PDF can be used as an embedded file in gropdf.   The  PDF  file\nyou  wish to insert must be a single page and the drawing must just fit inside the media size\nof the PDF file.  So, in inkscape(1) or gimp(1) (for example) make sure the canvas size  just\nfits the image.\n\nThe  PDF  parser used in gropdf has not been rigorously tested with all possible applications\nwhich produce PDFs.  If you find a single page PDF which fails  to  import  properly,  it  is\nworth running it through the pdftk(1) program by issuing the command:\n\npdftk oldfile.pdf output newfile.pdf\n\nYou may find that newfile.pdf will now load successfully.\n"
                },
                {
                    "name": "TrueType and other font formats",
                    "content": "gropdf does not support any other fonts except Adobe Type 1 (PFA or PFB).\n"
                }
            ]
        },
        "FONT INSTALLATION": {
            "content": "This  section  gives a summary of the above explanations; it can serve as a step-by-step font\ninstallation guide for gropdf.\n\n•  Convert your font to something groff understands.  This is either  a  PostScript  Type  1\nfont in either PFA or PFB, together with an AFM file.\n\nThe very first line in a PFA/PFB file contains this:\n\n%!PS-AdobeFont-1.0:\n\nA  PFB  file has this also in the first line, but the string is preceded with some binary\nbytes.\n\n•  Convert the AFM file to a groff font description file with the afmtodit(1)  program.   An\nexample call is\n\nafmtodit Foo-Bar-Bold.afm map/textmap FBB\n\nwhich converts the metric file ‘Foo-Bar-Bold.afm’ to the groff font ‘FBB’.  If you have a\nfont family which comes with normal, bold, italic, and bold italic faces,  it  is  recom‐\nmended  to  use the letters R, B, I, and BI, respectively, as postfixes in the groff font\nnames to make groff's ‘.fam’ request work.  An example is  groff's  built-in  Times-Roman\nfont: The font family name is T, and the groff font names are TR, TB, TI, and TBI.\n\n•  Install both the groff font description files and the fonts in a ‘devpdf’ subdirectory of\nthe font path which groff finds.  See section “Environment” in troff(1)  for  the  actual\nvalue of the font path.  Note that groff doesn't use the AFM files (but it is a good idea\nto store them anyway).\n\n•  Register all fonts which must be downloaded to the printer in the  devpdf/download  file.\nOnly  the  first  occurrence  of this file in the font path is read.  This means that you\nshould copy the default download file to the first directory in your font  path  and  add\nyour  fonts  there.   To  continue  the above example we assume that the PS font name for\nFoo-Bar-Bold.pfa is ‘XY-Foo-Bar-Bold’ (the PS font name is  stored  in  the  internalname\nfield in the FBB file) and belongs to foundry ‘F’ thus the following line should be added\nto download:\n\nF XY-Foo-Bar-Bold Foo-Bar-Bold.pfa\n\nUse a tab character to separate the fields, and the ‘foundry’ field should  be  null  for\nthe default foundry.\n",
            "subsections": []
        },
        "ENVIRONMENT": {
            "content": "GROFFFONTPATH\nA  list of directories in which to search for the devname directory in addition to the\ndefault ones.  If, in the download file, the font file has been specified with a  full\npath, no directories are searched.  See troff(1) and grofffont(5) for more details.\n\nGROPDFNOSLIDE\nIf this is set true, gropdf will ignore all commands which produce a presentation pdf,\nand produce a normal pdf instead.\n\nSOURCEDATEEPOCH\nA timestamp (expressed as seconds since the Unix epoch) to use as the  creation  time‐\nstamp in place of the current time.\n",
            "subsections": []
        },
        "FILES": {
            "content": "/usr/share/groff/1.22.4/font/devpdf/DESC\nDevice description file.\n\n/usr/share/groff/1.22.4/font/devpdf/F\nFont description file for font F.\n\n/usr/share/groff/1.22.4/font/devpdf/U-F\nFont description file for font F (using foundry U rather than the default foundry).\n\n/usr/share/groff/1.22.4/font/devpdf/download\nList of downloadable fonts.\n\n/usr/share/groff/1.22.4/font/devpdf/Foundry\nA Perl script used during install to locate suitable fonts.\n\n/usr/share/groff/1.22.4/font/devpdf/enc/text.enc\nEncoding used for text fonts.\n\n/usr/share/groff/1.22.4/tmac/pdf.tmac\nMacros for use with gropdf; automatically loaded by troffrc.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "afmtodit(1), groff(1), troff(1), grofffont(5), groffout(5)\n\n\n\ngroff 1.22.4                                23 March 2022                                  GROPDF(1)",
            "subsections": []
        }
    },
    "summary": "gropdf - PDF driver for groff",
    "flags": [
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": "PDF."
        },
        {
            "flag": "-e",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-F",
            "long": null,
            "arg": null,
            "description": "files; name is the name of the device, usually pdf."
        },
        {
            "flag": "-I",
            "long": null,
            "arg": null,
            "description": "\\X'pdf: pdfpic' escape. The current directory is always searched first. This option may be specified more than once; the directories are then searched in the order speci‐ fied. No directory search is performed for files with an absolute file name."
        },
        {
            "flag": "-l",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": "Set physical dimension of output medium. This overrides the papersize, paperlength, and paperwidth commands in the DESC file; it accepts the same arguments as the paper‐‐ size command. See grofffont(5) for details."
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "ment. Ghostscript's ps2pdf complains about this line if it is included, but works anyway."
        },
        {
            "flag": "-u",
            "long": null,
            "arg": null,
            "description": "Gropdf normally includes a ToUnicode CMap with any font created using text.enc as the encoding file, this makes it easier to search for words which contain ligatures. You can include your own CMap by specifying a cmapfile or have no CMap at all by omitting the argument."
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Print the version number and exit."
        },
        {
            "flag": "-y",
            "long": null,
            "arg": null,
            "description": "Set the foundry to use for selecting fonts of the same name."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "afmtodit",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/afmtodit/1/json"
        },
        {
            "name": "groff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/groff/1/json"
        },
        {
            "name": "troff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/troff/1/json"
        },
        {
            "name": "grofffont",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/grofffont/5/json"
        },
        {
            "name": "groffout",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/groffout/5/json"
        }
    ]
}