Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Convert docx to pdf

$
0
0

My documents are stored in a database that I want to send mail with attachments.

I want to convert stored docx to pdf.

var result = from c in valinor.documents
                     select new
                     {
                         c.document_name,
                         c.document_size,
                         c.document_content
                     };

        var kk = result.ToList();

        for (int i = 0; i < kk.Count; i++)
        {

            MemoryStream stream = new MemoryStream(kk[i].document_content);
            Attachment attachment = new Attachment(stream, kk[i].document_name + ".pdf", "application/pdf");
            mail.Attachments.Add(attachment);

        }
How can I convert document_content to pdf?


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>