← Back to blog
PDF Guide4 min read

SVG px, mm, and pt Explained for Correct PDF Page Sizes

A unit conversion guide for SVG to PDF: CSS pixels, points, millimeters, viewBox coordinates, A4 dimensions, and page-size troubleshooting.

On this page

Advertisement

An SVG can use unitless coordinates, CSS pixels, points, millimeters, centimeters, or inches. A PDF page uses physical dimensions, normally expressed internally in points. Confusing those systems is why an SVG intended to be A4 sometimes exports as a tiny card or an oversized poster.

The key rule in SVG2IMG is:

1 CSS pixel is treated as 0.75 PDF point, based on 96 CSS pixels per inch and 72 PDF points per inch.

Physical SVG units such as mm, cm, in, and pt are converted through the same 96-DPI CSS reference.

The Unit Relationships

UnitEquivalent
1 in96 CSS px
1 in72 PDF pt
1 px0.75 pt
1 mmabout 3.7795 px
1 ptabout 1.3333 px

These conversions define page dimensions. They do not determine raster image quality by themselves. DPI matters only when SVG content is rendered into pixels.

Why 210 × 297 px Is Not A4

A4 is 210 × 297 millimeters. If an SVG says:

xml
<svg width="210" height="297" viewBox="0 0 210 297">

the unitless width and height are treated as pixels. At 96 px per inch, the PDF page is only about 55.6 × 78.6 mm.

For a physical A4 page, write:

xml
<svg width="210mm" height="297mm" viewBox="0 0 210 297">

The viewBox still provides a convenient 210-by-297 drawing coordinate system, while width and height specify the physical page.

You can also use pixels that correspond to A4 at 96 DPI, but the millimeter form is clearer when print size is the intent.

Width and Height Versus viewBox

These attributes answer different questions:

  • width and height define the viewport and, when physical units are present, the intended physical size.
  • viewBox defines the internal coordinate system and visible region.

For example:

xml
<svg width="100mm" height="50mm" viewBox="0 0 1000 500">

The PDF page is 100 × 50 mm. The artwork is designed in a 1000 × 500 coordinate system and scaled to fit that page. One drawing unit is not one millimeter.

Changing only the viewBox can crop or zoom the artwork without changing the intended page dimensions. Changing only width and height changes the output page size.

Common Page Sizes

PageMillimetersCSS pixels at 96 DPIPDF points
A4 portrait210 × 297793.70 × 1122.52595.28 × 841.89
A4 landscape297 × 2101122.52 × 793.70841.89 × 595.28
US Letter215.9 × 279.4816 × 1056612 × 792
A5 portrait148 × 210559.37 × 793.70419.53 × 595.28

Small decimal differences are normal. PDF viewers may round the displayed dimensions.

Custom Pixel Dimensions

If you enter 800 × 600 px, the PDF page becomes 600 × 450 pt, or about 211.7 × 158.8 mm. This is useful when the SVG comes from a screen-design workflow and the exact pixel-based aspect ratio matters. It is less convenient when a printer expects A4, Letter, or another physical standard.

For print, prefer source SVG dimensions in mm, cm, in, or pt, then choose original size during conversion.

Page Size Is Not Print Resolution

A vector PDF has no single DPI for its paths. Curves and shapes are recalculated by the printer at output resolution. Embedded bitmap images keep their own pixel dimensions.

An image PDF does have an effective DPI:

text
effective DPI = image pixels / page width in inches

An A4 page is 8.27 inches wide. A raster 2480 pixels wide is about 300 DPI. A raster 1240 pixels wide is about 150 DPI.

SVG2IMG targets 300 DPI for image PDF fallback, while limiting the longest raster dimension to 4096 pixels to control browser memory. Very large physical pages can therefore fall below 300 DPI.

Troubleshoot an Unexpected PDF Size

  1. Inspect the root <svg> width, height, and viewBox.
  2. Look for omitted units: 210 means pixels, not millimeters.
  3. Check whether a design tool exported only the selected artwork instead of the artboard.
  4. Use original size if the SVG already has physical units.
  5. Use custom dimensions only when you intentionally want a pixel-defined page.
  6. Verify the PDF document properties, not just the zoom percentage in the viewer.

A PDF viewer's “Fit page” mode can make different page sizes look identical on screen. Open document properties or enable rulers to confirm the physical dimensions.

Before Sending to Print

Correct page size is only one part of print preparation. Also confirm bleed and trim requirements, safe margins, color profile expectations, font outlining, PDF/X requirements, and the effective DPI of raster effects.

Use the SVG to PDF converter with original size to preserve physical SVG units. If your source is designed in pixels, calculate the target physical dimensions before choosing a custom page size.

Put the guide into practice

Convert SVG files locally in your browser without uploading them.

Open converter