Skip to main content
Flattening turns interactive elements (form fields, annotations) into static content so the document looks the same everywhere and cannot be edited.
import { PDFEngines } from "chromiumly";

const buffer = await PDFEngines.flatten([
  "path/to/file_1.pdf",
  "path/to/file_2.pdf",
]);
Returns a single PDF buffer. You can also request flattening when splitting on Chromium or LibreOffice by setting split: { ..., flatten: true }, or use the flatten option on LibreOffice’s convert().