Skip to content
ComPDF

PDF specification conversion

To convert a PDF file to a standardized format, send a request to /file/handle, including the PDF file as input and file processing parameters. Before you begin, make sure ComPDFKit Processor is started and running.

You will send a POST request to the endpoint /file/handle of the processor. For more information about multipart requests, please refer to the API section.

Convert using local PDF file

Send segmented requests to /file/handle and attach the PDF file:

shell
curl -f -X POST http://localhost:7000/file/handle \
-H "Content-Type: multipart/form-data" \
-F file=@"document.pdf" \
-F executeType="pdf/convertType" \
-F password="file open password" \
-F parameter="{ \"pdfDocumentType\": \"PDFTypeA1a\" }" \
> result.pdf

PDF specification conversion

Note: Special parameters can be used when uploading files for different functions, while the remaining steps remain consistent.

PDF specification conversion:

java
{
    "pdfDocumentType": "PDFTypeA1a"
}

Required parameters

pdfDocumentType:PDF specification standard, supporting: PDFTypeA1a, PDFTypeA1b, PDFTypeA2a, PDFTypeA2u, PDFTypeA2b, PDFTypeX4, PDFTypeE1, PDFTypeUA1. Default is PDFTypeA1a.