Skip to content
Proyectos

Acerca de

Crea, lee y modifica PDF con JavaScript. Un único núcleo PDFWriter en C++ se distribuye en dos formatos: un complemento nativo para Node.js/Electron con binarios precompilados (@muhammara/native) y un paquete WebAssembly seguro para el navegador y centrado en los bytes (@muhammara/wasm). Es el sucesor de HummusJS.

Productividad y automatización

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

MuhammaraJS

Native npm version Native with source npm version Native docs status Native CI status

Wasm npm version Wasm docs status Wasm CI status

MuhammaraJS is a fast library for creating, reading, and modifying PDF files. It is available as a native Node.js addon and as a browser-safe WebAssembly package.

Choose A Package

Package Use it for
@muhammara/native Node.js applications using a small package with a matching prebuilt native binary
@muhammara/native-with-source Local native builds, Electron rebuilds, or platforms without a matching prebuilt binary
@muhammara/wasm Browsers, Web Workers, and other byte-oriented WebAssembly environments

For most Node.js applications, install the prebuilt native package:

npm install @muhammara/native

Use the Wasm package when native addons or Node.js filesystem APIs are not available:

npm install @muhammara/wasm

The native and Wasm packages use the same PDFWriter C++ foundation, but their JavaScript APIs are intentionally different. Native works with Node.js paths, streams, and buffers. Wasm is byte-first and uses values such as Uint8Array, ArrayBuffer, Blob, and File.

Version 6

MuhammaraJS v6 remains available under the unscoped package name muhammara, but it receives no further releases. It is not the same package as @muhammara/native or another @muhammara/* package. Existing v6 installations remain usable; new projects should use the scoped packages. See Migrate From v6 To v7.

Migrate From v6 To v7

v7 replaces the unscoped muhammara package with organization-scoped packages. The PDF API is unchanged, so migrating is a dependency rename plus an import rename:

npm uninstall muhammara
npm install @muhammara/native
// v6
var muhammara = require("muhammara");

// v7
var muhammara = require("@muhammara/native");

Two things need attention beyond the rename:

  • @muhammara/native is prebuilt-only. Install @muhammara/native-with-source when no prebuilt binary matches your platform or when Electron must rebuild the addon. v6 compiled from source in that case; v7 fails the install instead.
  • TypeScript code needs an explicit import. v6 shipped an ambient declare module "muhammara" block; v7 declares types per package.

The full guide, including npm aliases for a staged migration, is in Migrate From v6 To v7.

Documentation

Native

The native documentation covers the low-level Node.js API, the included Recipe API, installation, and migration. Install @muhammara/native when a prebuilt binary is suitable. The documentation also covers @muhammara/native-with-source, including local compilation, Electron rebuilds, build requirements, and source cleanup.

The native documentation source is in packages/native/docs/. Build it with npm run docs:build after installing packages/native/docs/requirements.txt.

WebAssembly

The WebAssembly documentation covers @muhammara/wasm in browsers, Web Workers, and Node.js, including its byte-first low-level and Recipe APIs.

The Wasm documentation source is in packages/wasm/docs/.

The executable browser example is deployed to GitHub Pages. Its root page lists every deployed example version, including dev, which tracks the develop branch.

HummusJS Is The Base

MuhammaraJS is a drop-in replacement for HummusJS, originally created by Galkahana. HummusJS is discontinued.

The original C++ project is documented at http://www.pdfhummus.com. The C++ library is maintained at https://github.com/galkahana/PDF-Writer.

Recipe

MuhammaraJS includes the high-level Recipe functionality formerly distributed as hummus-recipe and muhammara-recipe. Those separate packages are not needed.

Explorar proyectos relacionados

Cargando…