Is there an npm module to modify a pdf file in node.js?

13,336

I suggest you to try HummusPDF. Specifically take a look at the Hummus - Modification page, that explains how to edit existing PDF documents. In your case you could try to use the feature that allows to draw shapes.

Share:
13,336
H Varma
Author by

H Varma

Updated on June 16, 2022

Comments

  • H Varma
    H Varma almost 2 years

    I'm building a node.js app on Bluemix that should take a pdf file as request and then grey out (blank) some part of the pdf file. And also here the pdf file is the same for all, and the area we need to blank out will be fixed. So can anybody suggest an npm module that can perform this kind of functionality?

  • H Varma
    H Varma over 7 years
    Thanks.But I was not able to install hummus modulegyp Getting some list of errors npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build npm ERR! This is most likely a problem with the hummus package, npm ERR! not with npm itself. npm ERR! node-pre-gyp install --fallback-to-build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs hummus npm ERR! npm owner ls hummus npm ERR! There is likely additional logging output above. Can u have a look on this module and suggest me if am doing some thing wrong
  • AKX
    AKX over 3 years
    This apparently requires a (paid?) account, so it's not processing the data locally at all.
  • slebetman
    slebetman over 3 years
    @HVarma Do you have any build tools installed? Node-gyp will try to run a C++ compiler to compile C++ code. If you don't have a C++ compiler installed node-gyp will fail
  • slebetman
    slebetman over 3 years
    @HVarma See github.com/nodejs/node-gyp on how to get node to compile C++ modules on your OS
  • Tilal Ahmad
    Tilal Ahmad over 3 years
    Yes, it is paid REST API and free trial version provides 150 free credits monthly.