Skip to content

PDF Page Index

PDF Page Index is a powerful tool within the Nappai automation system designed to understand the structure of your PDF documents. Instead of treating a PDF as just a flat image or text, this component uses intelligent algorithms to identify the document’s table of contents, sections, and subsections. It essentially creates a map of the document for you, making it easier to navigate, search, or process specific parts of large files automatically.

How it Works

This component acts as a smart reader for your PDF files. When you provide a PDF document, the component scans through the pages to find patterns that indicate a structure—such as bold headings, numbered lists, or page numbers at the end of lines.

It leverages advanced AI technology to interpret these patterns, even in complex documents like scanned images or poorly formatted files where traditional methods might fail. The system then organizes this information into a clear hierarchy (like a family tree of topics), distinguishing between main sections and their subsections. This structural map is then made available as data for the next steps in your workflow, allowing other components to know exactly where specific information lives within the PDF.

Connection & Credentials

This component does not require external API credentials or third-party service connections. It processes data locally within the Nappai environment.

Inputs

The configuration for this component is handled automatically through its base settings. As a specialized tool for structural analysis, it relies on the PDF file provided in the workflow context. You do not need to manually configure complex input fields for this specific node; instead, ensure that the PDF file is passed to this component from a previous step in your automation (such as a “Read PDF” or “Fetch File” component).

Outputs

When the process is complete, this component produces a structured dataset representing the document’s hierarchy. This output is typically a list or tree structure that maps sections to their corresponding page numbers.

This data is crucial for downstream tasks. For example, if you have another component that needs to extract text only from “Chapter 2,” it can use the output of this component to find the exact page number and scope of Chapter 2.

Output Data Example (JSON)

json { “structure”: [ { “title”: “Introduction”, “level”: 1, “page_number”: 1, “subsections”: [] }, { “title”: “Methodology”, “level”: 1, “page_number”: 5, “subsections”: [ { “title”: “Data Collection”, “level”: 2, “page_number”: 6, “subsections”: [] }, { “title”: “Analysis Process”, “level”: 2, “page_number”: 8, “subsections”: [] } ] }, { “title”: “Results”, “level”: 1, “page_number”: 12, “subsections”: [] } ] }

Connectivity

This component is typically used early in a workflow involving document processing.

  • Incoming Connections: Connect a component that retrieves or reads PDF files (e.g., “Read File,” “Download PDF,” or “Parse PDF Text”) into this component. The PDF file is the primary input required for the index extraction to work.
  • Outgoing Connections: Connect the output of this component to components that need structural context. Common next steps include:
    • Text Extraction Components: To extract text only from specific sections identified in the index.
    • Data Processing Components: To analyze specific chapters or sections separately.
    • Search Components: To enable searching within specific boundaries of the document.

Usage Example

Imagine you are building a workflow to summarize a 50-page legal contract.

  1. Read PDF: You first use a component to upload the PDF file.
  2. PDF Page Index: You connect the PDF to this component. It analyzes the file and returns a list of all clauses and sub-clauses with their page numbers.
  3. Extract Specific Clause: You use a subsequent component to extract the text only from the “Liability” section. This component uses the page number provided by the PDF Page Index component to target the exact part of the document, ignoring the rest.
  4. Summarize: Finally, you send the extracted “Liability” text to an AI summarizer to get a quick overview of the legal risks.

Important Notes

  • Development Status: This component is currently marked as being in a development phase. This means its features are available for testing and exploration, but you may encounter changes in behavior or performance as the system evolves.
  • AI Dependency: The accuracy of the structure extraction depends on the quality of the PDF. Well-formatted PDFs with clear headings will yield the best results. Scanned images of documents may require higher resolution for the AI to accurately detect sections.
  • Structure Only: This component does not extract the raw text content of the pages; it only extracts the structure (titles, headings, and page numbers). You will need other components to retrieve the actual text content.

Tips and Best Practices

  • Ensure High-Quality PDFs: For the most accurate hierarchical extraction, use PDFs that are digitally generated rather than scanned images whenever possible.
  • Plan Your Workflow Early: Since this component provides the “map” of the document, include it at the beginning of your document-processing workflows to unlock targeted extraction capabilities.
  • Monitor Output Structure: When connecting subsequent components, check the output format of the index (e.g., list of dictionaries or tree structure) to ensure the next step can interpret the page numbers correctly.

Security Considerations

  • Data Privacy: When uploading PDFs to this component, be aware that the file content is processed to identify structure. Ensure that sensitive documents comply with your organization’s data privacy policies.
  • Local Processing: The structural analysis is performed within the Nappai environment, minimizing data exposure to external third-party services for this specific task.