itextsharp生成pdf后的直接打印问题
小弟这两天用itextsharp生成pdf文档,生成的pdf可以直接保存在指定路径的文件夹下,可是user不想保存,想要点一下button,就可以直接打印,我搞了半天也没找到合适的方法,还希望有做过这方面的,给些建议.多谢多谢啦
我的代码是这样的: iTextSharp.text.Rectangle page = new Rectangle(683,850);
iTextSharp.text.Document document = new iTextSharp.text.Document(page, 71, 43, 60, 28);
try
{
// and directs a PDF-stream to a file
PdfWriter.GetInstance(document, new FileStream("C:\\" + DateTime.Now.ToString("yyyyMMdd") + ".pdf", FileMode.Create));
document.Open();
//我增加的文档内容部分
}
catch (Exception e)
{
}
// close the document
document.Close();
}