Docflow uses xParse as its core document parsing service, which can accurately convert PDF, Word, and common image format documents into structured data containing text, tables, title hierarchies, formulas, handwritten characters, and image information for subsequent automated processing and analysis.In application scenarios such as knowledge base construction and unstructured document image processing, powerful document parsing capabilities can meet most requirements.The document parsing results returned by Docflow’s result retrieval interface are heavily trimmed from xParse results, retaining only basic text blocks and position information for page text position visualization rendering.
This document uses this sample document as an example to explain how to obtain document parsing results.
Prerequisites
According to the Document Upload instructions, upload a file and obtain the returned file ID.File processing takes time. You need to wait several seconds after uploading before you can retrieve processing results.
Get Document Parsing Results
Document parsing results are large in size and are not returned by default.When calling the result retrieval interface, add the URL parameter
with_document=true
to return document parsing results.
Example:
Response JSON Structure Description
The document parsing structure is inresult.files[].document
, with the following example (excerpt):
document
: Document parsing result objectpages
: Array of parsing results for each page of the documentangle
: Rotation angle of the document pagewidth
: Width of the document pageheight
: Height of the document pagelines
: Results for each text line in the documenttext
: Text contentposition
: Text coordinatescharPositions
: Coordinates of each character in the text
position
can be referenced in the Coordinate System Description.