打印时添加了 HiQPdf 评估标签



我有一个使用HiQPdf从文件打印PDF的c# dll。问题是打印的PDF在左上角添加了一个字符串,上面写着"HiQPdf评估"。马里金也大大增加,使图像更小。

当我打开 pdf 并从那里打印时,它很好。我在添加的字符串上找不到任何内容,所以希望这里有人可以:)

法典:

public void PrintFromFile(string fileName, System.Drawing.Printing.PrinterSettings printerSettings)
{
var imagePrinter = new PdfPrinter();
imagePrinter.PrinterSettings.Copies = printerSettings.Copies;
imagePrinter.PrinterSettings.Duplex = printerSettings.Duplex;
imagePrinter.PrinterSettings.FromPage = printerSettings.FromPage;
imagePrinter.PrinterSettings.MaximumPage = printerSettings.MaximumPage;
imagePrinter.PrinterSettings.MinimumPage = printerSettings.MinimumPage;
imagePrinter.PrinterSettings.PrinterName = printerSettings.PrinterName;
imagePrinter.PrinterSettings.PrintFileName = printerSettings.PrintFileName;
imagePrinter.PrinterSettings.PrintRange = printerSettings.PrintRange;
imagePrinter.PrinterSettings.PrintToFile = printerSettings.PrintToFile;
imagePrinter.PrinterSettings.ToPage = printerSettings.ToPage;
imagePrinter.PrinterSettings.Collate = printerSettings.Collate;
var pdf = new MemoryStream(System.IO.File.ReadAllBytes("V:\AccW2\" + fileName));
pdf.Position = 0;
imagePrinter.PrintPdf(pdf);
}

如果你的 PrintPdf 函数中有 HtmlToPdf 元素,你应该设置你的序列号

private void PrintPdf(string htmlbody, string pdfname)
{
HtmlToPdf htmlToPdfConverter = new HtmlToPdf();
// set a demo serial number
htmlToPdfConverter.SerialNumber = "-- HiQPdf Serial Number --";
}

相关内容

  • 没有找到相关文章

最新更新