Convertify LogoConvertify
how-to

Why Your PNG-to-PDF Conversion Has White Borders (And How to Stop It)

You converted an image to PDF and got a thick white margin around it. Here's why that happens, and how to get a PDF page that matches your image exactly.

By Convertify TeamPublished Last reviewed 5 min read

Written and fact-checked by the Convertify editorial team. We test every workflow on real documents (government forms, design exports, scanned IDs, source code) before publishing — and re-test on each review date to keep the steps current.

You convert a PNG and open the PDF expecting your image. What you get is your image floating in the middle of a page with a white border around it, like a badly matted photograph. This is not a bug — it is a consequence of how PDF pages work, and it is fixable once you understand what is happening.

Where the border comes from

A PNG has one property that matters here: its pixel dimensions. A PDF page has a different one: a physical size, measured in points, inches or millimetres.

When a converter places your image on a page, it has to pick a page size. Most default to A4 or US Letter, because most PDFs are documents meant for printing. Your image is then scaled to fit inside that page while keeping its aspect ratio.

If your image's proportions do not match the page's proportions, the leftover space becomes margin. A square screenshot on a tall A4 page leaves white bands top and bottom. A wide banner leaves them either side.

The white is not added to your image. It is simply the page showing through.

Getting a page that matches your image

The clean fix is to make the PDF page the same shape as the image, rather than fitting the image into a document-shaped page. Our PNG to PDF converter sizes pages to the images by default, so a 1200x800 screenshot becomes a 1200x800-proportioned page with no margin at all.

If a converter offers a page-size setting, look for an option named something like "fit to image", "match image size", or "original". If it only offers A4, Letter and Legal, you are going to get borders no matter what you do.

When you actually want A4

Do not reflexively remove the margin. It exists for a reason in some cases:

If the PDF will be printed, a page sized to your image will confuse the printer, which expects standard paper. It will scale your borderless page onto A4 and add its own margins — often unevenly. Choose A4 deliberately in that case.

If it is going into a document bundle, mixed page sizes look untidy and can break other people's printing. Match the rest of the bundle.

If it is being uploaded to a form, some validators expect standard page sizes and reject anything unusual.

The rule of thumb: image-sized pages for screens, A4 for paper.

The other kind of white border

There is a second cause worth ruling out, because the fix is completely different: the white might be *in your PNG*.

Screenshots often include the window chrome or the page background. Exports from design tools frequently include the artboard background. If your image genuinely has white pixels around the content, no PDF setting will remove them, because from the converter's point of view that white is part of the picture.

Quick test: open the PNG on its own, on a dark background — drag it onto a dark desktop, or open it in a viewer with a dark theme. If you can see white around the content there, the border is in the image. Crop it before converting.

Transparent PNGs turn white

A related surprise. PNG supports transparency; PDF handles it inconsistently, and most converters composite transparent areas onto white when placing the image.

So a logo with a transparent background becomes a logo on a white rectangle. If it lands on a white page you will not notice. If it lands on anything else, you will.

If transparency matters, keep the asset as PNG and place it in a proper layout tool rather than converting it directly to PDF.

Multiple images, consistent look

When you are combining several images into one PDF — receipts, a set of screenshots, scanned pages — consistency reads better than tightness. If the images are different shapes, sizing every page to its image gives you a document whose pages change size as you scroll, which feels broken even when it is technically correct.

For mixed-shape bundles, pick a standard page size and accept the margins. For a set of images that are all the same shape, size to the image and enjoy the clean result.

Frequently Asked Questions

How do I convert a PNG to PDF without a white border?

Use a converter that sizes the PDF page to the image rather than forcing A4. Ours does that by default, so a 1200x800 image produces a page with the same proportions and no margin.

Why is my transparent PNG showing a white background in the PDF?

Most converters composite transparency onto white when placing an image in a PDF, because PDF handles alpha inconsistently across viewers. If transparency matters for your use, keep the file as PNG rather than converting it.

Should I use A4 or match the image size?

Match the image for anything that will be viewed on a screen. Choose A4 if the PDF will be printed, joined into a document bundle, or uploaded somewhere that expects standard page sizes — a borderless custom page confuses printers.

I removed the setting and there's still a white edge.

The white is probably in the PNG itself — window chrome from a screenshot, or an artboard background from a design tool. Open the image on a dark background to check, and crop it before converting if so.

Ready to Try This Tool?

Put what you learned into action. Try Convertify's free PDF tools now - no sign up required!

Try Png To Pdf Tool →
Ad

Other Tools You Might Need

Related Articles

Ad