Icon

TEST_​PDF Parser

Development / Initial PDF Parsing Test
Initial test nodes used to verify text and embedded image extraction.
Not required for the final workflow.

1. Source PDF & Page Splitting
Selects the source PDF and splits it into individual single-page PDF files.
The generated files are stored in the pages folder and are used as input for both text and image extraction.

User adjustments required:
• List Files/Folders: Select the folder containing the source PDF and filter for the required .pdf file.
• Python Environment Provider: Keep the pypdf package available.
• Python Script: Update target_name if the source PDF filename changes.
• Output folder: ...\PDF_KNIME\pages

2. Page Text Extraction
Reads all single-page PDF files, extracts the text from each page and creates a numeric page identifier.
The output is sorted by page number and is later joined with the corresponding extracted images.

User adjustments required:
• PDF Parser: Set the input directory to the pages folder created in Step 1.
• Enable Use file path as title.
• Document Data Extractor: Extract Title and Document body text.
The remaining nodes normally require no changes. Adjust the String Manipulation node only if the generated page filename format changes.

3. Page Image Extraction
Extracts embedded images from the individual PDF pages and assigns each image to its original page number.
Repeated non-relevant images are removed before the image data is joined with the extracted page text.

User adjustments required:
• Tika Parser: Set the input directory to the pages folder created in Step 1.
• Set the image output directory to the page_images folder.
• List Files/Folders: Set the source directory to the same page_images folder.
• Image Reader (Table): Use Location as the image file path column.
• Row Filter: Adjust the filter only if different repeated/non-relevant images need to be excluded.

4. Text & Image Join
Combines the extracted page text with the corresponding relevant images using the page number as the common key.
Pages without relevant images are retained so that no textual information is lost.

User adjustments required:

• Joiner: Match both input tables using Page = Page.
• Keep Matching rows and Left unmatched rows enabled.
• Keep only the required output columns: Page, Document body text, Image, and Location.

PDF Parser
Document Data Extractor
Extract embedded images from PDF pages
Tika Parser
Tika Parser
List Files/Folders
Image Reader (Table)
Path to String
Joiner
List extracted page images
List Files/Folders
Convert image path to String
Path to String
Load images into KNIME
Image Reader (Table)
Restore image metadata
Joiner
Extract page number from filename
String Manipulation
Convert page number to Integer
String to Number
Rename page identifier to Page
Column Renamer
Rename page identifier to Page
Column Renamer
Join text and images by page
Joiner
Remove repeated non-relevant images
Row Filter
Select source PDF
List Files/Folders
Split PDF into individual pages
Python Script
Provide Python + pypdf environment
Python Environment Provider (Labs)
Read individual PDF pages
PDF Parser
Convert PDF path to String
Path to String
Convert page number to Integer
String to Number
Sort pages in ascending order
Sorter
Extract page text and filename
Document Data Extractor
Extract page number from filename
String Manipulation

Nodes

Extensions

Links