PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Extract text, tables and images from PDF documents to a JSON file.
Commonly, tables can be divided into two categories: standard tables and non-standard tables. The specific definitions are as follows:
Standard table: The table border and the inner lines of the table are complete and clear. There is no need to manually add table lines to divide the table content.
Non-Standard Tables: Tables lacking borders or clear inner lines, requiring manual additions of table lines to separate contents.
ComPDF Conversion SDK supports the option jsonContainTable. When enabled, it will extract table content from PDFs and output the table structure; otherwise, table content will be treated as regular text.
Full sample code which illustrates the text extraction capabilities.
$option = new ConvertOption();
$option->enableAiLayout = true;
$option->jsonContainTable = true;
// Extract PDF to JSON.
Conversion::convert('Json', 'json.pdf', 'password', 'output.json', $option);