On this page
Guides
File Conversion and Document AI API
Upload the source file and process it. The executeType
field is used to specify the file processing method, and the parameter
field is used to pass a JSON string to set the processing parameters for the file.
Request Method
- Request Method:POST
- Parameter Passing Method:Body (form-data)
Request Address
sh
http://localhost:7000/file/handle
Request Parameters
Parameter Name | Data Type | Description | Required |
---|---|---|---|
file | File | The uploaded file. | Yes |
executeType | String | Type of file execution, e.g., docx/pdf. | Yes |
password | String | Password to open the file. | No |
language | Integer | Interface error prompt language (1 = English, 2 = Chinese). | No |
parameter | String | File processing parameters. | No |
resultFileName | String | Name for the returned downloadable file. | No |
files | Array | Uploaded files for merging PDFs. | No |
parameters | Array | Parameters for PDF processing (for merging PDFs). | No |
image | File | Image files for adding watermarks. | No |
The Parameter
field is only applicable to functionalities that currently support setting processing parameters. If no parameters are set, default values will be used. For the specific JSON format content and parameter field explanations corresponding to different functionality types, please refer to the Conversion Tool Guide.
Currently supported types for executeType
include:
Type | Description |
---|---|
pdf/docx | Convert PDF file to Word (.docx) document. |
pdf/xlsx | Convert PDF file to Excel (.xlsx) document. |
pdf/pptx | Convert PDF file to PowerPoint (.pptx) document. |
pdf/txt | Convert PDF file to TXT (.txt) document. |
pdf/png | Convert PDF file to PNG (.zip) document. |
pdf/jpg | Convert PDF file to JPG (.zip) document. |
pdf/csv | Convert PDF file to CSV (.zip || .csv) document. |
pdf/html | Convert PDF file to HTML (.zip) document. |
pdf/rtf | Convert PDF file to RTF (.RTF) document. |
doc/pdf | Convert Word (.doc) file to PDF document. |
docx/pdf | Convert Word (.docx) file to PDF document. |
xls/pdf | Convert Excel (.xls) file to PDF document. |
xlsx/pdf | Convert Excel (.xlsx) file to PDF document. |
ppt/pdf | Convert PowerPoint (.ppt) file to PDF document. |
pptx/pdf | Convert PowerPoint (.pptx) file to PDF document. |
txt/pdf | Convert TXT (.txt) file to PDF document. |
png/pdf | Convert Image (.png) file to PDF document. |
JPG/pdf | Convert Image (.png) file to PDF document. |
html/pdf | Convert HTML (.html) file to PDF document. |
rtf/pdf | Convert RTF (.rtf) file to PDF document. |
csv/pdf | Convert CSV (.csv) file to PDF document. |
tiff/pdf | Convert TIFF (.tif) file to PDF document. |
pdf/split | Split PDF documents. |
pdf/merge | Merge multiple PDF documents into one PDF. |
pdf/delete | Delete specific PDF pages. |
pdf/extract | Extract specific PDF pages. |
pdf/rotation | Rotate specific PDF pages. |
pdf/insert | Insert blank pages in front of or behind a specified PDF page. |
pdf/addWatermark | Add watermarks. |
pdf/delWatermark | Remove watermarks. |
documentAI/ocr | OCR. |
documentAI/magicColor | Image Sharpening Enhancement. |
documentAI/tableRec | Form Recognizer. |
documentAI/layoutAnalysis | Layout Analysis. |
documentAI/dewarp | Trim Correction. |
documentAI/detectionStamp | Stamp Inspection. |