Skip to content
プロジェクト

概要

JavaScriptでPDFを作成、読み込み、変更できます。C++製のPDFWriterコアを2つの形態で提供します。ビルド済みバイナリを含むネイティブNode.js/Electronアドオン(@muhammara/native)と、ブラウザーで安全に使えるバイト優先のWebAssemblyパッケージ(@muhammara/wasm)です。HummusJSの後継です。

仕事効率化・自動化

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
0
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

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.

関連プロジェクトを探す

読み込み中…