Developer Hub & API Philosophy

Welcome, developers! This page provides information about the architecture of PDF Toolkit and how you can leverage the same technologies in your own projects.

Our Privacy-First Approach: No Server-Side API

PDF Toolkit does not offer a traditional server-side REST API for a very important reason: **your privacy and security**. Our core principle is that your files should never be uploaded to a server. All processing—merging, compressing, converting—happens directly in your browser using JavaScript.

This client-side approach means:

Our Technology Stack

Our toolkit is built on the shoulders of incredible open-source libraries. If you are a developer, we highly recommend you check them out for your own projects:

Example: Client-Side PDF Merging

To give you an idea, here is a simplified code snippet showing how merging two PDF files would work in JavaScript using `pdf-lib`:

// This code runs entirely in the user's browser
async function mergePdfs(file1, file2) {
  const mergedPdf = await PDFLib.PDFDocument.create();

  // Load the first PDF
  const pdf1Bytes = await file1.arrayBuffer();
  const pdf1 = await PDFLib.PDFDocument.load(pdf1Bytes);
  const copiedPages1 = await mergedPdf.copyPages(pdf1, pdf1.getPageIndices());
  copiedPages1.forEach((page) => mergedPdf.addPage(page));

  // Load the second PDF
  const pdf2Bytes = await file2.arrayBuffer();
  const pdf2 = await PDFLib.PDFDocument.load(pdf2Bytes);
  const copiedPages2 = await mergedPdf.copyPages(pdf2, pdf2.getPageIndices());
  copiedPages2.forEach((page) => mergedPdf.addPage(page));

  // Save the result and prompt for download
  const mergedPdfBytes = await mergedPdf.save();
  // ... code to download the file ...
}

Future Plans

While we don't plan to offer a server-side API, we are considering releasing a dedicated JavaScript library or a set of components in the future to make it even easier for developers to build powerful, private, client-side document tools. For any business inquiries or partnership ideas, please contact us.