Qrop logoQrop

SVG vs PNG vs PDF output: which format for which integration

By Qrop Team ·

POST /api/v1/generate and POST /api/v1/generate/batch both take a format field set to png, svg, or pdf, and it's easy to treat that as a cosmetic choice, pick whichever one your integration's file-upload field expects and move on. Two of the three behave in ways that aren't obvious from the field name alone, and getting it wrong doesn't show up as an error, it shows up later as a missing logo or a QR code that doesn't scale the way a print vendor expected.

This guide covers what each format actually is under the hood, the one case where SVG silently drops a feature you asked for, and why PDF output needs different handling than its name implies. If you haven't picked an error correction level for your integration yet, that's a separate decision covered in our error correction guide, this one is entirely about the format field.

PNG: the raster default, and the only format with full feature support

PNG is a rasterized bitmap at whatever resolution you request (1 to 4096px, capped by your plan), and it's the only one of the three formats that supports every option in the request: custom colours, module and finder shapes, image roundness, and a logo composited into the centre. If your integration needs the full customization surface, PNG is the format that actually delivers all of it.

It's also the right default for anything screen-based: emails, app UI, a link-in-bio page, a dashboard preview. The resolution cap per plan (1024px Starter, 2048px Pro and Growth, 4096px Enterprise) matters more for PNG than for the other two formats, since it's a fixed pixel grid, not something that can be rescaled later without visible quality loss.

SVG: vector output, but logos are silently dropped on a single generate call

SVG returns actual vector markup, a single compound path for the QR modules rather than a pixel grid, so it scales to any size (a business card or a billboard) without the blur or blocky edges PNG would show at extreme scale-up. That's the entire appeal of choosing SVG: resolution stops being a decision you have to get right upfront.

The part that isn't obvious from the API spec alone: request logoUrl or logoDataUrl alongside format: svg on a single POST /api/v1/generate call, and the response comes back as a clean SVG with no error and no logo. Logo compositing happens via sharp, which rasterizes onto a pixel buffer, and that step is skipped entirely for vector output. You get a valid, scannable QR code, just not the one you asked for if you expected a logo in the centre.

Batch behaves differently, and more safely: POST /api/v1/generate/batch rejects a logo combined with format: svg outright, with a 422 and no credit consumed, rather than silently dropping it across up to 25 items. If your integration needs both a logo and vector output, neither endpoint gives you that combination, PNG with a logo, then a separate vectorization step downstream if you genuinely need SVG later, is the only path.

PDF: a rasterized image in a single-page container, not a vector file

PDF output is the one most likely to be picked for the wrong reason. It sounds like the print-ready, resolution-independent choice, PDF is a vector-native format in general, and a lot of design and print software treats a PDF as scalable by default. Qrop's PDF output isn't that: it's the same PNG raster that format: png would produce, embedded as a single image on a single PDF page. Requesting a logo or custom colours works exactly as it does for PNG, since the rasterization step is identical, only the container around the finished image changes.

That means the resolution you request still matters for a PDF the same way it matters for a PNG: pick the target print size and set resolution accordingly before generating, don't rely on the PDF wrapper to make the image scale cleanly afterward. If a print vendor's workflow specifically expects a true vector PDF (no raster content, infinitely scalable), Qrop's PDF output won't satisfy that requirement, SVG is the closer fit there, with the logo caveat above in mind.

Where PDF output genuinely earns its place over PNG is workflow, not image quality: a system that already ingests PDFs (a document generator, an invoicing pipeline, a print queue that expects one file per page) can drop a QR code straight into that pipeline without a separate embed-image-into-PDF step of its own.

Picking a format for the integration, not the code

  • Web and app display, email, dashboards: png. Full feature support, and screen contexts rarely need true vector scaling.
  • A logo is required, on either a single call or a batch: png. It's the only format where the logo is guaranteed to actually render.
  • Print at a size you don't know yet, or content that needs to scale cleanly across many sizes without regenerating: svg, as long as the design doesn't also need a logo baked in.
  • Feeding directly into a PDF-based document pipeline (invoices, printable tags, an existing print-queue system): pdf, treating it as a convenient container rather than a true vector upgrade over png.
  • Mixed requirements across one print run, some items need a logo and others need vector scaling, for instance, are two different requests with two different format values, not one request trying to do both.

Frequently asked questions

Why did my SVG request with a logo come back without the logo, instead of an error?

On POST /api/v1/generate, logo compositing is skipped for format: svg by design rather than rejected, since logos are rasterized via sharp and that step doesn't apply to vector output. You'll get a valid, scannable SVG QR code, just without the logo. Use format: png if the logo needs to appear.

Does batch generation reject a logo with SVG format the same way?

No, batch is stricter: POST /api/v1/generate/batch returns a 422 and consumes no credit if you send a logo together with format: svg, rather than silently dropping it. This is intentional since a silent drop across up to 25 items in one call would be a bigger surprise than on a single request.

Is Qrop's PDF output a true vector PDF I can scale infinitely?

No. It's the same rasterized PNG that format: png produces, embedded as a single image on one PDF page. Resolution still determines image quality, exactly as it does for PNG. If you need genuinely resolution-independent vector output, use format: svg instead.

Which format should I use if I need both a logo and vector scalability?

Neither single-call nor batch generation supports that combination directly. Generate with format: png to get the logo composited, then run the PNG through a separate vectorization step outside Qrop if you genuinely need a scalable vector file with the logo included.

Does the format choice affect how many credits a generation costs?

No. Credit cost is based on the generation itself, not the output format, choosing svg or pdf over png doesn't change what a request costs.

Related guides

Ready to create your QR code?

Generate a free QR code in seconds: custom colours, logos, and PNG, SVG or PDF output.

Open the generator

We use strictly necessary cookies to run Qrop, and (only with your consent) advertising cookies. See our privacy policy for details.