Blog
Extract a PDF from a P7M file
Get a readable PDF from a .pdf.p7m or an .xml.p7m invoice, what you lose in the copy, and why the signed envelope still has to be kept on file.
- Published
- Updated
“Convert a P7M to PDF” is the phrase many people use for this task. In the most common case there is no conversion. If the file is named contratto.pdf.p7m, the PDF is already inside the envelope. It must be extracted, not rebuilt. The case changes with fattura.xml.p7m: there the PDF does not exist, and a printed copy is only a representation of the XML.
Keeping the two cases apart stops you sending a public body a copy without a signature, or treating a printed invoice as the fiscal original.
Extract the PDF from a .pdf.p7m
- Open Lettore P7M.
- Drag
contratto.pdf.p7mor select it from the device. You can do this even if someone removed.p7mfrom the name: the reader looks at the bytes, not the extension. - Check every page in the preview and the signature details before you decide whether to export.
- If you need the file, choose the download. A license is required at that point. Prices are on Pricing: Single €4.10 for one document and its formats, Pro €12.99 per year, Lifetime €24.99 with no renewal. VAT included. Up to 3 devices.
The downloaded PDF contains the bytes that were in the envelope. It is not a re-signed PDF and it is not a printout. Anyone who opens it in Preview sees the contract, not the signer card. Those details stay in the .p7m. Keep both, in different folders, with the same base name.
The preview is free and does not require an account. A Single credit is used on the first export of that document. A further attempt on the same document does not use another credit. Authorising the download needs a connection, even if you have already read the file offline.
Get a PDF from an .xml.p7m invoice
A signed electronic invoice contains XML, not a PDF. If the reader recognises the FatturaPA trace (Italy’s electronic invoice), it shows supplier, customer, document type, lines, the VAT summary and payments. Amounts are those written in the XML. They are not recalculated.
For a copy to forward or to keep for reading:
- Open the
.xml.p7min the reader. - Check the view and the signature status. The guide Reading an .xml.p7m e-invoice explains the fields. For an accounting firm’s archive, also see .xml.p7m invoices for accountants.
- With a license, save the original XML, or use print and choose “Save as PDF”.
That PDF copy is not signed. The page text says so: the signature covers the XML. The copy is not a submission to SdI and it is not a tax validation. Attachments named in the XML download separately, under the same license rule. If they are compressed, they stay compressed.
If the XML is not a FatturaPA document the reader can present, it says so and leaves the original content available. It does not invent an invoice.
What you lose
| Action | What you get | What you do not get |
|---|---|---|
Extract a .pdf.p7m |
The bytes of the signed PDF | The CAdES envelope and the check results |
| Print a FatturaPA invoice | A readable copy | The original XML and a submission to SdI |
Rename by removing .p7m |
A file a PDF reader will not open | Any extraction |
| Edit the extracted PDF | A changed copy | Integrity against the signature |
In a dispute, a court filing or a tender, what matters is the signed file you were asked for. Use the PDF to read, project or annotate a copy. Send the .p7m when the recipient asks for the signed document. In electronic court work this boundary is especially sharp. The guide to Italian court filings covers it.
Alternatives, and their limits
OpenSSL can write the content to disk. It is a Terminal path, useful if you already use it. It does not produce the FatturaPA view and it does not explain revocation on a card. An option that disables the certificate check should not be archived as “signature verified”.
Converters that ask you to upload the file to a server move the document off your device. For contracts, court papers and clients’ invoices, that is a step to judge before you take it, not after. The reader on this site processes the file in the browser.
Standard Base64 and PEM (labels PKCS7, CMS or SIGNED DATA) open without a manual conversion. Base64 that uses - and _ is not accepted. If opening fails, the details are in A P7M file will not open.
How to archive without mixing copies
- An
originalsfolder: the.p7mfiles you received, name unchanged, for example2026-10-23_contratto_rossi.pdf.p7m. - A
readingfolder: extracted PDFs or printouts, with the same name and a clear suffix, for example2026-10-23_contratto_rossi_lettura.pdf. - Do not replace the original with the copy when you “tidy up”.
- For invoices, check whether preservation is already handled by the Italian Revenue Agency service or by a preservation provider chosen by the client. The reader is not a preservation provider and it does not offer regulated digital preservation.
The difference between an envelope and an internally signed PDF is in CAdES and PAdES. If you only need the first opening on a computer or a phone, start from the guides for Mac and for Android and iPhone.
Two files on the same desk
Place contratto.pdf.p7m and fattura.xml.p7m side by side. The first weighs little more than the PDF it contains. After extraction, compare the preview page count with the downloaded PDF: they should tell the same text. The downloaded file does not carry the signers in a PAdES panel. If the recipient says “I cannot see the signature”, they are not wrong about the extracted PDF. Send them the .p7m, or explain how to open it in an envelope reader.
The second file, once opened, has no PDF pages until you print. In the view, check number, date and the declared total. Then, with a license, use print and save fattura_lettura.pdf. Open that PDF again: it is convenient, and it is not the XML. If the accountant asks for “the invoice file”, send fattura.xml.p7m or the extracted XML, not the printout. If a colleague needs the amount on a train, the printout is enough, with a note that it is not signed.
Keep the four files, when they exist, under names that do not collide: the contract envelope, the extracted contract PDF, the invoice envelope, the invoice printout. Deleting the envelopes because “the PDF is there now” is the mistake this operation makes easy. Extraction is for reading. It is not a substitute for the archive.
Frequently asked questions
Is the extracted PDF the same as the signed document?
For a .pdf.p7m, the PDF bytes are the ones contained in the envelope. The CAdES signature is absent. For an XML invoice, the printed PDF is a representation, not the signed XML.
Is it enough to remove .p7m from the file name?
No. The content stays in the envelope and a PDF reader treats it as damaged. The extension does not take part in extraction.
Does the PDF copy of an invoice count as the fiscal original?
No. The fiscal original is the XML file that passed through Italy’s exchange system (SdI). The printed copy is not a submission to SdI and it is not a tax validation.
Is download included in the free preview?
No. The preview and the technical checks are free. A license is needed when you choose to download the document, the XML or a printed PDF copy.
A simple rule to keep in sight
Read and, if you need to, export. Do not throw away the envelope. The PDF is the tool that lets someone read the content without opening .p7m files. The .p7m is the file the content and the signature depend on. If a portal asks you for the signed document, upload the envelope, not the reading copy.