[Html2PdfConverter] [Html to PDF] How to create encrypted PDF

[Html2PdfConverter] [Html to PDF] How to create encrypted PDF

  
Forge Component
(42)
Published on 23 Jun (6 days ago) by Guilherme Pereira
42 votes
Published on 23 Jun (6 days ago) by Guilherme Pereira
Is it possible to create a PDF with a password to send secure via email ?
Hm... already found the answer myself ... not possible with the wkhtmktopdf engine
Found this tool http://www.pdflabs.com/tools/pdftk-server/ ... maybe it's possible to integrate it
HI there
Of course you can .Here is the code:
using RasterEdge.Imaging.Basic;
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Basic.Codec;
using RasterEdge.Imaging.PDF;


namespace RE__Test
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        public static string FolderName = "c:/";

        private void button1_Click(object sender, EventArgs e)
        {
            string fileName = FolderName + "SampleNew.pdf";

            PDFDocument pdf = new create PDF Document(5);

            REFile.SaveDocumentFile(pdf, fileName, new PDFEncoder());//save new pdf

        }