c# - NReco PdfGenerator disable selection -


i want disable selection, image, if contain text.

i know pdf contain layers, dont find remove text layer.

thanks.

        var htmltopdf = new nreco.pdfgenerator.htmltopdfconverter();         htmltopdf.size = nreco.pdfgenerator.pagesize.letter;          htmltopdf.margins = new nreco.pdfgenerator.pagemargins()         {             bottom = 0,             top = 0,             left = 0,             right = 0         };         string id = "test";         response.contenttype = "application/pdf";          response.appendheader("content-disposition", string.format("inline;filename=\"{0}.pdf\"", id));          htmltopdf.generatepdffromfile("page.aspx", null, response.outputstream);          response.end(); 

pdfgenerator internally uses wkhtmltopdf , renders text content text blocks , selectable default; behavior cannot changed. if want guarantee text cannot selected should rendered image (= can render html image first, , produce pdf contains image).

another alternative encryption of produced pdf itextsharp, see answer lock pdf against editing using itextsharp - pdfwriter.allow_printing option (lgpl version 4.1.6 of itextsharp can used purpose).


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -