In Node.js, I'm able to write metadata in pdf file using hummus npm, but I also need to write metadata to docx file.
Please let me know if someone has suggestions for this.
In Node.js, I'm able to write metadata in pdf file using hummus npm, but I also need to write metadata to docx file.
Please let me know if someone has suggestions for this.
A Docx file comprises of a collection of XML files that are contained inside a ZIP archive. The contents of a new Word document can be viewed by unzipping its contents.
you can use unzipper npm to unzip docx file.
fs.createReadStream('path/to/archive.zip')
.pipe(unzipper.Extract({ path: 'output/path' }));
2. Once unzip the docx file, you can see app.xml and core.xml files in docProps directory, and update this as you require for the metadata of the docx file.
./docProps/
./word/
./_rels/
./customXml/
./[Content_Types].xml