Skip to content
ComPDF
DemoFAQ
New Release

Open-Source PDF SDK & AI Document Processing

Get the full self-hosted SDK and AI document processing on GitHub. One-click deploy to quickly build your document workflows.

Convert PDF to OFD

Overview

ComPDF Conversion SDK supports converting PDF documents to OFD documents. Similar to searchable PDF, OFD conversion also supports OCR, page background preservation, and transparent text layers.

Notice

  • If you need to generate searchable OFD output, you can enable transparentText.
  • When enableOcr is enabled, it is recommended to specify the OCR language through languages.

Sample

php
use ComPDFKit\Conversion\OcrLanguage;

$option = new ConvertOption();
$option->enableOcr = true;
$option->languages = [OcrLanguage::ENGLISH];
$option->containPageBackgroundImage = true;
$option->transparentText = true;

Conversion::convert('Ofd', 'scan.pdf', 'password', 'output.ofd', $option);