Menu

PNG to PDF

← TOC    ↑ Home    PNG PDF EPS JPEG

PNG to PDF

This page shows how to convert a PNG image x.png to PDF.

There is no bitmap to vector conversion in this process. Bitmap image data is just re-packaged into the PDF format.

When converting PNG files to PDF you can produce the following output
types:

  • object
    If the PNG file contains an alpha channel, opacity data is transferred into an SMask object in PDF output. This is the default output type.
  • image
    If the PNG file contains an alpha channel, opacity data is used to mix foreground colour against a background colour. No SMask object is written to PDF output.
  • document
    The image is resized and probably rotated to fit a specified paper size. If the PNG file contains an alpha channel, opacity data is used to mix foreground colour against a background colour. No SMask object is written to PDF output.

Choice 1: Use gxhconvert

Procedure

gxhconvert -o=pdf x.png

Options

Option Purpose
-d
--document
Produce a document instead of an object, fit output to a paper size.
-i
--image
Produce a standalone image instead of an object. The options -d and -i are mutually exclusive.
--paper=paper String, paper format name for documents. Only available if the -d option is used.
Default: A4.

Choice 2: Manual conversion, produce object

bitmap2pp -l pdf x.png

Choice 3: Manual conversion, produce image

bitmap2pp -l pdf.image x.png

Choice 4: Manual conversion, produce document

bitmap2pp -l pdf.document,paper=A4 x.png
← TOC    ↑ Home    PNG PDF EPS JPEG