← Back to the blog
CFDINovember 8, 2026

How to convert an invoice XML to PDF

The difference between an invoice's XML and PDF, what a CFDI PDF must include and how to convert one or hundreds of XML files to PDF with nothing to install.

When SAT stamps an invoice, what exists is an XML file. Your clients, your accountant or your payables team almost always ask for the PDF too. Here is what each one is, what the PDF must include and how to get it from your XML files.

XML or PDF: which one is the invoice

The XML is the invoice. It is the document with tax validity, the one that carries the issuer’s and SAT’s digital seals, and the one used for accounting and tax returns. It is made for systems to read, which is why you only see tags and attributes when you open it.

The PDF is its printed representation. It is for reading, printing and sending the invoice. It does not replace the XML: anyone who needs the invoice to deduct it needs the XML.

What a CFDI PDF must include

Rule 2.7.1.7 of the Resolución Miscelánea Fiscal requires the printed representation to include:

The PDF also reproduces the CFDI data required by article 29-A of the Código Fiscal: the issuer’s RFC and tax regime, tax folio, digital seals from the issuer and SAT, place and date of issue, receiver details, line items, taxes and total.

If the CFDI has complements, such as payments or Carta Porte, their data goes in the PDF too. Carta Porte also carries its own QR code.

How to convert an XML to PDF

From the SAT portal

On SAT’s invoice portal you can look up an issued or received invoice and download its PDF. It works for a single invoice, but you have to find them one by one and the PDF comes out with SAT’s design, without your logo.

With OBPDF

  1. Create your free account. No card required.
  2. Drop your XML or a ZIP with several.
  3. Press Convert and download each PDF or all of them in one ZIP.

Each PDF carries the QR code, seals, original string, legend and complements. If you want, create a style with your colors and logo, and assign it to your RFC so it applies automatically. The free plan includes 20 documents a month.

How to convert many XML files at once

If you have a month’s or a whole year’s invoices, compress them into a ZIP and upload it. OBPDF accepts up to 2,000 XML files per ZIP and gives you back another ZIP with one PDF per invoice.

If the XML files come from your own system, you can generate the PDFs with the OBPDF API, included on every plan.

If you only want to see what the XML says

To check an invoice without converting it, use the free XML viewer. Drop the file and see it laid out like an invoice: issuer, receiver, line items, taxes and stamp. The XML is read in your browser and is not uploaded to any server.

To learn what each field means, read how to open and read a SAT invoice XML.

Quick questions

Does the PDF have tax validity? Not on its own. Validity belongs to the XML. The PDF is the version for reading and sharing.

Can I change the PDF design? Yes. You can change colors, fonts, logo and the order of the sections. The tax data does not change: the QR code, seals and original string are always included.

Does it work for older invoices? OBPDF converts CFDI 4.0 and withholding CFDI 2.0. Invoices in CFDI 3.3 are not accepted.

Turn your SAT XML files into PDF

Create your free account, no card needed

Create free account