Skip to main content

Convert PDF to Editable PDF Using OCR using n8n action

PDF4me Convert PDF to Editable PDF Using OCR transforms scanned PDFs and image-based documents into searchable, editable PDFs through n8n automation workflows. Process PDFs via n8n triggers, binary data, base64 strings, or public URLs to apply OCR technology with multi-language support, quality level selection (Draft/High), conditional OCR processing, text layer creation, layout preservation, and searchable content generation. This solution is ideal for document digitization, scanned document processing, invoice OCR, archive conversion, searchable PDF creation, and automated OCR workflows that require accurate text recognition with preserved formatting and seamless integration.

Setup

Add the PDF4me "Convert PDF to Editable PDF Using OCR" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.

Prerequisites:

  • PDF4me API credentials
  • n8n workflow access

Configuration:

  1. Add PDF4me node to workflow
  2. Select "Convert PDF to Editable PDF Using OCR" action
  3. Configure input parameters (see below)
Convert PDF to Editable PDF Using OCR Configuration

Parameters

Complete list of parameters for the Convert PDF to Editable PDF Using OCR action. Configure these parameters to control OCR conversion.

Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.

ParameterTypeDescriptionExample
Input Data Type***StringPDF Input Format Selection
• Choose the format of your PDF document input
• PDF4me supports multiple input types for OCR conversion
• Options: Binary Data, Base64 String, or URL
Binary Data
Input Binary FieldBinaryBinary PDF File Input (Required if Binary Data)
• Reference PDF file from previous n8n node or file upload
• Works with scanned PDFs, image-based PDFs, and mixed content
• Required when Input Data Type is "Binary Data"
{{ $binary.data }}
Base64 PDF ContentStringBase64 Encoded PDF Input (Required if Base64 String)
• Provide PDF content as base64 encoded string
• Supports various PDF formats including scanned documents
• Required when Input Data Type is "Base64 String"
JVBE...
PDF URLStringPublic PDF URL Input (Required if URL)
• Provide a public/open permission URL to the PDF file
• Downloads and processes the document for OCR conversion
• Required when Input Data Type is "URL"
https://abc.com/scanned.pdf
Document Name***StringInput Filename
• Specify the name of the input PDF file
• Important for OCR quality and text recognition accuracy
• Must include .pdf extension
scanned_document.pdf
Quality Type***StringOCR Quality Selection
• Choose the OCR processing quality level
• Draft: suitable for normal PDFs (1 API call per file)
• High: suitable for images/scanned documents (2 API calls per page)
Draft
OCR Only When Needed***BooleanConditional OCR Processing
• True: apply OCR only when PDF is image-based or non-searchable
• False: apply OCR to all content regardless of existing text layers
• Optimizes processing and API consumption
True
Language***StringOCR Language Setting
• Specify the primary language of the text in the PDF
• Optimizes OCR accuracy for better text recognition
• English is default, other languages available
English
Output Format***BooleanOutput Format Control
• True: enable advanced formatting options for editable PDF
• Ensures better preservation of layout and structure
• Recommended for maintaining document formatting
true
Merge All Sheets***BooleanSheet Merging Control
• True: merge all sheets/pages into single continuous document
• False: maintain individual page structure and formatting
• Choose based on desired output structure
True
Output File Name***StringOutput Filename
• Specify the name for the generated editable PDF file
• Must include .pdf extension
• PDF4me ensures unique naming and format validation
editable_pdf_output.pdf
Output Binary Field Name***StringBinary Data Mapping
• Define the variable name for accessing generated editable PDF data
• Used in subsequent workflow actions
• Essential for workflow data flow
data

Advanced Options

The following parameters are available in the Advanced Options section and are optional:

ParameterTypeDescriptionExample
Custom ProfilesStringCustom Configuration Profiles
• Set additional options using custom profiles
• JSON-like format containing predefined OCR parameters
• Includes language detection, text recognition accuracy, formatting preservation
• Optional for specialized requirements
{ "language": "auto", "accuracy": "high", "preserveFormatting": true }

Output

Output Parameters

ParameterTypeDescriptionExample
successBooleanPDF4me OCR conversion status indicator - Boolean flag indicating the success or failure of the OCR conversion process. Returns true for successful conversions and false for any errors, enabling robust error handling in automated workflowstrue
messageStringPDF4me OCR conversion status message - Descriptive message indicating the result of the OCR conversion process. Provides clear status messages for successful conversions and detailed error information for troubleshooting purposesPDF converted to editable PDF using OCR successfully
fileNameStringPDF4me generated filename - The complete filename of the successfully processed editable PDF document with proper extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processeseditable_pdf_output.pdf
mimeTypeStringPDF4me MIME type identifier - The standardized MIME type for the generated editable PDF file, always set to application/pdf by PDF4me's OCR processing engine. This ensures proper file handling and recognition across all systems and applicationsapplication/pdf
fileSizeNumberPDF4me file size in bytes - The exact size of the generated editable PDF file in bytes, provided for storage planning, bandwidth optimization, and file transfer monitoring. Essential for enterprise document management and workflow automation121875
qualityTypeStringPDF4me OCR quality setting used - The quality setting that was applied during the OCR conversion process. Shows the actual quality level used for text recognition and document processing. Common values include "Draft", "High", and "Archival"Draft
ocrWhenNeededStringPDF4me OCR conditional processing setting - Indicates whether OCR was applied conditionally (only when needed) or to all content. Shows the actual setting used during processing for verification and debugging purposestrue
languageStringPDF4me OCR language setting used - The language setting that was applied during the OCR conversion process. Shows the actual language used for text recognition to optimize accuracy and processingEnglish
mergeAllSheetsBooleanPDF4me sheet merging setting used - Indicates whether all sheets or pages were merged into a single document during processing. Shows the actual setting applied for document structure handlingfalse

N8N Action Response

The PDF4me Convert PDF to Editable PDF Using OCR API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:

JSON Response Format

The raw JSON response from the API:

{
"success": true,
"message": "PDF converted to editable PDF using OCR successfully",
"fileName": "editable_pdf_output.pdf",
"mimeType": "application/pdf",
"fileSize": 121875,
"qualityType": "Draft",
"ocrWhenNeeded": "true",
"language": "English",
"mergeAllSheets": false
}

Use Cases

Document Digitization and Archival

  • Convert paper documents and scanned files into searchable, editable digital formats
  • Digitize historical archives and legacy documents for modern access and preservation
  • Transform physical forms and documents into editable digital versions

Content Management and Searchability

  • Make scanned documents searchable for content management systems
  • Enable full-text search capabilities on previously non-searchable documents
  • Convert image-based PDFs into accessible, editable content for better user experience

Workflow Automation and Processing

  • Automate the conversion of scanned documents in document processing workflows
  • Process incoming paper documents for automated data extraction and analysis
  • Enable downstream processing of previously static document content

Get Help