简体   繁体   中英

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

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?

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 .

Yes I guess the most common used library is pdf-lib . Take a look at the official page .

Try using this: http://pdfmake.org . It is the improved version of https://github.com/devongovett/pdfkit

You can set the color of the font as "white" to fade out which ever text you want. Following is a sample code, which you can try here: http://pdfmake.org/playground.html

subheader: {
            fontSize: 15,
            bold: true,
            color: "white"
        },

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.

PS: I work with Aspose as Support Developer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM