我的文档存储在我想发送带有附件的邮件的数据库中。
我想将存储的 docx 转换为 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);
}
我怎样才能转换document_content
成pdf?