zynx-pdf
v0.1.10
Published
Zynx PDF is a modern React PDF viewer and editor built with Mozilla PDF.js and pdf-lib.
Maintainers
Readme
Zynx PDF
Zynx PDF is a modern React PDF viewer and editor built with Mozilla PDF.js and pdf-lib.
Developed by Hafiz Muhammad Zunnoorain.
Install
npm install zynx-pdfFrontend usage
import { PdfEditor } from "zynx-pdf";
import "zynx-pdf/style.css";
export default function App() {
return (
<PdfEditor
height="100vh"
licenseKey={import.meta.env.VITE_ZYNX_LICENSE_KEY}
licenseApiUrl={import.meta.env.VITE_ZYNX_LICENSE_API_URL}
engineApiUrl={import.meta.env.VITE_ZYNX_ENGINE_URL}
showProTools
logoSrc="/logo.png"
/>
);
}Local test license
VITE_ZYNX_LICENSE_KEY=zpx_test_9F2D-7KLA-ZYNX-PRO-2026
VITE_ZYNX_LICENSE_API_URL=https://cyranix-lab-be-production.up.railway.app/api/zynx/license/validate
VITE_ZYNX_ENGINE_URL=https://cyranix-lab-be-production.up.railway.appFrontend dev
npm install
npm run devBackend engine dev
The included backend engine provides local license validation, MongoDB storage, and a server-side PDF text edit endpoint.
Local MongoDB URI:
MONGODB_URI=mongodb://127.0.0.1:27017/zynx_pdfInstall backend dependencies:
npm install --prefix serverRun backend:
npm run dev:serverRun frontend and backend together:
npm run dev:allFeatures
Free tools
- PDF upload and viewing
- Page navigation
- Thumbnail panel
- Search text on the current page
- Zoom in and zoom out
- Fit to width and fit to page
- Add text
- Highlight
- Underline
- Strikeout
- Freehand drawing
- Shapes: rectangle, circle, line, and arrow
- Sticky notes/comments
- Add image
- Add signature
- Undo and redo
- Save as custom filename
- Print edited PDF
- Export edited PDF
Pro gated tools
- True Text Edit with Advanced Engine v1
- Visual Replace Text fallback
- Watermark
- Stamp
- Redaction box
- Page tools
- Merge PDFs
- Split PDF
- Crop page
- Forms
- Secure flattened redaction export
- Compress PDF copy
- Remove metadata
- Images to PDF
- PDF page/all pages to PNG
- Browser-encrypted password package
- Page reorder: move current page up/down
- Replace current page
- OCR slot
- White-label slot
Phase 3 upgrade
Phase 3 adds security/conversion tools, full-screen workspace by default, a fixed license modal backdrop, compact toolbar layout, and logo image support through logoSrc or /logo.png.
Note: Acrobat-compatible PDF password encryption still needs a dedicated PDF security engine. The current Password Package tool uses browser AES-GCM encryption and exports .zynxpdf.
Advanced Engine v1 note
The True Text Edit tool does not create a frontend overlay layer. It sends the selected text to the backend engine. Advanced Engine v1 tries to decode the page content stream, find the matching Tj or TJ text operator, remove that original operator, and insert the updated text into the PDF.
Supported in v1: literal strings, hex strings, basic escaped strings, basic TJ arrays, basic ToUnicode CMap decoding, and coordinate-assisted matching.
If the engine cannot locate editable text in the content stream, it returns a clear error and does not fake a visual layer. Use /api/pdf/debug-text-spans to inspect how the page text is stored.
Build library
npm run build:libPublish update
npm run releaseLicense
Zynx PDF is proprietary software.
This project uses open-source third-party libraries including Mozilla PDF.js and pdf-lib. Their respective licenses remain applicable to those libraries.
