Ziv-Barber / officegen

Standalone Office Open XML files (Microsoft Office 2007 and later) generator for Word (docx), PowerPoint (pptx) and Excell (xlsx) in javascript. The output is a stream.
MIT License
2.66k stars 471 forks source link

When generating a new document for the second time, why open the path of the picture in the last generated document #382

Closed YaoDixing1026 closed 3 years ago

YaoDixing1026 commented 3 years ago

docxPath: \tmp\info28ee4e3e603c97fb083cbc8e0e3b6797.docx it include 2 images images path: \tmp\idBack28ee4e3e603c97fb083cbc8e0e3b6797.png \tmp\idJust28ee4e3e603c97fb083cbc8e0e3b6797.png

generate the docx successful no problem

and then I remove all old files in /tmp

new docxPath: \tmp\info79550af2603cb53e07b939b8168b458b.docx new image path include: \tmp\idBack79550af2603cb53e07b939b8168b458b.png \tmp\idJust79550af2603cb53e07b939b8168b458b.png

call method generate() with the new path

but given me this: Error: ENOENT: no such file or directory, open 'C:\tmp\idJust28ee4e3e603c97fb083cbc8e0e3b6797.png'

The image path in the new document is new. Why open the previously deleted image path?