Last month we published our docx-wasm NPM module, allowing you to perform Word document operations wherever you can run NPM. For example, to convert Word documents to PDF.
With the sample code in our readme, it is trivial to do this server-side. It is also easily adapted to serverless, for example AWS Lambda (with or without an AWS Step Function). We’ll be speaking about this at the PDF Association electronic document conference in Seattle in June, but in the meantime please see our docx-to-pdf-on-AWS-Lambda GitHub project.
How about client-side? As soon as we published the NPM module, we were asked “can you run it in a web browser?” 🙂
The answer is “Yes!”, and it works nicely. The browser needs to get the code from somewhere, of course. You can get it at https://wasm.nativedocuments.com/. Or you can serve the code yourself, using https://github.com/NativeDocuments/docx-wasm-client-side.
Why is this interesting? If you are running a popular SAAS business, server costs can mount up quickly. Especially with conversion workloads, which are CPU intensive. So shifting the workload to the client can reduce costs. By cutting down on network traffic, it can also improve responsiveness. Then there is the possibility of running offline – PDF conversion in node, without a network connection.
If this is something you’ve been waiting for, please get in touch!