{
    "mode": "man",
    "parameter": "pbmtoppa",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pbmtoppa/1/json",
    "generated": "2026-06-12T11:53:56Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "pbmtoppa - convert PBM image to HP Printer Performance Architecture (PPA)\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "pbmtoppa",
                    "content": "[pbmfile [ppafile]]\n\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "pbmtoppa converts page images in PBM format to Hewlett Packard's PPA (Printer Performance Ar‐\nchitecture) format, which is the data stream format expected by some HP \"Windows-only\" print‐\ners  including the HP Deskjet 820C series, the HP DeskJet 720 series, and the HP DeskJet 1000\nseries.\n\npbmfile is the file specification of the input file or - for Standard Input.  The default is\nStandard Input.\n\nThe  input file contains one or more PBM images, with each one being a single page.  Each im‐\nage must have the exact dimensions of a page (at 600 pixels per  inch  in  both  directions).\nSignificantly, this is the format the Ghostscript produces.\n\nppafile  is the file specification of the output file or - for Standard Output.  The default\nis Standard Output.\n\n\nTo print Postscript on an HP PPA printer, just use Ghostscript with the pbmraw (or  pbm)  de‐\nvice driver.\n\nYou can generate a test page for use with this program with pbmpage.\n\nYou  can  also  set  up  a  printer filter so you can submit PBM input directly to your print\nqueue.  See the documentation for your print spooler for information on how to  do  that,  or\nlook in hp820install.doc for an example lpd print filter for Postscript and text files.\n\nSometimes, pbmtoppa generates a file which the printer will not print (because pbmtoppa's in‐\nput is unprintable).  When this happens, all three lights blink to signal the error.  This is\nusually  because there is material outside of the printer's printable area.  To make the file\nprint, increase the margins via pbmtoppa options or a configuration file.  See  the  CALIBRA‐\nTION section below.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-v",
                    "content": "printer version (720, 820, or 1000)\n",
                    "flag": "-v"
                },
                {
                    "name": "-x",
                    "content": "vertical offset adjustment in 1\"/600\n",
                    "flag": "-x"
                },
                {
                    "name": "-y",
                    "content": "horizontal offset adjustment in 1\"/600\n",
                    "flag": "-y"
                },
                {
                    "name": "-t",
                    "content": "top margin in 1\"/600    (default: 150 = 0.25\")\n",
                    "flag": "-t"
                },
                {
                    "name": "-l",
                    "content": "left margin in 1\"/600   (default: 150 = 0.25\")\n",
                    "flag": "-l"
                },
                {
                    "name": "-r",
                    "content": "right margin in 1\"/600  (default: 150 = 0.25\")\n",
                    "flag": "-r"
                },
                {
                    "name": "-b",
                    "content": "bottom margin in 1\"/600 (default: 150 = 0.25\")\n",
                    "flag": "-b"
                },
                {
                    "name": "-s",
                    "content": "paper size: us or a4.  Default is us.\n",
                    "flag": "-s"
                },
                {
                    "name": "-f",
                    "content": "read parameters from configuration file cfgfile\n\n\nThe -x and -y options accumulate.\n\nThe -v option resets the horizontal and vertical adjustments to an internal default.\n\n\n\n",
                    "flag": "-f"
                }
            ]
        },
        "CONFIGURATION FILES": {
            "content": "You  can  use  configuration  files to specify parameters rather than use invocation options.\npbmtoppa processes the file /etc/pbmtoppa.conf, if it exists, before processing any  options.\nIt then processes each configuration file named by a -f option in order, applying the parame‐\nters from the configuration file as if they were invocation options used in the place of  the",
            "subsections": [
                {
                    "name": "-f",
                    "content": "Configuration files have the following format:\n\n#Comment\nkey1 value1\nkey2 value2\n[etc.]\n\nValid  keys  are version, xoffset, yoffset, topmargin, leftmargin, rightmargin, bottommargin,\npapersize, or any non-null prefix of these words.  Valid values are the same as with the cor‐\nresponding invocation parameters.\n\n\n",
                    "flag": "-f"
                }
            ]
        },
        "EXAMPLES": {
            "content": "Print a test pattern:\n",
            "subsections": [
                {
                    "name": "pbmpage | pbmppa >/dev/lp1",
                    "content": "Print three pages:\n"
                },
                {
                    "name": "cat page1.pbm page2.pbm page3.pbm | pbmppa >/dev/lp1",
                    "content": "Print the Postscript file myfile.ps:\n"
                },
                {
                    "name": "gs -sDEVICE=rawpbm -q -dNOPAUSE -r600 \\",
                    "content": "-sOutputFile=- myfile.ps \\"
                },
                {
                    "name": "| pbmtoppa | lpr",
                    "content": ""
                }
            ]
        },
        "CALIBRATION": {
            "content": "To  be able to print successfully and properly, you need to tell pbmtoppa an X and a Y offset\nappropriate for your printer to use when generating the page.  You can specify these  offsets\nwith the -x and -y invocation options or with the xoff and yoff parameters in a pbmtoppa con‐\nfiguration file.\n\nTo determine the correct offsets, use the pbmpage program.\n\nIf while trying to do this calibration, the printer refuses to print a page, but just  blinks\nall  three lights, specify large margins (e.g. 600 pixels -- one inch) via pbmpage invocation\noptions while doing the calibration.\n\nFor example:\n",
            "subsections": [
                {
                    "name": "pbmpage | pbmtoppa >/dev/lp1",
                    "content": "or"
                },
                {
                    "name": "pbmpage | pbmtoppa | lpr -l",
                    "content": "(if your printer filter recognizes the '-l' (direct output) parameter).\n\nIn the test pattern, the grid is marked off  in  pixel  coordinate  numbers.   Unfortunately,\nthese  coordinates  are  probably cut off before the edge of the paper.  You'll have to use a\nruler to estimate the pixel coordinate of the left and top edges of the actual sheet of paper\n(should be within +/- 300, may be negative; there are 600 pixels per inch).\n\nAdd  these coordinates to the X and Y offsets by either editing the configuration file or us‐\ning the -x and -y command-line parameters.\n\nWhen pbmtoppa is properly calibrated, the center mark should be in the center of  the  paper.\nAlso,  the  margins  should be able to be as small as 1/4 inch without causing the printer to\nchoke with 'blinking lights syndrome'.\n\n"
                }
            ]
        },
        "REDHAT LINUX INSTALLATION": {
            "content": "RedHat users may find the following tip from Panayotis Vryonis <vrypan@hol.gr> helpful.   The\nsame  should  work for the 820 and 1000, but it hasn't been tested.  Also, use the pbmraw GS‐\nDriver if you have it; it's faster.\n\nHere is a tip to intergrate HP720C support in RedHat's printtool:\n\nInstall pbm2ppa. Copy pbm2ppa to /usr/bin.\n\nEdit \"printerdb\" (in my system it is found in /usr/lib/rhs/rhs-printfilters ) and append  the\nfollowing lines:\n\n----------------------Cut here-----------------------\nStartEntry: DeskJet720C\nGSDriver: pbm\nDescription: {HP DeskJet 720C}\nAbout: { \\\nThis driver supports the HP DeskJet 720C \\\ninkjet printer. \\\nIt does does not support color printing. \\\nIMPORTANT! Insert \\\n\"- | pbm2ppa -\" \\\nin the \"Extra GS Otions\" field.\\\n}\nResolution: {600} {600} {}\nEndEntry ----------------------------------------------------\n\nNow you can add an HP720C printer just like any other, using printtool.\n\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pbmpage(1), pstopnm(1), pbm(5)\n\npnm2ppa is not part of Netpbm, but does the same things as pbmtoppa except it also works with\ncolor and has lots more features.  See <http://sourceforge.net/project/?groupid=1322>.\n\nThe file INSTALL-MORE in the pbmtoppa directory of the Netpbm source code  contains  detailed\ninstructions  on  setting  up a system to use pbmtoppa to allow convenient printing on HP PPA\nprinters.  It was written by Michael Buehlmann.\n\nFor information about the PPA protocol and the separately distributed  pbm2ppa  program  from\nwhich pbmtoppa was derived, see <http://www.httptech.com/ppa>.\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Tim Norman.  Copyright (C) 1998.  Licensed under GNU Public License\n\nManual page by Bryan Henderson, May 2000.\n\n\n\n01 May 2000                                 pbmtoppa(1)",
            "subsections": []
        }
    },
    "summary": "pbmtoppa - convert PBM image to HP Printer Performance Architecture (PPA)",
    "flags": [
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": "printer version (720, 820, or 1000)"
        },
        {
            "flag": "-x",
            "long": null,
            "arg": null,
            "description": "vertical offset adjustment in 1\"/600"
        },
        {
            "flag": "-y",
            "long": null,
            "arg": null,
            "description": "horizontal offset adjustment in 1\"/600"
        },
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": "top margin in 1\"/600 (default: 150 = 0.25\")"
        },
        {
            "flag": "-l",
            "long": null,
            "arg": null,
            "description": "left margin in 1\"/600 (default: 150 = 0.25\")"
        },
        {
            "flag": "-r",
            "long": null,
            "arg": null,
            "description": "right margin in 1\"/600 (default: 150 = 0.25\")"
        },
        {
            "flag": "-b",
            "long": null,
            "arg": null,
            "description": "bottom margin in 1\"/600 (default: 150 = 0.25\")"
        },
        {
            "flag": "-s",
            "long": null,
            "arg": null,
            "description": "paper size: us or a4. Default is us."
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": "read parameters from configuration file cfgfile The -x and -y options accumulate. The -v option resets the horizontal and vertical adjustments to an internal default."
        }
    ],
    "examples": [
        "Print a test pattern:",
        "Print three pages:",
        "Print the Postscript file myfile.ps:",
        "-sOutputFile=- myfile.ps \\"
    ],
    "see_also": [
        {
            "name": "pbmpage",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pbmpage/1/json"
        },
        {
            "name": "pstopnm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pstopnm/1/json"
        },
        {
            "name": "pbm",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/pbm/5/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Convert a PBM image to HP Printer Performance Architecture format.",
        "examples": [
            {
                "description": "Convert a PBM image into a PPA file",
                "command": "pbmtoppa {{path/to/image.pbm}} > {{path/to/output.ppa}}"
            },
            {
                "description": "Specify the desired dots-per-inch and paper size",
                "command": "pbmtoppa -d {{300}} -s {{a4}} {{path/to/image.pbm}} > {{path/to/output.ppa}}"
            }
        ]
    }
}