This sample code utilizes the Unstructured Open Source library and also provides an alternative method the utilizing the Unstructured Partition Endpoint.
Method 1: Using partition_pdf
To extract the tables from PDF files using the partition_pdf, set theskip_infer_table_types
parameter to False
and strategy
parameter to hi_res
.
Usage
Method 2: Using Auto Partition or Unstructured API
By default, table extraction from all file types is enabled. To extract tables from PDFs and images using Auto Partition or Unstructured API parameters simply setstrategy
parameter to hi_res
.
Usage: Auto Partition