private void button2_Click(object sender, EventArgs e){

    Spire.Pdf.PdfDocument pdfdocument = new Spire.Pdf.PdfDocument();
    pdfdocument.LoadFromFile(url);//文件路径地址
 
                        实现预览
           窗体上拉一个 PrintPreviewControl  控件
            doc.Preview(PrintPreviewControl);
        

     如需打印继续执行以下方法
    pdfdocument.PrintSettings.PrinterName = 打印机;//打印机名字
    pdfdocument.PrintSettings.Copies = 1;//指定打印的次数
    pdfdocument.PrintSettings.Collate = true; //是否被整理
    pdfdocument.PrintSettings.SetPaperMargins(0,0,0,0);
    pdfdocument.PrintSettings.PaperSize = new PaperSize("Letter", 3000, 1500);//纸张的大小
    pdfdocument.Print();
    pdfdocument.Dispose()

    }


相关文章:

  • 2021-12-12
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案