Skip to content
ComPDF

Usage and Support: API Calls, Troubleshooting, and Support Entry


1. API Call Example: Convert PDF to Excel

1.1 Endpoint Description

  • URL: http://<EC2_PUBLIC_IP>:7000/file/handle
  • Method: POST
  • Content-Type: multipart/form-data
  • Response: application/octet-stream (file stream)

1.2 curl Example (Save Output File)

The following example saves the returned file as test-excel.xlsx:

bash
curl --location --request POST "http://<EC2_PUBLIC_IP>:7000/file/handle" \
  --output "test-excel.xlsx" \
  --form 'file=@"./input.pdf"' \
  --form 'executeType="pdf/xlsx"' \
  --form 'password=""' \
  --form 'resultFileName="test-excel"' \
  --form 'language="2"' \
  --form 'parameter="{  \"enableAiLayout\": 1,  \"isContainImg\": 1,  \"isContainAnnot\": 1,  \"enableOcr\": 1,  \"ocrLanguage\": 8,  \"pageRanges\": \"1,2,3-5\",  \"excelAllContent\": 1,  \"excelWorksheetOption\": \"e_ForTable\"}"'

2. Troubleshooting

2.1 Cannot Access Port 7000

Check the following in order:

  1. Whether the EC2 security group allows 7000/tcp
  2. Whether the client can access the instance public IP (or whether you should use the private IP)
  3. Whether the containers are running: sudo docker ps
  4. Check the service logs: sudo docker logs -f compdfkit_processor

2.2 License Invalid / Authorization Error

  1. Confirm that you have replaced LICENSE_KEY in /var/www/compdf/docker-compose.yml
  2. Recreate the containers to apply the environment variables:
    bash
    cd /var/www/compdf
    sudo docker compose down
    sudo docker compose up -d
  3. Check logs to locate the authorization error:
    bash
    sudo docker logs -f compdfkit_processor

2.3 Database Issues

  1. Check database logs: sudo docker logs -f dbmysql
  2. Verify there is enough disk space (conversion tasks and the database may consume space)
  3. If you changed the database password, update both DB_PASSWORD in the compose file and the MySQL environment variables accordingly

3. Support and Purchase Inquiry

  • License purchase and sales inquiry: For license purchases and sales inquiries, please contact our sales team. We will respond within 24 hours.