Skip to content

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub

ComPDF AI Parsing JSON Introduction ​

ComPDF AI Label Introduction ​

  • caption: Figure caption

  • footnote: Footnote

  • formula: Formula

  • list-item: List item

  • page-footer: Page footer

  • page-header: Page header

  • picture: Picture

  • section-header: Section header

  • table: Table

  • text: Paragraph text

  • title: Title

ComPDF AI Parameter Introduction ​

x_request_id: File ID ​

file_type: File type, image or PDF ​

message: File parsing status ​

code: 200 indicates successful processing ​

metrics ​

​ angle: Rotation angle of the page image

​ status: Processing status of the page image

​ dpi: Coordinate reference for the PDF document

​ page_id: Page number based on reading order

​ image_id: File name of the page converted from PDF to image

​ duration: Processing duration for parsing the page content

​ page_image_height: Height of the page image

​ page_image_width: Width of the page image

result ​

total_count: Total number of pages in the file ​

valid_page_number: Number of valid pages ​

total_page_number: Total number of pages in the file ​

success_count: Number of successfully processed pages ​

markdown: Markdown content of all pages in the file ​

pages ​

​ angle: Rotation angle of the page image

​ page_id: Page number based on reading order

​ image_id: File name of the page converted from PDF to image

​ height: Height of the page image

​ width: Width of the page image

​ duration: Processing duration for parsing the page content

​ status: Processing status of the page image

​ content: Parsed content of the page

content ​
Picture ​

​ id: Index of the picture label on the current page

​ pos: Position coordinates of the picture label on the current page

​ image_url: Relative path where the cropped label image is saved

​ data:

​ path: Relative path where the cropped label image is saved

​ region: Position coordinates of the label on the current page

​ size:

​ width: Width of the picture label

​ height: Height of the picture label

​ type: Default is image

Table ​

​ id: Index of the table label on the current page

​ pos: Position coordinates of the table label on the current page

​ text: Content of the table in HTML format

​ type: Default is table

Formula ​

​ id: Index of the formula label on the current page

​ pos: Position coordinates of the formula label on the current page

​ type: Default is line

​ text: Content of the formula in LaTeX format

​ score: Recognition confidence of the formula label

​ angle: Rotation angle of the formula label

​ sub_type: Default is formula

Other Labels ​

​ id: Index of the label on the current page

​ pos: Position coordinates of the label on the current page

​ type: Default is line

​ text: Content of the label in Markdown format

​ score: Recognition confidence of the label

​ angle: Rotation angle of the label

detail ​

Picture ​

​ paragraph_id: Index of the label on the current page

​ page_id: Index of the page where the label is located

​ type: Default is image

​ position: Position coordinates of the label on the current page

​ image_url: Relative path where the cropped label image is saved

​ outline_level: Priority level

​ content: 0

​ text: Empty

Table ​

​ caption_id:

​ paragraph_id: Index of the label on the current page

​ page_id: Index of the page where the label is located

​ type: Default is table

​ position: Position coordinates of the label on the current page

​ paragraph_id: Index of the label on the current page

​ page_id: Index of the page where the label is located

​ outline_level: Priority level

​ sub_type: Secondary label for the table, default is bordered

​ content: Default is 0

​ text: Content of the table in HTML format

Formula ​

​ paragraph_id: Index of the label on the current page

​ page_id: Index of the page where the label is located

​ type: Default is paragraph

​ position: Position coordinates of the label on the current page

​ tags: Default is formula

​ outline_level: Priority level

​ sub_type: Secondary label for the formula, default is text

​ content: Default is 0

​ text: Content of the formula in LaTeX format

Other Labels ​

​ paragraph_id: Index of the label on the current page

​ page_id: Index of the page where the label is located

​ type: Default is paragraph

​ position: Position coordinates of the label on the current page

​ outline_level: Priority level; 0 for section-header labels, -1 for others

​ sub_type: Secondary label, default is text

​ content: Page content level; 1 for page-footer or page-header labels, -1 for others

​ text: Content of the label in Markdown format