AutomationFlowsWeb Scraping › Convert HTML to PDF & Extract Text From Pdfs with Customjs API

Convert HTML to PDF & Extract Text From Pdfs with Customjs API

ByCustomJS @customjs on n8n.io

This n8n workflow illustrates how to convert PDF files into text with the PDF Toolkit from www.customjs.space.

Event trigger★★★★☆ complexity5 nodes@Custom Js/N8N Nodes Pdf Toolkit
Web Scraping Trigger: Event Nodes: 5 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #3871 — we link there as the canonical source.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "MIA4ozGH71fC3KCe",
  "name": "pdf to text",
  "tags": [],
  "nodes": [
    {
      "id": "d92f690d-c84d-451d-9ab8-da6f9356e0ca",
      "name": "Convert PDF into Text",
      "type": "@custom-js/n8n-nodes-pdf-toolkit.PdfToText",
      "position": [
        -120,
        100
      ],
      "parameters": {},
      "credentials": {
        "customJsApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "420cfac7-a621-4bf3-bd34-3fee569321e4",
      "name": "HTML to PDF",
      "type": "@custom-js/n8n-nodes-pdf-toolkit.html2Pdf",
      "position": [
        -340,
        100
      ],
      "parameters": {
        "htmlInput": "<h1>Hello World</h1>"
      },
      "credentials": {
        "customJsApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "83c05ec3-1225-41d0-b5b4-f9f6be7619ea",
      "name": "Convert PDF into Text1",
      "type": "@custom-js/n8n-nodes-pdf-toolkit.PdfToText",
      "position": [
        -120,
        300
      ],
      "parameters": {
        "resource": "url",
        "field_name": "={{ $json.path }}"
      },
      "credentials": {
        "customJsApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "787e9369-abb5-483e-ba43-8837b5c586f9",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        -340,
        300
      ],
      "parameters": {
        "jsCode": "return {\"json\": {\"path\": \"https://www.nlbk.niedersachsen.de/download/164891/Test-pdf_3.pdf.pdf\"}};"
      },
      "typeVersion": 2
    },
    {
      "id": "df553684-dfa8-4af4-a57b-ebbc9ef2a33f",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -560,
        200
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "97b60904-2b34-4a77-b171-d02f87c17134",
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Convert PDF into Text1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML to PDF": {
      "main": [
        [
          {
            "node": "Convert PDF into Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "HTML to PDF",
            "type": "main",
            "index": 0
          },
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This n8n workflow illustrates how to convert PDF files into text with the PDF Toolkit from www.customjs.space.

Source: https://n8n.io/workflows/3871/ — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

ATS resume maker accoding to JD. Uses @custom-js/n8n-nodes-pdf-toolkit, googleDrive, formTrigger, extractFromFile. Event-driven trigger; 19 nodes.

@Custom Js/N8N Nodes Pdf Toolkit, Google Drive, Form Trigger +1
Web Scraping

This n8n workflow shows how to convert PDF files into PNG format with the PDF Toolkit from www.customjs.space.

@Custom Js/N8N Nodes Pdf Toolkit
Web Scraping

This n8n template demonstrates how to convert HTML into a PDF, compress the generated PDF, and return it as a binary response using the PDF Toolkit from www.customjs.space.

@Custom Js/N8N Nodes Pdf Toolkit
Web Scraping

This n8n template demonstrates how to download multiple PDF files from public URLs and merge them into a single PDF using the PDF Toolkit from www.customjs.space.

HTTP Request, Read Write File, @Custom Js/N8N Nodes Pdf Toolkit
Web Scraping

This n8n template shows how to extract selected pages from a generated PDF with the PDF Toolkit by www.customjs.space.

@Custom Js/N8N Nodes Pdf Toolkit, HTTP Request