OdooWiki OCA HUB

PDF Helper

pdf_helper folder_open OCA/edi open_in_new
Tools License: LGPL-3

Technical module to share PDF utils.

auto_awesome What this module does

AI-generated from the code · Odoo 17.0

This technical module provides reusable helpers to read XML files embedded inside PDFs and to attach XML files to PDFs. It adds no menus or screens; other modules use it to exchange electronic documents.

PDF Helper is a technical building block, not a module end users open directly. It gives other Odoo modules two abilities on PDF files.

  • Read a PDF and pull out any XML files embedded in it, returning them as parsed XML documents keyed by file name. If the PDF cannot be parsed, the error is logged and an empty result is returned instead of crashing.
  • Take an existing PDF and add an XML file inside it as an attachment, then return the new PDF content. The resulting PDF is set to open with the attachments panel visible.

It works through the abstract model pdf.helper, which is not stored in the database and has no fields, menus or views of its own. Because it depends only on base, it is meant to be reused by other modules rather than used on its own. There are no business rules, scheduled actions, emails or user-facing screens in this code; the only automatic behaviour is the error logging when a PDF cannot be read.

Depends on

base

Required by other modules

Models and fields (1)
  • pdf.helper · new model

Text generated by AI (DeepSeek) from reading the Odoo 17.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 4 confirmed, 5 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 17.0

Inside Odoo env:

res = env["pdf.helper"].pdf_get_xml_files(pdf_filecontent)

new_pdf_filecontent = env["pdf.helper"].pdf_embed_xml(pdf_filecontent, filename, xml)

Outside Odoo env:

from odoo.addons.pdf_helper.utils import PDFParser [...] res = PDFParser(pdf_filecontent).get_xml_files()

No verified information in OCA: Installation, Configuration.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.