加密pdf文件和c#中的解密 [英] encryption pdf file and decryption in c#

查看:161
本文介绍了加密pdf文件和c#中的解密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i有网站我的朋友在php开发它这个网站提供pdf书籍

用户购买书籍并下载但加密

i want开发ac#windows应用程序来解密这个pdf并在我的应用程序中打开,用户可以在文件中添加注释但加密和解密pdf文件我不知道

任何人都可以帮助我

hey
i have awebsite my friend develops it in php this site offer pdf books
user purchase book and download it but encrypted
i want to develop a c# windows app to decrypt this pdf and open in my app and user can add notes on file but encryption and decryption pdf files i dono''t know
anybody can help me

推荐答案

安装Spire.PDF for .NET;然后使用下面的示例C#代码加密任何PDF文件:



Install Spire.PDF for .NET; then use the below sample C# code to encrypt any PDF files:

  static void EncryptPDF()
   {
   //Create a pdf document.
   PdfDocument doc = new PdfDocument();
   // Create one page
   PdfPageBase page = doc.Pages.Add();
   //Draw the page
   DrawPage(page);

   //encrypt
   doc.Security.KeySize = PdfEncryptionKeySize.Key128Bit;
   doc.Security.OwnerPassword = "e-iceblue";
   doc.Security.UserPassword = "test";
   doc.Security.Permissions = PdfPermissionsFlags.Print | PdfPermissionsFlags.FillFields;

   doc.SaveToFile("Encryption.pdf");
   doc.Close();

   //Launching the Pdf file.
    System.Diagnostics.Process.Start("Encryption.pdf");
}


< b>从PHP网站下载的PDF书籍

这些书籍通过加密下载或密码

i希望开发c#app成为唯一可以打开这些书的程序

和其他PDF工具不能这样做

怎么样?< ; / b>
<b>PDFs books downloaded from PHP site
these books downloaded with encryption or password
i want to develop c# app to be the only program can open these books
and other PDF tools cannot do this
how?</b>


我也在找解密根本就没有大多数都是收费的

我找到了
我也在找解密 根本就没有 大多数都是收费的
I AM FIND


这篇关于加密pdf文件和c#中的解密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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