Skip to content
halitseverPublic

Repository files navigation

uyap-udf logo

Convert PDF to UYAP UDF files in the browser or with Node.js: a free online PDF to UDF converter and a TypeScript library for UYAP documents.

🌐 Try it in the browser: free, and files never leave your device.

GitHub Sponsors

  • 🖥️ 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 the conversion runs entirely in the browser.
  • 📚 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. Text-based converters tend to break line spacing, table widths and headers/footers; that cannot happen here.
  • 🔁 No system dependencies - PDFium compiled to WebAssembly renders the pages, so a plain npm install is enough on macOS, Windows and Linux. For Word documents, export to PDF first (File → Save As → PDF), then convert.

npm install uyap-udf

Requires Node.js 22 or newer.

import { 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

Found a bug or have an idea? Open an issue.
Read the contributing guide before sending a pull request.

MIT

Releases

Packages

Used by

Contributors

Languages