JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q67838F
  • License ISC

podofo.js is a library for parsing, generation and editing of PDF documents.

Package Exports

  • podofo.js
  • podofo.js/podofo.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (podofo.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

podofo.js

podofo.js is a JavaScript interface for the PoDoFo library.

Library provides functions to parse, create and modify PDF.

Why podofo.js

Podofo.js is a JavaScript library that leverages the speed and efficiency of the PoDoFo C++ library for advanced PDF manipulation.

  • High Performance: Utilizes C++ under the hood for fast and efficient PDF operations.
  • Comprehensive Functionality: Offers extensive features for creating, modifying, and extracting information from PDFs, including advanced operations like signing and font embedding.
  • Ease of Use: Provides a developer-friendly JavaScript API, making it easy to integrate powerful PDF capabilities without needing deep C++ knowledge.
  • Built-in Signing methods: Supports digital signatures, encryption.

Example

import PodofoModule from 'podofo.js'

const Podofo = await PodofoModule();

const document = new Podofo.Document();
const pages = document.getPages();

const page = pages.createPage(
                   Podofo.getPageSize(Podofo.PageSize.A4, false));

const fonts = document.getFonts();
const font = fonts.getDefaultFont();

const painter = new Podofo.Painter();
painter.setCanvas(page);
painter.setFont(font, 10);
painter.drawText("Hello world!", 0, 0);
painter.finishDrawing();

const pdf = document.save();

painter.delete();
document.delete();

API

podofo.js use WebAssembly and require loading of WebAssembly module.

import PodofoModule from 'podofo.js'

const Podofo = await PodofoModule();

All Podofo objects created with new must be deleted for the wasm memory to be released. All available functions can be found in TypeScript module definition file.