Docx: How to convert the Word Document to PDF?

Created on 31 Oct 2018  路  3Comments  路  Source: dolanmiu/docx

Based on what I saw on the official documentation of docx, version 4 and up does not support the 'export the pdf' functionality.

Actually I have to save both word documents and PDF. I successfully converted the .docx file but not being able to export to pdf.

Do you have any other alternative I can use to successfully convert and save the docx to pdf?

Most helpful comment

For anyone looking, there is now https://www.npmjs.com/package/@nativedocuments/docx-wasm which performs the conversion locally. Freemium model.

All 3 comments

Yes, you can check the source of the old pdf packer here:

https://github.com/dolanmiu/docx/blob/5f594a822fc2b4a89e2c82c5ca255f9ac05eefa7/src/export/packer/pdf-convert-wrapper.ts

As you can see, its a cheat, and only calls an endpoint, which you can do yourself

Closing because PDF creation is no longer in scope

For anyone looking, there is now https://www.npmjs.com/package/@nativedocuments/docx-wasm which performs the conversion locally. Freemium model.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amitm02 picture amitm02  路  5Comments

liquidslr picture liquidslr  路  4Comments

zeco2309 picture zeco2309  路  5Comments

efx picture efx  路  5Comments

barberousse picture barberousse  路  5Comments