npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-extract-pdf

v1.0.26

Published

n8n node to extract text, images and tables from PDF with multilingual support, language detection and comprehensive test suite

Downloads

91

Readme

n8n-nodes-extract-pdf

English

A custom node for n8n that extracts text, images, tables and form fields from PDF files with powerful customization options and multilingual support.

Features

  • ✅ Extract text from normal and image-based PDFs
  • ✅ OCR support for scanned PDFs
  • ✅ Multilingual PDF processing with auto-detection
  • ✅ Table extraction and formatting
  • ✅ Image extraction from PDFs
  • ✅ Document type recognition
  • ✅ Metadata extraction
  • ✅ Large file handling
  • ✅ Comprehensive error handling
  • ✅ Performance optimization

New Version (v1.0.18)

We've just released a new version with improvements:

  1. Enhanced Error Handling:

    • Detailed and clear error messages
    • Error code classification
    • Resolution suggestions
    • Multilingual error messages
  2. Performance Optimization:

    • Chunk processing for memory efficiency
    • Smart caching for repeated tasks
    • Parallel processing for large files
    • Automatic chunk size adjustment
  3. OCR Improvements:

    • Language-specific optimization
    • Smart image preprocessing
    • OCR result caching
    • GPU support for OCR (if available)
  4. New Features:

    • Automatic language detection
    • Language distribution statistics
    • Smart table extraction
    • Image quality enhancement

Error Handling

Error Codes and Solutions

| Error Code | Description | Solution | |------------|-------------|----------| | ERR_FILE_NOT_FOUND | PDF file not found | Check file path and access permissions | | ERR_INVALID_BINARY | Invalid binary data | Ensure valid PDF data from previous node | | ERR_INVALID_PAGE_RANGE | Invalid page range | Check page range syntax (e.g. "1-5, 8") | | ERR_OCR_FAILED | OCR processing failed | Check Tesseract installation and language packs | | ERR_IMAGE_EXTRACTION_FAILED | Image extraction failed | Check supported image formats | | ERR_TABLE_EXTRACTION_FAILED | Table extraction failed | Ensure table has clear structure | | ERR_ENHANCEMENT_FAILED | Enhancement failed | Check memory and CPU availability | | ERR_LANG_DETECTION_FAILED | Language detection failed | Ensure text is long enough for analysis |

Performance Optimization

Chunk Configuration

{
  "parameters": {
    "chunkSize": 10,           // Pages per chunk
    "maxConcurrent": 4,        // Concurrent chunks
    "memoryLimit": "2GB",      // Memory limit
    "cacheResults": true       // Enable caching
  }
}

OCR Configuration

{
  "parameters": {
    "ocrConfig": {
      "useGpu": true,          // Use GPU if available
      "imagePreprocess": true, // Preprocess images
      "cacheOcr": true,       // Cache OCR results
      "batchSize": 5          // OCR pages per batch
    }
  }
}

Performance Monitoring

{
  "performance": {
    "totalTime": 1234,         // Total processing time (ms)
    "pagesPerSecond": 2.5,     // Processing speed
    "memoryUsage": {
      "heapUsed": "150MB",     // Used heap memory
      "heapTotal": "500MB"     // Total heap memory
    },
    "chunkStats": {
      "processed": 5,          // Chunks processed
      "failed": 0,            // Failed chunks
      "retried": 1            // Retried chunks
    }
  }
}

Tiếng Việt

Node tùy chỉnh cho n8n để trích xuất văn bản, hình ảnh, bảng và trường biểu mẫu từ tệp PDF với các tùy chọn tùy chỉnh mạnh mẽ và hỗ trợ đa ngôn ngữ.

Tính năng

  • ✅ Trích xuất văn bản từ PDF thông thường và dạng ảnh
  • ✅ OCR support for scanned PDFs
  • ✅ Multilingual PDF processing with auto-detection
  • ✅ Table extraction and formatting
  • ✅ Image extraction from PDFs
  • ✅ Document type recognition
  • ✅ Metadata extraction
  • ✅ Large file handling
  • ✅ Comprehensive error handling
  • ✅ Performance optimization

Phiên bản mới (v1.0.18)

Chúng tôi vừa phát hành phiên bản mới với các cải tiến:

  1. Cải thiện xử lý lỗi:

    • Thông báo lỗi chi tiết và rõ ràng
    • Phân loại mã lỗi
    • Gợi ý giải pháp
    • Thông báo lỗi đa ngôn ngữ
  2. Tối ưu hóa hiệu suất:

    • Xử lý theo chunk để tiết kiệm bộ nhớ
    • Cache thông minh cho tác vụ lặp lại
    • Xử lý song song cho tệp lớn
    • Tự động điều chỉnh kích thước chunk
  3. Cải thiện OCR:

    • Tối ưu hóa cho từng ngôn ngữ
    • Xử lý trước hình ảnh thông minh
    • Cache kết quả OCR
    • GPU support for OCR (if available)
  4. Tính năng mới:

    • Automatic language detection
    • Language distribution statistics
    • Smart table extraction
    • Image quality enhancement

Cài đặt

Thông qua giao diện web n8n

  1. Mở n8n
  2. Vào Settings > Community Nodes
  3. Tìm kiếm "n8n-nodes-extract-pdf"
  4. Nhấn "Install"

Thông qua dòng lệnh

npm install n8n-nodes-extract-pdf -g

Hoặc nếu bạn cài đặt n8n thông qua npm:

cd ~/.n8n
npm install n8n-nodes-extract-pdf

Xử lý sự cố cài đặt

Nếu bạn gặp lỗi "The specified package could not be loaded" khi cài đặt, hãy thử các bước sau:

  1. Cài đặt bằng file .tgz

    cd ~/.n8n
    npm install /đường/dẫn/đến/n8n-nodes-extract-pdf-1.0.21.tgz
  2. Kiểm tra phiên bản n8n Node này yêu cầu n8n phiên bản 0.146.0 trở lên. Kiểm tra phiên bản hiện tại của bạn với:

    n8n --version
  3. Kiểm tra quyền truy cập folder Đảm bảo user n8n có quyền đọc/ghi tất cả các thư mục cần thiết.

  4. Cài đặt các dependencies

    cd ~/.n8n
    npm install [email protected] [email protected] [email protected] [email protected]
  5. Khởi động lại n8n

    systemctl restart n8n

    hoặc

    pm2 restart n8n

Hướng dẫn sử dụng

  1. Thêm nút "Extract PDF" vào workflow
  2. Cấu hình các tùy chọn:
    • Nguồn PDF (Upload hoặc URL)
    • Hoạt động (Trích xuất văn bản, trích xuất bảng, trích xuất hình ảnh)
    • Tùy chọn ngôn ngữ
    • Cài đặt OCR (nếu cần)
    • Xử lý hình ảnh
  3. Chạy workflow

Ví dụ

Trích xuất văn bản từ PDF

{
  "nodes": [
    {
      "parameters": {
        "operation": "extractText",
        "binaryPropertyName": "data",
        "textExtractionOptions": {
          "pages": "1-5",
          "language": "auto",
          "ocrEnabled": true
        }
      },
      "name": "Extract PDF",
      "type": "n8n-nodes-extract-pdf",
      "typeVersion": 1,
      "position": [
        760,
        300
      ]
    }
  ]
}

Hỗ trợ

Nếu gặp vấn đề hoặc có câu hỏi, vui lòng tạo issue trên GitHub.

Giấy phép

MIT