Discover and explore top open-source AI tools and projects—updated daily.
cosmicironPrecise document rendering engine for any environment
Top 50.3% on SourcePulse
VMPrint addresses the challenges of rendering multi-page documents consistently across diverse JavaScript environments, from browsers to serverless functions. It offers a pure JavaScript, dependency-free solution that bypasses traditional web rendering pipelines (HTML/CSS, PDF.js, React-PDF) and heavy server-side tools like headless Chromium. This enables developers to achieve publication-grade document output with a small footprint, providing a predictable and inspectable layout engine for applications requiring reliable document generation.
How It Works
VMPrint employs a deterministic spatial simulation engine where document elements are treated as autonomous "actors" negotiating their geometry within bounded "arenas" (pages). Layout is achieved through a process of collision detection and constraint solving, aiming for a stable world state rather than relying on a DOM or browser layout engine. This actor-based, simulation-driven approach ensures identical output across all JavaScript runtimes and allows for deep inspection and instrumentation of the layout process.
Quick Start & Requirements
git clone https://github.com/cosmiciron/vmprint.git), navigate into the directory (cd vmprint), and install dependencies (npm install).npm run dev --prefix cli -- --input engine/tests/fixtures/regression/08-dropcap-pagination.json --output out.pdf.https://cosmiciron.github.io/vmprint/examples/ast-to-canvas-webfonts/index.html. Static browser demos are located in docs/examples/.Highlighted Details
Maintenance & Community
The project is modular, with core components published as standalone npm packages and related tools like draft2final available separately. Specific community channels (e.g., Discord, Slack) are not detailed in the README.
Licensing & Compatibility
Limitations & Caveats
The API is subject to evolution, although the core architectural principles are stable. The README indicates that "Scripting Series 1 is now complete," suggesting ongoing development and potential for future API changes in this area.
2 months ago
Inactive