1.1.3 • Published 2 months ago
@tadashi/doc2pdf v1.1.3
doc2pdf
doc2pdf is a library that converts docx
documents into pdf
.\
It uses the docxtemplater library and allows for the creation of document templates that can be generated with
customized data. It depends on the LibreOffice executable
being installed.
Install
$ npm i @tadashi/doc2pdf
Usage
import { doc2pdf } from '@tadashi/doc2pdf'
const inputFile = new URL('./helper/doc1.docx', import.meta.url)
const outputFile = new URL('./helper/doc1.pdf', import.meta.url)
const data = {
firstName: 'Lucas',
lastName: 'Tadashi',
age: 12,
}
const file = await doc2pdf({ inputFile, outputFile, data })
Team
!IMPORTANT\ Buy me a coffee!\ BTC:
bc1q7famhuj5f25n6qvlm3sssnymk2qpxrfwpyq7g4
License
MIT © Thiago Lagden