For the complete documentation index, see llms.txt. This page is also available as Markdown.
FormsEditingViewingPDF/UAPDF/A

Extract Document Structure Showcase Demo Code Sample

Requirements

These packages are required to use these features in production. Trial keys have unlimited access to all features

Web SDKServer SDKPackage: Smart Data ExtractionModule: Data ExtractionLive demo

Easily analyze the top two pages and produce a JSON that describes the PDF's structure. Preview the JSON data with a colorized legend for each extracted document element.

This sample code includes Server SDK processing in JavaScript, with UI provided by WebViewer. If a viewer is not needed, or you want to work with a different language or framework for the Server SDK, please check out our Server Smart Data Extraction Sample Code.

This demo allows you to:

  • Upload your own PDF file

  • Extract a JSON containing the elements in the PDF

  • Create a colorized legend for each extracted element

  • Update the PDF document to identify the extracted elements

Implementation steps

To add document structure extraction capability with Server SDK and a UI with WebViewer:

Step 1: Follow get-started in JavaScript for Server SDK Step 2: Follow get-started in your preferred web stack for WebViewer Step 3: Download Data Extraction Module Step 4: Add the ES6 JavaScript sample code provided in this guide

In this demo, the first page in the JSON file is skipped as it contains a trial demo message. Processing starts on the next page after the trial demo page.

Once you generate your license key, it will automatically be included in your sample code below.

spinner