compdfkit-api-samples

ComPDFKit PDF API is organized around the REST standard and supports various programming languages with rich PDF features, including conversion, document editor, data extraction, and so forth.

APACHE-2.0 License

Stars
16
Committers
2

ComPDFKit PDF API

ComPDFKit PDF API is organized around the REST standard and provides you with a simple document-upload, document-process, document-download workflow. Supporting various programming languages (such as Java, Python, C#, PHP, Swift, JavaScript, etc.), ComPDFKit API offers rich PDF functionalities, including conversion, document editor, data extraction, and so forth.

Before integrating the below PDF capabilities, you can register a free ComPDFKit API account to process 1,000 files per month without costs and limitations.

PDF to Word PDF to Excel PDF to PPT PDF to HTML
PDF to RTF PDF To Image PDF to CSV PDF to TXT
Data Extraction PDF to Editable PDF Image to Word Image to Excel
Image to PPT Image to HTML Image to RTF Image to CSV
Image to TXT Word to PDF Excel to PDF PPT to PDF
HTML to PDF RTF to PDF PNG to PDF CSV to PDF
TXT to PDF Merge PDF Split PDF Rotate PDF
Delete PDF Insert PDF Extract PDF Compare PDF
OCR Layout Analysis Image Sharpening Enhancement Form Recognizer
Trim Correction Stamp Inspection Add Watermark Compression PDF

Getting Started with Code Samples

This GitHub repository provides public access to code examples that demonstrate how to programmatically submit requests to the ComPDFKit API service.

Before you begin, you may need to do some preparatory work.

  • Register a free ComPDFKit API account using email only.
  • Obtain the project ID and its related key from the API Keys section of the console.
  • To start requesting the ComPDFKit API, please read the comprehensive API reference for the function you need to call.

Instructions for Running Code Demo

Authentication

You can get accessToken and related verification information by sending your publicKey and SecretKey . AccessToken will expire after 12 hours. When calling the subsequent interface, you must carry this token in the request header: Authorization: Bearer {accessToken}.

Before running each sample program, look for a comment that reads:

public_key_******

secret_key_******

and replace ****** with your API Keys.

Create task

A task ID is automatically generated for you based on the type of PDF tool you choose. You can provide the callback notification URL. After the task processing is completed, we will notify you of the task result through the callback interface. You can perform other operations according to the task result, such as downloading the result file.

Upload files

Upload the original file and bind the file to the task ID. The field parameter is used to pass the JSON string to set the processing parameters for the file. Each file will generate automatically a unique filekey.

Please note that a maximum of five files can be uploaded for a task ID and no files can be uploaded for that task after it has started.

Execute task and get task information

After the file is uploaded, the file processing starts and the download link of the corresponding result file is obtained according to the filekey of each file

API Documentation

After you've successfully sent an API Call using these examples, take a look at the Documentation for each API endpoint for a full description of parameters you can adjust to customize your solution.

Support

ComPDFKit has a professional R&D team that produces comprehensive technical documentation and guides to help developers. Also, you can get an immediate response when reporting your problems to our support team.

  • For detailed information, please visit our API Reference page.
  • Stay updated with the latest improvements through our Changelog.
  • For technical assistance, please reach out to our Technical Support.
  • To get more details and an accurate quote, please contact our Sales Team.

Related