npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pdfxml

v0.2.2

Published

> Generate high-quality PDF documents using XML.

Readme

pdfxml

Generate high-quality PDF documents using XML.

npm version npm downloads license stars

Português (Brasil)

pdfxml is an open-source library for generating PDF documents from XML templates. It was created to make PDF generation more organized, maintainable and scalable, without sacrificing performance or flexibility.

Whether you are building reports, invoices, labels, receipts, fiscal documents or any other printable document, pdfxml provides a simple and declarative way to describe your layouts.

Why pdfxml?

pdfxml was born while I was developing PDF reports for real-world applications.

During that process, I found myself facing the same challenges repeatedly. Many available solutions required commercial licenses, while others were excellent for simple documents but became difficult to maintain as layouts grew in complexity.

My goal was to build a tool that allowed complex documents to remain simple to develop, easy to maintain and pleasant to evolve over time.

Instead of creating PDFs entirely through imperative code, pdfxml introduces a declarative XML language that keeps document structure organized and readable.

Today, pdfxml is used in production projects and has proven to be reliable for generating different kinds of documents. I'm excited to see what other developers and companies will build with it.

Why XML?

XML was chosen intentionally.

It is a mature, well-known and highly structured markup language that is easy to read, generate and validate.

For developers already working with backend systems, APIs or integrations, XML usually has a very small learning curve while providing an expressive way to describe complex document layouts.

Features

  • Declarative XML syntax
  • High-quality PDF generation
  • Report generation
  • Invoice support
  • Receipt generation
  • Label generation
  • SVG rendering
  • QR Code support
  • Barcode support
  • Custom page sizes
  • Margin configuration
  • Custom fonts
  • Multi-page documents
  • TypeScript support
  • CLI support
  • Open Source
  • Apache 2.0 License

Who is pdfxml for?

pdfxml is suitable for anyone who needs to generate PDF documents dynamically, including:

  • SaaS applications
  • ERP systems
  • Automation platforms
  • Financial systems
  • Fiscal systems
  • Reporting tools
  • Developers
  • Students
  • Programming enthusiasts

If you understand XML, you'll feel at home.

Installation

npm install pdfxml

or

pnpm add pdfxml

or

yarn add pdfxml

Quick Example

<Column>
  <Text FontSize="14">Hello World</Text>
  <Row Gap="10">
    <Text>Left</Text>
    <Text>Right</Text>
  </Row>
</Column>
pdfxml --xml=document.xml --output=document.pdf --format=A4

More complete examples are available in the documentation.

Documentation

The complete documentation includes:

  • XML language reference
  • Supported elements
  • Styling
  • Images
  • Tables
  • QR Codes
  • Barcodes
  • SVG
  • Fonts
  • CLI
  • Examples

Documentation is available on the project website.

Contributing

Contributions are always welcome.

Whether you found a bug, have an idea for a new feature or simply want to improve the documentation, feel free to open an issue or submit a pull request.

A personal note

pdfxml started as a solution to my own problem.

After using it successfully, I decided to make it open source because I believe more developers should have access to a modern, practical and free tool for PDF generation.

I genuinely hope this project helps you build something amazing, and I'm looking forward to seeing what the community creates with it.

License

pdfxml is licensed under the Apache License 2.0.

You are free to use it in personal, academic and commercial projects while respecting the terms of the license.

See the LICENSE file.