SDK Package Structure
The ComPDF Conversion Node.js release package contains the following files:
text
lib/
index.js
index.d.ts
compdfkit_conversion_node.node
libcpdfconversionsdk.so
libDocumentAI.so.4.0.0
libonnxruntime.so.1.18.0
libopencv_world.so.410
resource/
models/
documentai.model
samples/
demo/
demo.js
license.xml
input_files/
word.pdf
excel.pdf
powerpoint.pdf
output_files/ # sample output directory
doc/
api_reference_node.html
developer_guide_node.md
html/
legal.txt
release_notes.txtThe main directories are:
lib/index.js: SDK entry point loaded directly by the release sample. It loads the native addon from the same directory.lib/index.d.ts: TypeScript declarations for conversion options, callbacks, and exported functions.lib/compdfkit_conversion_node.node: compiled Node-API addon.lib/*.so: native runtime libraries for Linux.resource/models/: packaged DocumentAI model used by the demo.samples/demo/demo.js: release sample entry point.samples/input_files/: bundled sample PDFs.samples/output_files/: sample output directory provided by the release package.samples/license.xml: sample license file used by default.doc/: API reference and developer guide.legal.txt: legal and copyright information.release_notes.txt: release information.
Load the Node.js SDK
The release package already contains the SDK runtime under lib/, so no installation step is required for the bundled samples.
When running samples from the release package, run from the package root directory:
shell
cd /path/to/compdfkit_conversion_node
node samples/demo/demo.jsThe sample loads the SDK with:
js
const sdk = require("../../lib/index.js");