Skip to content
DemoFAQ

PDF Generation Template Editor

Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.

View on GitHub

Release library resources ​

Overview

Release the files and memory resources occupied by ComPDF Conversion SDK.

Notice

  • After calling this interface to release library resources, the ComPDF Conversion SDK will no longer function properly and must be reloaded.
  • When you only want to release the resources occupied by the AI model rather than all resources used by the ComPDF Conversion SDK, you can achieve this by calling the ReleaseDocumentAIModel interface.
  • If conversion tasks are still running when Release is called, the cleanup is postponed until the last task returns, and new conversion tasks are rejected in the meantime.
  • While a conversion task is running, or while the cleanup has not completed yet, reconfiguring the DocumentAI model (SetDocumentAIModel) is rejected and returns ErrorCode.e_ErrConverting.
  • Unload the SDK only after all conversion interfaces have returned.

Sample

c#
// Release AI Model resources.
LibraryManager.ReleaseDocumentAIModel();

// Release library resources.
LibraryManager.Release();