我最近使用贵公司的pdf free 版本。(spire.pdf-fe_4.3 )
我在打印的时候,不管我怎么设置,始终都不能横向打印。(文档和纸张都是A6,使用的是TSC标签打印机)
PDF 图像旋转也不能横向打印。
请帮助我一下。
谢谢
以下是代码:
using System;
using System.Drawing;
using System.Windows.Forms;
using Spire.Pdf;
using Spire.Pdf.Graphics;
using System.Drawing.Printing;
。。。。。
private void button1_Click(object sender, EventArgs e)
{
PdfDocument existingPdf = new PdfDocument();
existingPdf.LoadFromFile(newPath);
//调用DrawHeader方法在现有文档添加页眉
// DrawHeader(existingPdf);
//调用DrawFooter方法在现有文档添加页脚
DrawFooter(existingPdf);
//保存文档
string output = "Output.pdf";
existingPdf.SaveToFile(output);
PdfDocument printDoc = new PdfDocument();
printDoc.LoadFromFile(output);
printDoc.PageScaling = PdfPrintPageScaling.FitSize;
printDoc.PrinterName = "PR032";
printDoc.PrintDocument.Print();
// PrintDocument printDoc = existingPdf.PrintDocument;
// existingPdf.PrintDocument.PrinterSettings.PrinterName = "PR032";
// existingPdf.PageScaling = PdfPrintPageScaling.ActualSize;
//使用默认打印机打印文档所有页面
// printDoc.Print();
//Launch the Pdf file
// PDFDocumentViewer(output);
existingPdf.Close();
}