- Notifications
You must be signed in to change notification settings - Fork0
Example project demonstrating how to use PDFix SDK WebAssembly build in Node.js. Make PDF Files Accessible, Extract Data from PDF, Convert PDF to HTML, Fill-in PDF Form, Stamp PDF and more...
pdfix/pdfix_sdk_example_node_js
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Example project demonstrating how to use PDFix SDK WebAssembly build in Node.js.
For more information please visithttps://pdfix.net.
// Loads the PDFix Wasm in JavaScriptPDFIX_WASM().then(function(wasm){PDFIX_SDK=wasm;PDFIX_SDK.GetPdfix=function(){returnwasm.wrapPointer(wasm._GetPdfix(),wasm.Pdfix);}PDFIX_SDK.GetPdfToHtml=function(){returnwasm.wrapPointer(wasm._GetPdfToHtml(),wasm.PdfToHtml);}PDFIX_SDK.allocArray=function(typedArray){varnumBytes=typedArray.length*typedArray.BYTES_PER_ELEMENT;varptr=wasm._malloc(numBytes);varheapBytes=newUint8Array(wasm.HEAPU8.buffer,ptr,numBytes);heapBytes.set(newUint8Array(typedArray.buffer));return[heapBytes.byteOffset,typedArray.length];};PDFIX_SDK.allocString=function(string){constbufSize=wasm.lengthBytesUTF32(string);varbuffer=wasm._malloc(bufSize+4);wasm.stringToUTF32(string,buffer,bufSize+4);return[buffer,string.length];}// your code...});
- Node.js 14.5.1 LTS +
Clone the repository:git clone https://github.com/pdfix/pdfix_sdk_example_node_js
...or download as .zip:
Download as .zip
- Run
./getPdfixWasm.shto get the latest PDFix Wasm package - Run Node.js with --experimental-wasm-threads and --experimental-wasm-bulk-memory flags
- Eg.
node --experimental-wasm-threads --experimental-wasm-bulk-memory pdfix.js
Let us know and we’ll get back to you. Write us tosupport@pdfix.net or fill thecontact form.
About
Example project demonstrating how to use PDFix SDK WebAssembly build in Node.js. Make PDF Files Accessible, Extract Data from PDF, Convert PDF to HTML, Fill-in PDF Form, Stamp PDF and more...
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Contributors2
Uh oh!
There was an error while loading.Please reload this page.