Skip to main content

View PDF Document Structure View internal structure and metadata of PDF documents.

PDF Structure Viewer illustration
📄

PDF Structure Viewer

View internal structure and metadata of PDF documents.

1

Upload PDF

Drop your PDF file to analyze.

2

Explore Tabs

Switch between Document Info, Pages, and Form Fields.

3

View structure information

See detailed structure information.

Loading tool...

What Is PDF Structure Viewer?

A PDF Structure Viewer is a specialized tool that allows users to examine the internal organization and properties of PDF documents, providing an in-depth look at their composition and metadata. Developers and quality assurance teams use it to troubleshoot and validate PDF files, solving specific problems like identifying inconsistent page sizes or missing form fields. For instance, when dealing with a PDF document that has incorrect formatting, it helps pinpoint the issue by displaying per-page dimensions in points and inches, as well as rotation angles.

What sets this tool apart is its ability to extract and display detailed information about each page, including width, height, and rotation, which is particularly useful for debugging purposes. It also provides a comprehensive view of form fields, listing field names and types, making it easier to identify and fix issues with interactive forms. The tool's interface is divided into three tabs: Document Info, Pages, and Form Fields, each offering a distinct perspective on the PDF document's structure and properties.

By using this tool, developers can gain complete visibility into their document's structure without relying on external desktop software, making it an efficient solution for tasks like auditing or understanding complex PDF files. As a pdf metadata viewer and pdf info viewer, it offers a unique combination of features that simplify the process of working with pdf documents, allowing users to focus on resolving issues rather than navigating through multiple tools.

Why Use PDF Structure Viewer?

  • Three-tab organized information view
  • Per-page dimension and rotation details
  • Form field discovery and listing
  • Complete metadata display

Common Use Cases

Debugging

Inspect PDF structure when troubleshooting issues.

Auditing

Review document metadata and properties.

Development

Understand PDF structure for programming tasks.

Quality Check

Verify page sizes, metadata, and form fields.

Technical Guide

The tool works under the hood by utilizing the pdf-lib library to load and analyze PDF documents. When a PDF file is dropped into the FileDropzone component, it triggers the handleFile function, which sets off a chain of events to extract metadata from the document. This includes using getter methods like getTitle, getAuthor, and getSubject to retrieve specific information about the document. The pdf-lib library's PDFDocument.load method is used with the ignoreEncryption option set to true, allowing it to load encrypted PDFs without requiring a password.

Page information is obtained by iterating over the pages returned by the getPages method and reading their size and rotation using the getSize and getRotation methods respectively. The page dimensions are then converted from points to inches by dividing by 72, providing a more intuitive measurement for users. Form fields are discovered using the getForm and getFields methods, with error handling in place to catch cases where the PDF does not contain any forms. Creation and modification dates are formatted into human-readable strings using the toLocaleString method.

The extracted information is then organized into a tabbed interface, with three tabs for Document Info, Pages, and Form Fields. Each tab displays relevant information about the document, such as metadata, page dimensions, and form field names and types. The useState hook from React is used to manage the state of the application, storing the loaded PDF file, its structure, and any errors that may occur during processing. The useCallback hook is used to memoize functions like handleFile and reset, preventing unnecessary re-renders and improving performance. By leveraging these technologies and techniques, the tool provides a powerful and efficient way to examine and understand the internal structure of PDF documents.

Tips & Best Practices

  • 1
    Document Info tab shows all metadata
  • 2
    Pages tab reveals mixed page sizes
  • 3
    Form Fields tab helps understand fillable PDFs
  • 4
    Use with accessibility checker for complete analysis

Related Tools

Frequently Asked Questions

Q What information does this show?
File properties, metadata (title, author, dates), page dimensions, rotation, and form fields.
Q Can I edit the metadata here?
This is view-only. Use PDF Metadata Editor to modify metadata.
Q Why are some fields showing dashes?
Dashes indicate the metadata field is not set in the PDF.
Q What are point dimensions?
PDF uses points as units. 72 points = 1 inch. The viewer also shows inches.
Q Does this work with encrypted PDFs?
The tool attempts to load encrypted PDFs but some protection may prevent reading.

About This Tool

PDF Structure Viewer is a free online tool by FreeToolkit.ai. All processing happens directly in your browser — your data never leaves your device. No registration or installation required.