How to Deploy ComPDFKit On-premises with Docker (Synchronous API)?

On-premises | Technical QuestionsFri. 18 Oct. 2024

There are three containers for on-premises provided by ComPDFKit Processor to process PDFs on the server, including synchronous API, asynchronous API, and WebViewer. If you don’t know which suits your situation, learn the differences between synchronous, asynchronous API, and WebViewer

 

Follow the detailed instructions below to learn how to use our synchronous API to deploy ComPDFKit Processor on your server with Docker. 

 

See also: How to deploy ComPDFKit Processor with Docker (Asynchronous API)

 

Server Configuration

 

- Operating System Version: Ubuntu 22.04.3 LTS    

- CPU: 8vCPU 

- RAM: 16G 

- Disk Storage: 50G

- Docker Version: Docker version 20.10.25, build 20.10.25-0ubuntu1~20.04.2

- docker-compose version: 1.25.0

 

Before starting to deploy ComPDFKit Processor, please download the mirror image of ComPDFKit Processor’s synchronous API on dockerhub.

 

The Process of Deploying ComPDFKit Processor

 

Step 1. Place docker-compose.yml and compdfkit.sql into the fold where your server executes commands.

step1

 

Step 2. Modify LICENSE in docker-compose.yml to your own license key.

step2

 

Step 3. After modifying, execute the command: docker-compose up.

step3

 

Step 4. Wait for the execution to complete, and you will see the following information:

“Running ComPDFKit Processor version 2.4.0 port(s) 7000 (http)”

step4

 

Step 5. Open a new window (using Xshell as an example) and run the command: docker ps -a. Once it outputs as the below image, it indicates that you have successfully deployed ComPDFKit Processor.

step5

 

Verify If ComPDFKit Processor Works Properly 

Example Feature: PDF Conversion (Curl)

 

Step 1. Upload your PDF document to the server. Here the file “test.pdf”  is placed in the same directory as compdfkit.sql.

 

 Step 2. Run the following curl command:

curl -f -X POST http://Your own server IP:17000/file/handle \
-H "Content-Type: multipart/form-data" \
-F file=@"test.pdf" \
-F executeType="pdf/json" \
-F password="file open password" \
-F parameter="{  \"type\": \"2\",  \"isAllowOcr\": \"1\"}" \
> Result.zip

 

 

Result.zip is the output file after completing the conversion.

 

 If you have any other questions about ComPDFKit Processor, please contact our technical support team for further assistance.