# @nodecfdi/cfdi-to-pdf

> Librería para crear un pdf basado en un XML CFDI o Retenciones

Latest version **3.0.0-3** (published 2025-01-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nodecfdi/cfdi-to-pdf
pnpm add @nodecfdi/cfdi-to-pdf
yarn add @nodecfdi/cfdi-to-pdf
bun add @nodecfdi/cfdi-to-pdf
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.0.0-3 |
| Published | 2025-01-30 |
| First published | 2022-03-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | ^18 \|\| ^20 \|\| ^22 |
| Dependencies | 2 |
| Unpacked size | 125.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 25 |
| Author | Fernando Isidro |
| Maintainers | luffynando, celli33 |
| Keywords | cfdi, retenciones, xml, pdf, sat |

## Links

- npm: https://www.npmjs.com/package/@nodecfdi/cfdi-to-pdf
- Repository: https://github.com/nodecfdi/cfdi-to-pdf
- Issues: https://github.com/nodecfdi/cfdi-to-pdf/issues
- npm.io page: https://npm.io/package/@nodecfdi/cfdi-to-pdf

## Dependencies (2)

- [@nodecfdi/cfdi-expresiones](https://npm.io/package/@nodecfdi/cfdi-expresiones.md) ^3.0.4
- [@nodecfdi/sat-micro-catalogs](https://npm.io/package/@nodecfdi/sat-micro-catalogs.md) ^1.0.2

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 3.0.0-3 (latest) — 2025-01-30
- 3.0.0-2 — 2025-01-27
- 3.0.0-1 — 2024-12-26
- 3.0.0-0 — 2024-12-26
- 2.2.1 — 2024-09-10
- 2.2.0 — 2024-09-10
- 2.1.0 — 2024-08-27
- 2.1.0-3 — 2024-08-20
- 2.1.0-2 — 2024-08-20
- 2.1.0-1 — 2024-08-20
- 2.1.0-0 — 2024-08-14
- 2.0.2-1 — 2024-08-14
- 2.0.2-0 — 2024-08-14
- 2.0.1 — 2024-08-07
- 2.0.0 — 2024-08-05
- … 15 more at https://npm.io/package/@nodecfdi/cfdi-to-pdf/versions

## README

# `@nodecfdi/cfdi-to-pdf`

[![Source Code][badge-source]][source]
[![Npm Node Version Support][badge-node-version]][node-version]
[![Discord][badge-discord]][discord]
[![Latest Version][badge-release]][release]
[![Software License][badge-license]][license]
[![Build Status][badge-build]][build]
[![Reliability][badge-reliability]][reliability]
[![Maintainability][badge-maintainability]][maintainability]
[![Code Coverage][badge-coverage]][coverage]
[![Violations][badge-violations]][violations]
[![Total Downloads][badge-downloads]][downloads]

> Create a generic PDF file from a CFDI 3.3, CFDI 4.0, Retenciones 1.0 and Retenciones 2.0

:us: The documentation of this project is in spanish as this is the natural language for intended audience.

:mexico: La documentación del proyecto está en español porque ese es el lenguaje principal de los usuarios.

> [!WARNING]
> This package is native [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) and no longer provides a CommonJS export. If your project uses CommonJS, you will have to [convert to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). Please don't open issues for questions regarding CommonJS / ESM.

## Acerca de `@nodecfdi/cfdi-to-pdf`

En algunos casos necesitas generar un archivo PDF desde un CFDI (Comprobante fiscal Digital por Internet), o constancia
de retenciones. Esta librería te ayuda a crear un pdf genérico. Además puedes crear un boceto a tu gusto y acomodarlo a
como lo requieras. Inspirada por la versión de php <https://github.com/phpcfdi/cfditopdf>

## Documentación

La documentación está disponible en el sitio web [NodeCfdi](https://nodecfdi.com/librarys/cfdi-to-pdf/getting-started/)

## Soporte

Puedes obtener soporte abriendo un ticket en Github.

Adicionalmente, esta librería pertenece a la comunidad [OcelotlStudio](https://ocelotlstudio.com), así que puedes usar los mismos canales de comunicación para obtener ayuda de algún miembro de la comunidad.

## Compatibilidad

Esta librería se mantendrá compatible con al menos la versión con
[soporte activo de Node](https://nodejs.org/es/about/releases/) más reciente.

También utilizamos [Versionado Semántico 2.0.0](https://semver.org/lang/es/) por lo que puedes usar esta librería sin temor a romper tu aplicación.

## Contribuciones

Las contribuciones con bienvenidas. Por favor lee [CONTRIBUTING][] para más detalles y recuerda revisar el archivo [CHANGELOG][].

## Copyright and License

The `@nodecfdi/cfdi-to-pdf` library is copyright © [NodeCfdi](https://github.com/nodecfdi) - [OcelotlStudio](https://ocelotlstudio.com) and licensed for use under the MIT License (MIT). Please see [LICENSE][] for more information.

[contributing]: https://github.com/nodecfdi/.github/blob/main/docs/CONTRIBUTING.md
[changelog]: https://github.com/nodecfdi/cfdi-to-pdf/blob/main/CHANGELOG.md
[source]: https://github.com/nodecfdi/cfdi-to-pdf
[node-version]: https://www.npmjs.com/package/@nodecfdi/cfdi-to-pdf
[discord]: https://discord.gg/AsqX8fkW2k
[release]: https://www.npmjs.com/package/@nodecfdi/cfdi-to-pdf
[license]: https://github.com/nodecfdi/cfdi-to-pdf/blob/main/LICENSE.md
[build]: https://github.com/nodecfdi/cfdi-to-pdf/actions/workflows/build.yml?query=branch:main
[reliability]: https://sonarcloud.io/component_measures?id=nodecfdi_cfdi-to-pdf&metric=Reliability
[maintainability]: https://sonarcloud.io/component_measures?id=nodecfdi_cfdi-to-pdf&metric=Maintainability
[coverage]: https://sonarcloud.io/component_measures?id=nodecfdi_cfdi-to-pdf&metric=Coverage
[violations]: https://sonarcloud.io/project/issues?id=nodecfdi_cfdi-to-pdf&resolved=false
[downloads]: https://www.npmjs.com/package/@nodecfdi/cfdi-to-pdf
[badge-source]: https://img.shields.io/badge/source-nodecfdi/cfdi--to--pdf-blue.svg?logo=github
[badge-node-version]: https://img.shields.io/node/v/@nodecfdi/cfdi-to-pdf.svg?logo=nodedotjs
[badge-discord]: https://img.shields.io/discord/459860554090283019?logo=discord
[badge-release]: https://img.shields.io/npm/v/@nodecfdi/cfdi-to-pdf.svg?logo=npm
[badge-license]: https://img.shields.io/github/license/nodecfdi/cfdi-to-pdf.svg?logo=open-source-initiative
[badge-build]: https://img.shields.io/github/actions/workflow/status/nodecfdi/cfdi-to-pdf/build.yml?branch=main
[badge-reliability]: https://sonarcloud.io/api/project_badges/measure?project=nodecfdi_cfdi-to-pdf&metric=reliability_rating
[badge-maintainability]: https://sonarcloud.io/api/project_badges/measure?project=nodecfdi_cfdi-to-pdf&metric=sqale_rating
[badge-coverage]: https://img.shields.io/sonar/coverage/nodecfdi_cfdi-to-pdf/main?logo=sonarcloud&server=https%3A%2F%2Fsonarcloud.io
[badge-violations]: https://img.shields.io/sonar/violations/nodecfdi_cfdi-to-pdf/main?format=long&logo=sonarcloud&server=https%3A%2F%2Fsonarcloud.io
[badge-downloads]: https://img.shields.io/npm/dm/@nodecfdi/cfdi-to-pdf.svg?logo=npm

---
_Source: https://npm.io/package/@nodecfdi/cfdi-to-pdf · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
