Re:USPTO to add surcharge on non-DOCX patent applications in...
by lofatdairy on Friday August 26, 2022 @04:01PM
(#32612086)
That's exactly right. There are definitely nodejs docx templating packages (I've worked on codebases that used them in the past), but they're certainly not required provided your documents are reasonably simple.
If anything, generating a pdf from various input files/structured text has been a much harder task. We generated docx files to allow for easy modification by non-technical staff, but to generate a pdf we had to use a headless instance of libreoffice since pandoc was struggling with the rendering.
I made an xlsx exporter in actionscript3 (lol) years ago and it worked like this. What I ultimately did was made a "template" document, and my code just injected strings into key spots, zipped it up in memory and gave it to you as a file.xlsx. Probably took me 3 days?
I didn't have the benefit of libraries so I imagine this is significantly easier in less hobbled environments, nodejs or whatever probably has a kitchen sink package to do it.