Error Codes
Most C APIs return CSDKErrorCode. e_CErrSuccess indicates success. Other common error codes include:
| Error Code | Meaning |
|---|---|
e_CErrFile | File cannot be found or opened. |
e_CErrPDFPassword | The PDF password is invalid. |
e_CErrPDFFormat | The PDF format is invalid or the file is corrupted. |
e_CErrOutOfMemory | Memory allocation failed. |
e_CErrLicenseInvalid | The license is invalid. |
e_CErrLicenseExpire | The license has expired. |
e_CErrLicenseConcurrencyExceeded | Current conversion concurrency exceeds the license limit. |
e_CErrLicensePageLimitExceeded | Current conversion pages exceed the license limit. |
e_CErrOCRFailure | OCR recognition failed. |
e_CErrConverting | A conversion task is already running. |
e_CErrUnknown | Unknown error. |
Always check the returned error code after calling a conversion API.
4. Conversion Guides
ComPDF Conversion SDK allows developers to use simple C APIs to convert PDFs to common formats such as Word, Excel, PowerPoint, HTML, CSV, PNG, JPEG, RTF, TXT, Searchable PDF, OFD, JSON, and Markdown. It also provides conversion options, such as whether to include images or annotations, whether to enable OCR, and whether to enable layout analysis.