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?
Asked
Active
Viewed 1.8k times
3 Answers
5
Yes I guess the most common used library is pdf-lib. Take a look at the official page.

Diego
- 449
- 1
- 6
- 16
1
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.

Umberto Manganiello
- 3,213
- 9
- 16
-
1Thanks.But I was not able to install hummus modulegyp Getting some list of errors npm ERR! hummus@1.0.60 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 – H Varma Sep 07 '16 at 17:52
-
@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 Aug 24 '20 at 07:14
-
@HVarma See https://github.com/nodejs/node-gyp on how to get node to compile C++ modules on your OS – slebetman Aug 24 '20 at 07:16
-4
Please try Aspose.PDF Cloud SDK for Node.js available at GitHub and npm. It provides API methods for a wide range of document processing operations; including creation, manipulation, conversion and rendering of Pdf documents in the cloud. You can use Redaction Annotation to grey out the required PDF area.
P.S: I work with Aspose as Support Developer

Tilal Ahmad
- 940
- 5
- 9
-
This apparently requires a (paid?) account, so it's not processing the data locally at all. – AKX Aug 24 '20 at 07:13
-
Yes, it is paid REST API and free trial version provides 150 free credits monthly. – Tilal Ahmad Aug 24 '20 at 12:59