uyap-udf
v0.1.0
Published
Convert PDF documents to UYAP UDF by embedding rasterized page images.
Readme
- 🖥️ Web app -
site/is a static, browser-only PDF → UDF converter in Turkish and English. GitHub Pages serves it through.github/workflows/deploy.yml, and conversion runs fully client-side. - 📚 Node library - converts PDF documents into UYAP UDF files. It rasterizes each page to a 200 DPI PNG and embeds it as a full-page image, so the output looks exactly like the source. Line spacing, table widths and lost headers/footers, the usual problems of text-based converters, cannot happen here.
- 🔁 No system dependencies - PDFium compiled to WebAssembly renders the pages, so a plain
npm installis enough on macOS, Windows and Linux. For Word documents, export to PDF first (File → Save As → PDF), then convert.
npm install uyap-udfimport { readFile, writeFile } from "node:fs/promises";
import { convertPdfBufferToUdf } from "uyap-udf";
const pdf = await readFile("document.pdf");
const outcome = await convertPdfBufferToUdf(pdf);
if (outcome.ok) await writeFile("document.udf", outcome.udf);convertPdfBufferToUdf never throws for expected failures; it returns { ok: true, udf } or { ok: false, error }.
Other exports: rasterizePdfPagesToPng, pxToPt, zeroUdfPageMargins.
To work on the web site:
cd site
npm install
npm run dev # local dev server
npm test # unit tests
npm run build # production build to site/dist