国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

PDF控件Spire.PDF for .NET【安全】演示:更改 PDF 文檔的安全權(quán)限

這篇具有很好參考價(jià)值的文章主要介紹了PDF控件Spire.PDF for .NET【安全】演示:更改 PDF 文檔的安全權(quán)限。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

當(dāng)您使用密碼保護(hù) PDF 文檔時(shí),您可以選擇指定一組權(quán)限。權(quán)限決定用戶如何與文件交互。例如,您可以對(duì)文檔應(yīng)用權(quán)限以禁止用戶打印或使用剪切和粘貼操作。本文演示如何在C# 和 VB.NET中使用Spire.PDF for .NET更改 PDF 文檔的安全權(quán)限。

Spire.PDF for .NET?是一款獨(dú)立 PDF 控件,用于 .NET 程序中創(chuàng)建、編輯和操作 PDF 文檔。使用 Spire.PDF 類庫(kù),開(kāi)發(fā)人員可以新建一個(gè) PDF 文檔或者對(duì)現(xiàn)有的 PDF 文檔進(jìn)行處理,且無(wú)需安裝 Adobe Acrobat。

E-iceblue?功能類庫(kù)Spire 系列文檔處理組件均由中國(guó)本土團(tuán)隊(duì)研發(fā),不依賴第三方軟件,不受其他國(guó)家的技術(shù)或法律法規(guī)限制,同時(shí)適配國(guó)產(chǎn)操作系統(tǒng)如中科方德、中標(biāo)麒麟等,兼容國(guó)產(chǎn)文檔處理軟件 WPS(如 .wps/.et/.dps 等格式

Spire.PDF for.net下載? ?Spire.PDF for java下載

安裝適用于 .NET 的 Spire.PDF

首先,您需要將 Spire.PDF for .NET 包中包含的 DLL 文件添加為 .NET 項(xiàng)目中的引用。DLL 文件可以從此鏈接下載或通過(guò)NuGet安裝。

PM> Install-Package Spire.PDF
更改 PDF 文檔的安全權(quán)限

以下是使用 Spire.PDF for .NET 將安全權(quán)限應(yīng)用于 PDF 文檔的步驟。

  • 創(chuàng)建一個(gè)PdfDocument對(duì)象。
  • 使用PdfDocument.LoadFileFile()方法加載示例 PDF 文件。
  • 指定打開(kāi)密碼和權(quán)限密碼。打開(kāi)密碼可以設(shè)置為空,這樣生成的文檔就不需要密碼打開(kāi)。
  • 使用打開(kāi)密碼和權(quán)限密碼對(duì)文檔進(jìn)行加密,并使用PdfDocument.Security.Encypt()方法設(shè)置安全權(quán)限。該方法以PdfPermissionsFlags枚舉作為參數(shù),定義用戶對(duì)加密文檔的訪問(wèn)權(quán)限。
  • 使用PdfDocument.SaveToFile()方法將文檔保存到另一個(gè) PDF 文件。

【C#】

using Spire.Pdf;
using Spire.Pdf.Security;

namespace ChangeSecurityPermission
{
class Program
{
static void Main(string[] args)
{
//Create a PdfDocument object
PdfDocument doc = new PdfDocument();

//Load a sample PDF file
doc.LoadFromFile(@"C:\Users\Administrator\Desktop\sample.pdf");

//Specify open password
string openPsd = string.Empty;

//Specify permission password
string permissionPsd = "e-iceblue";

//Encrypt the document with open password and permission password, and set the permissions and encryption key size
doc.Security.Encrypt(openPsd, permissionPsd, PdfPermissionsFlags.FullQualityPrint, PdfEncryptionKeySize.Key128Bit);

//Save the document to another PDF file
doc.SaveToFile("SecurityPermissions.pdf");
}
}
}

【VB.NET】

using Spire.Pdf;
using Spire.Pdf.Security;

namespace ChangeSecurityPermission
{
class Program
{
static void Main(string[] args)
{
//Create a PdfDocument object
PdfDocument doc = new PdfDocument();

//Load a sample PDF file
doc.LoadFromFile(@"C:\Users\Administrator\Desktop\sample.pdf");

//Specify open password
string openPsd = string.Empty;

//Specify permission password
string permissionPsd = "e-iceblue";

//Encrypt the document with open password and permission password, and set the permissions and encryption key size
doc.Security.Encrypt(openPsd, permissionPsd, PdfPermissionsFlags.FullQualityPrint, PdfEncryptionKeySize.Key128Bit);

//Save the document to another PDF file
doc.SaveToFile("SecurityPermissions.pdf");
}
}
}

PDF控件Spire.PDF for .NET【安全】演示:更改 PDF 文檔的安全權(quán)限,Spire.PDF for .Net 教程,pdf,.net,安全

以上便是如何使更改 PDF 文檔的安全權(quán)限,如果您有其他問(wèn)題也可以繼續(xù)瀏覽本系列文章,獲取相關(guān)教程~文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-804364.html

到了這里,關(guān)于PDF控件Spire.PDF for .NET【安全】演示:更改 PDF 文檔的安全權(quán)限的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • PDF控件Spire.PDF for .NET【安全】演示:使用時(shí)間戳服務(wù)器對(duì) PDF 進(jìn)行數(shù)字簽名

    PDF控件Spire.PDF for .NET【安全】演示:使用時(shí)間戳服務(wù)器對(duì) PDF 進(jìn)行數(shù)字簽名

    Spire.PDF for .NET?是一款獨(dú)立 PDF 控件,用于 .NET 程序中創(chuàng)建、編輯和操作 PDF 文檔。使用 Spire.PDF 類庫(kù),開(kāi)發(fā)人員可以新建一個(gè) PDF 文檔或者對(duì)現(xiàn)有的 PDF 文檔進(jìn)行處理,且無(wú)需安裝 Adobe Acrobat。 E-iceblue?功能類庫(kù)Spire 系列文檔處理組件均由中國(guó)本土團(tuán)隊(duì)研發(fā),不依賴第三方軟件

    2024年04月10日
    瀏覽(24)
  • Spire.PDF for .NET【文檔操作】演示:合并 PDF 文件并添加頁(yè)碼

    Spire.PDF for .NET【文檔操作】演示:合并 PDF 文件并添加頁(yè)碼

    需要合并 PDF 的原因有很多。例如,合并 PDF 文件允許您打印單個(gè)文件,而不是為打印機(jī)排隊(duì)多個(gè)文檔,組合相關(guān)文件通過(guò)減少要搜索和組織的文件數(shù)量來(lái)簡(jiǎn)化管理和存儲(chǔ)多個(gè)文檔的過(guò)程。在本文中,您將學(xué)習(xí)如何使用Spire.PDF for .NET將多個(gè) PDF 文檔合并為一個(gè) PDF 文檔,以及如

    2024年04月09日
    瀏覽(26)
  • Spire.PDF for .NET【文檔操作】演示:動(dòng)態(tài)創(chuàng)建 PDF 并將其發(fā)送到客戶端瀏覽器

    Spire.PDF for .NET【文檔操作】演示:動(dòng)態(tài)創(chuàng)建 PDF 并將其發(fā)送到客戶端瀏覽器

    可移植文檔格式 (PDF) 是 Adobe 制定的獨(dú)立規(guī)范的固定版式文檔。它封裝了完整的描述,包括文本字體、圖形和顯示它所需的其他信息。 Spire.PDF for .NET?是一款獨(dú)立 PDF 控件,用于 .NET 程序中創(chuàng)建、編輯和操作 PDF 文檔。使用 Spire.PDF 類庫(kù),開(kāi)發(fā)人員可以新建一個(gè) PDF 文檔或者對(duì)現(xiàn)

    2024年04月25日
    瀏覽(27)
  • Spire.PDF for .NET 9.8.5 Crack

    Spire.PDF for .NET 9.8.5 Crack

    Spire.PDF for .NET is a professional PDF API applied to creating, writing, editing, handling and reading PDF files without any external dependencies within .NET ( C#, VB.NET, ASP.NET, .NET Core, .NET 5.0, .NET 6.0, .NET 7.0, MonoAndroid and Xamarin.iOS ) application. Using this .NET PDF library, you can implement rich capabilities to create PDF files from sc

    2024年02月10日
    瀏覽(70)
  • PDF處理控件aspose.PDF功能演示:使用 C# .NET 復(fù)制 PDF 頁(yè)面

    PDF處理控件aspose.PDF功能演示:使用 C# .NET 復(fù)制 PDF 頁(yè)面

    作為程序員,您通常必須以純文本形式從 PDF 文件中提取內(nèi)容以進(jìn)行進(jìn)一步處理,例如分析和信息提取。如果沒(méi)有合適的工具,處理 PDF 文件并將整個(gè) PDF 轉(zhuǎn)換為 TXT 格式是一項(xiàng)麻煩的任務(wù)。因此,在本博客中,我們將探討如何使用 C# 以編程方式將 PDF 文件轉(zhuǎn)換為 TXT 格式。 A

    2024年01月23日
    瀏覽(19)
  • Word控件Spire.Doc 【列表】教程:在 Word 文檔中插入列表

    Word控件Spire.Doc 【列表】教程:在 Word 文檔中插入列表

    Spire.Doc for .NET是一款專門對(duì) Word 文檔進(jìn)行操作的 .NET 類庫(kù)。在于幫助開(kāi)發(fā)人員無(wú)需安裝 Microsoft Word情況下,輕松快捷高效地創(chuàng)建、編輯、轉(zhuǎn)換和打印 Microsoft Word 文檔。擁有近10年專業(yè)開(kāi)發(fā)經(jīng)驗(yàn)Spire系列辦公文檔開(kāi)發(fā)工具,專注于創(chuàng)建、編輯、轉(zhuǎn)換和打印Word/PDF/Excel等格式文件處

    2024年02月06日
    瀏覽(15)
  • Spire.Barcode for Java 5.1.0 + Spire.Barcode for .NET 7.2.0

    Spire.Barcode for Java 5.1.0 + Spire.Barcode for .NET 7.2.0

    Spire.Barcode for Java is a professional barcode component specially designed for developers to generate, read and scan 1D 2D barcodes on Java applications (J2SE and J2EE). Developers and programmers can use Spire.Barcode to add Enterprise-Level barcode formats to their Java applications quickly and easily. Spire.Barcode for Java provides a very easy way to

    2024年02月16日
    瀏覽(47)
  • Spire.Office for.NET Crack

    Spire.Office for.NET Crack

    Spire.Office for.NET是E-iceblue提供的企業(yè)級(jí)Office.NET API的組合。它包括Spire.Doc、Spire.XLS、Spire.Seadsheet、Spire.Presentation、Spire_PDF、Spire.DataExport、SpireOfficeViewer、Spire-PDFViewer、Spire.DocViewer、Spire.Barcode和Spire.Email.Spire.Office包含上述.NET API的最新版本。 使用Spire.Officefor.NET,開(kāi)發(fā)人員可以創(chuàng)

    2024年02月15日
    瀏覽(25)
  • Spire.Office for .NET 8.4.1 FIX

    Spire.Office for .NET 8.4.1 FIX

    Spire.Office for .NET is a combination of Enterprise-Level Office .NET API offered by E-iceblue. It includes Spire.Doc, Spire.XLS, Spire.Spreadsheet, Spire.Presentation, Spire.PDF, Spire.DataExport, Spire.OfficeViewer, Spire.PDFViewer, Spire.DocViewer, Spire.Barcode and Spire.Email. Spire.Office contains the most up-to-date versions of the above .NET API. ?

    2024年02月02日
    瀏覽(30)
  • Spire.Office 8.5.3 for .NET 哪里值得更新?

    Spire.Office 8.5.3 for .NET 哪里值得更新?

    Spire.Office for .NET is a combination of Enterprise-Level Office .NET API offered by E-iceblue. It includes Spire.Doc, Spire.XLS, Spire.Spreadsheet, Spire.Presentation, Spire.PDF, Spire.DataExport, Spire.OfficeViewer, Spire.PDFViewer, Spire.DocViewer, Spire.Barcode and Spire.Email. Spire.Office contains the most up-to-date versions of the above .NET API. Wi

    2024年02月06日
    瀏覽(21)

覺(jué)得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包