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:
- Whether the EC2 security group allows
7000/tcp - Whether the client can access the instance public IP (or whether you should use the private IP)
- Whether the containers are running:
sudo docker ps - Check the service logs:
sudo docker logs -f compdfkit_processor
2.2 License Invalid / Authorization Error
- Confirm that you have replaced
LICENSE_KEYin/var/www/compdf/docker-compose.yml - Recreate the containers to apply the environment variables:bash
cd /var/www/compdf sudo docker compose down sudo docker compose up -d - Check logs to locate the authorization error:bash
sudo docker logs -f compdfkit_processor
2.3 Database Issues
- Check database logs:
sudo docker logs -f dbmysql - Verify there is enough disk space (conversion tasks and the database may consume space)
- If you changed the database password, update both
DB_PASSWORDin 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.