开发者

Printing PDF from browser using Aspose.NET

I want to force a PDF to print from browser by clicking a link. It says here that embedding javascript using a PDF toolkit can make this possible, 开发者_如何学JAVAso would anyone know if/how this can be done with Aspose?


Found the answer, brilliantly simple and works a treat! (You can also use a stream instead of a path name in OpenPdfFile)

//create PdfViewer object
PdfViewer viewer = new PdfViewer();
//open input PDF file
viewer.OpenPdfFile(@"c:\input.pdf");
//print PDF document
viewer.PrintDocument();
//close PDF file
viewer.ClosePdfFile();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜