![]() ![]() Specify the open password and permission password and then set both passwords for the generated PDF using () method.Create a ToPdfParameterList object, which is used to set conversion options.Load a sample Word document using Document.LoadFromFile() method.The ToPdfParameterList parameter controls how a Word document will be converted to PDF, for example, whether to encrypt the document while conversion. To convert Word to a Password-Protected PDF, you can use the Document.SaveToFile(string fileName, ToPdfParameterList paramList) method. Private Shared Sub Main(ByVal args() As String)ĭocument.LoadFromFile("C:\Users\Administrator\Desktop\Test.docx")ĭocument.SaveToFile("ToPDF.pdf", FileFormat.PDF)Ĭonvert Word to Password-Protected PDF in C# and VB.NET
0 Comments
Leave a Reply. |