I Have Installed iText7 trail Version Packages to convert html file into pdf. I have succefully converted html to pdf using proper code like they(iText Software) mentioned.But still i am not clear to set the Password for created pdf. After converting html file to pdf,the pdf file should be protected with password.so please anyone help me what is the code in c# to encrypt the pdf file while converting from html.
相关问题
- Correctly parse PDF paragraphs with Python
- Set BaseUrl of an existing Pdf Document
- How do I create a multidimensional array of object
- How can I get all text from a PDF in Swift?
- Renaming named destinations in PDF files
相关文章
- itext7 pdf 只读
- Python Sendgrid send email with PDF attachment fil
- C# MVC website PDF file in stored in byte array, d
- How To Programmatically Enable/Disable 'Displa
- How to reduce PDF file size programmatically in Ja
- Can the “dynamic” type vary safely in a generic co
- Search and replace placeholder text in PDF with Py
- ITextSharp 4.1.6. PDF Table - how to remove whites
You didn't share any code (which is actually a requirement when you post a question on Stack Overflow), but I assume that you are creating a
PdfWriter
somewhere in the process. If not, check out the different variations to create a PDF from HTML. Internally, the PDF writing process is done by aPdfWriter
instance, so if you don't have aPdfWriter
instance in your code, you'll have to use a method that reaches somewhat deeper into the lower-level functionality.When you create the
PdfWriter
instance, you can defineWriterProperties
. This is explained in Chapter 7 of the Building Blocks tutorial. You have to create aPdfWriter
instance that accepts a destination (the path to the PDF that you are creating), but also aWriterProperties
instance:In this case, we use AES 256 encryption (the only encryption algorithm that will be allowed in ISO-32000-2) using a user and an owner password. We allow printing and assembly of the document.