Web Analytics
Skip to content
← All writing
Engineeringen · OriginalSeptember 2, 2026 · 7 min read

Vector vs Raster in PDFs: Why Images Decide Your File Size

Vector vs raster inside a PDF explained: how image type, DPI, and resolution drive file size and print quality, and what you can safely shrink.

M
Mezi Aris ApronnyFounder, Nelenga · Seginim, Bengkulu Selatan
Vector vs Raster in PDFs: Why Images Decide Your File Size

Vector graphics store shapes as math (points, lines, curves), so they stay razor-sharp at any size and take almost no space. Raster graphics store a fixed grid of pixels, so they carry real weight in your file and blur when you scale them up. Inside a PDF, that single difference decides most of your file size: a page of vector text and logos can be a few kilobytes, while one full-page photo can be several megabytes.

Vector vs raster in plain terms

A vector image is a set of instructions. “Draw a circle here, fill it gold, run a curve from this point to that one.” The file stores the recipe, not the result, so the same logo renders crisp on a business card and on a billboard.

A raster image is a photograph of pixels. It stores a grid: 4000 columns by 3000 rows, each cell holding a color value. That is raster vs vector graphics in one line: math versus a pixel grid.

PDFs hold both at once. The text you select and search is vector. Scanned pages, screenshots, and photos are raster, embedded as compressed image streams (usually JPEG or a Flate-encoded bitmap). When people ask why one PDF is tiny and another is huge, the answer is almost always how much raster it carries and at what resolution.

How each behaves when you zoom or scale a PDF

Zoom into a vector PDF at 800 percent and the letters stay clean. The viewer just recomputes the curves at the new size. Nothing degrades because there is nothing fixed to degrade.

Zoom into a raster image and you hit the pixel grid. Past its native resolution the viewer has no new detail to show, so it stretches existing pixels and you get soft, blocky edges. This is why a scanned contract looks fine at 100 percent and mushy at 400 percent.

Scaling down is safer for raster but wasteful. If you drop a 4000-pixel-wide photo into a slot that only displays 800 pixels, the PDF still stores all 4000 pixels. You pay for detail nobody sees. That gap is where most bloated documents come from, and it is the first thing to check when you want to reduce a heavy PDF.

DPI and resolution: the file-size multiplier

DPI (dots per inch) is how many pixels get packed into each printed inch. Resolution is the raw pixel count. Together they set how much raster data a PDF has to store, and file size grows with the square of DPI, not in a straight line.

Double the DPI and you roughly quadruple the pixel count. A 6 inch by 4 inch image at 150 DPI is 900 by 600 pixels, about 540,000 pixels. The same image at 300 DPI is 1800 by 1200, about 2.16 million pixels. Same picture, four times the data. That squared relationship is the real reason PDF resolution matters so much for size.

So when you set DPI for a PDF, you are not adjusting a quality dial. You are choosing a size multiplier. Picking 600 DPI “to be safe” for a document that only ever gets emailed can inflate it by 4x over 300 DPI for zero visible gain on screen.

What DPI you actually need for screen vs print

Match DPI to where the file will be seen. Overshooting is the most common cause of a large PDF.

  • Screen and email only: 72 to 150 DPI is plenty. Most displays cannot resolve more.
  • Standard office printing: 200 to 300 DPI covers laser and inkjet output cleanly.
  • Professional print (magazines, glossy): 300 DPI is the norm; some presses ask for more on fine detail.
  • Line art and scanned text: 300 to 600 DPI, because sharp black edges show aliasing sooner than photos do.

If the same file lives on screen and occasionally prints, 150 to 200 DPI is a sane middle. You almost never need 300 DPI for a document that stays digital.

Why a raster-heavy PDF is huge and a vector one is tiny

Ten pages of vector text might total 40 KB. One high-res photo can be 5 MB on its own. The imbalance is that stark because vectors store a short recipe while raster stores every pixel.

A common trap is the scanned document. Scanning turns even plain text into a raster image, so a 12-page scanned report at 300 DPI can be 20 MB, while the same report typed as real text would be under 200 KB. The scan looks identical on screen but carries hundreds of times more data, and the text is not selectable. That trade-off is worth understanding before you scan anything you could keep as a real searchable PDF.

So the size question usually reduces to two things: how many raster images the PDF holds, and at what resolution each one is stored. Fix those and the file shrinks fast.

Downsampling images without visible quality loss

Downsampling means throwing away pixels the document never shows. If an image displays at 800 pixels wide but stores 4000, cutting it to around 1000 pixels loses nothing you can see and can drop the file by 80 percent or more.

PDF image compression works on two levers at once. First, downsample every image to a target DPI (150 for screen, 200 to 300 for print). Second, apply or increase JPEG compression on the photos, which trims color data the eye barely registers. Both together are how “compress PDF” features get their big wins.

Keep one rule in mind: raster compression is lossy and does not fully reverse. Compress from the highest-quality original you have, not from a file you already squeezed. Stacking lossy passes builds up blocky artifacts around edges and text.

When to keep vector (logos, text) vs raster (photos)

Match the format to the content, and most size problems disappear before they start.

Keep it vector when the source is already made of shapes: logos, icons, charts, diagrams, and of course body text. Vector stays sharp at every zoom and costs almost nothing in file size. Rasterizing a logo (flattening it to pixels) is a common mistake that adds weight and kills scalability at once.

Keep it raster when the source is a photograph or a scan. Photos have no clean shapes to describe with math, so vector cannot represent them. The goal there is not to convert but to store them at sensible resolution and compression.

The worst case is a whole page rasterized into one flat image, which is what “print to PDF as image” or a plain scan produces. You lose selectable text, searchability, and any size advantage. Keep text as text whenever you can.

Practical steps to reduce image size in a PDF

Work through these in order. Each one targets the raster weight directly.

  1. Find the heavy images. In most PDF tools the file inspector or “reduce size” preview shows which images dominate. It is nearly always one or two full-page photos or scans.
  2. Set a target DPI that matches the destination. 150 for screen, 200 to 300 for print. Downsample everything above it.
  3. Turn on or raise JPEG compression for photos. Medium quality is usually invisible on screen and cuts size hard.
  4. Keep text and logos as vector. Do not flatten the page to an image unless you truly need to.
  5. Replace scans with real text where you can. Running OCR or retyping a short scanned page saves far more than any compression setting.
  6. Compress from the original, once. Avoid re-squeezing an already-compressed file.

If your bloat is a photo or a screenshot rather than the PDF itself, shrink the image before it ever goes into the document. Our image compressor lets you drop the pixel dimensions and quality of a JPEG or PNG in seconds, so the version you embed is already lean.

FAQ

What DPI should a PDF be? Match it to where the file will be viewed. Use 72 to 150 DPI for screen and email, and 200 to 300 DPI for printing. Higher than 300 rarely helps a normal document and multiplies the file size, since size grows with the square of DPI.

Why is my PDF so large even though it is short? Almost always a raster image at high resolution: a photo, a screenshot, or a scanned page. A single 300 DPI scan can outweigh dozens of pages of real text. Downsample the image or replace the scan with selectable text.

Does compressing a PDF lose quality? Compressing text and vector graphics loses nothing. Compressing raster images (photos, scans) is lossy, so heavy compression can soften edges. Always compress from the highest-quality original, and do it once rather than in repeated passes.

Can I convert a raster image to vector to save space? Only for simple graphics like logos or line art, where tracing tools can rebuild clean shapes. Photographs cannot be vectorized meaningfully, because they have no defined edges to describe. For photos, the right move is sensible resolution plus JPEG compression, not conversion.

#pdf#documents#guide