生成只读pdf [英] Generate read-only pdf

查看:191
本文介绍了生成只读pdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我使用wkhtmltopdf exe文件生成了一个pdf文件 并且它已成功创建,但我的客户端请求应该创建pdf为只读(复制和粘贴权限应该是限制)。我没有得到适当的解决方案,任何帮助我们而不是
使用html来映像和图像到pdf。我可以将pdf严格模式限制为写入权限吗?



这是我的代码:


  ; var generator = new PdfGenerator.HtmlToPdf();
$
var myHtml ='< html>< head>< / head>< body>< p> Lorem lipsum klfdksfjsdjf< / p>< / body>< / html>';

var pdfByte = generator.GeneratePdf(guideline);

File.WriteAllBytes( FileName,pdfByte); 


紧急,请帮助我们解决问题。



<谢谢&问候


Ramesh Tigapuram



解决方案

您好,


如果您从产品中赚钱,我建议您查看
Gembox PDF
Aspose PDF 。还有
iTextSharp


我使用了所有两个这些库(但没有做过只读)可以说Apose PDF价格昂贵,但值得每一分钱。还没有尝试过Gembox PDF,如果它像Gembox Spreadsheet库那样它也必须非常棒。 iTextSharp,来自
我记得在没有花费大量时间投入学习图书馆的情况下工作并不容易。


Hi I have generated a pdf file using wkhtmltopdf exe file  and it is successfully created, but my client request is should created pdf a read - only (Copy and paste permissions should be restrict ). I did not get proper solution,and any help us instead of using html to image and image to pdf. Can I restrict the pdf strict mode to write permission?

Here is my code:

 var generator = new PdfGenerator.HtmlToPdf();
var myHtml = '<html><head></head><body><p> Lorem lipsum klfdksfjsdjf </p></body></html>';
var pdfByte = generator.GeneratePdf(guideline);
File.WriteAllBytes(FileName, pdfByte); 

It is urgent, please help us to solve the solution.

thanks & Regards

Ramesh Tigapuram

解决方案

Hello,

If you are making money off your product I would suggest looking at Gembox PDF or Aspose PDF. There is also iTextSharp.

I have used all two of these libraries (but have not done read-only) and can say that Apose PDF is expensive but worth every penny. Have not tried Gembox PDF yet if it's anything like Gembox Spreadsheet library it's got to be awesome too. iTextSharp, from what I remember it was not easy to work with without a decent amount of time invested in learning the library.


这篇关于生成只读pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆