英文:
PdfTron printing multiple copies not work correctly
问题
在使用pdftron sdk打印多份副本时,遇到以下情况,
- 文档页数为奇数
- 打印2份副本
- 双面打印
文档没有正确分隔。也就是说,第二份文档的第一页打印在第一份文档的纸张的另一面。
打印模式设置如下:
public static PrinterMode GetPdfPrint(PrinterInformation printerInformation, PrintQueue printQueue, int numberofCopies)
{
PrinterMode printerMode = new PrinterMode();
printerMode.SetDuplexing(PrinterMode.DuplexMode.e_Duplex_Auto);
printerMode.SetCollation(true);
printerMode.SetAutoRotate(true);
printerMode.SetCopyCount(numberofCopies);
printerMode.SetScaleType(PrinterMode.ScaleType.e_ScaleType_FitToOutputPage);
printerMode.SetAutoCenter(true);
return printerMode;
}
有人能帮助我让第二份副本从新的纸张开始吗?
英文:
When printing multiple copies with pdftron sdk with following circumstances,
- document having odd number of pages
- printing 2 copies
- double sided printing
The documents not separate correctly. That is, 1st page of 2nd document printed on other side of the sheet of 1st document.
Print mode is set as follows,
public static PrinterMode GetPdfPrint(PrinterInformation printerInformation, PrintQueue printQueue, int numberofCopies)
{
PrinterMode printerMode = new PrinterMode();
printerMode.SetDuplexing(PrinterMode.DuplexMode.e_Duplex_Auto);
printerMode.SetCollation(true);
printerMode.SetAutoRotate(true);
printerMode.SetCopyCount(numberofCopies);
printerMode.SetScaleType(PrinterMode.ScaleType.e_ScaleType_FitToOutputPage);
printerMode.SetAutoCenter(true);
return printerMode;
}
can someone help me to get the second copy starts from new sheet?
答案1
得分: 0
我无法找到pdftron方面的解决方案,所以采用了手动逻辑来解决这个问题。
{
Page blankPage = pdfdoc.PageCreate();
pdfdoc.PagePushBack(blankPage);
}
pdfdoc.InitSecurityHandler();
Print.StartPrintJob(pdfdoc, printQueue.FullName, documentName, string.Empty, new PageSet(1, pdfdoc.GetPageCount(), PageSet.Filter.e_all), printerMode, null);
英文:
I was not able find a solution by pdftron side to the question so, went with a manual logic to address the question.
if(pdfdoc.GetPageCount()%2 != 0 && numberofCopies > 1 && printDuplex != Duplex.Simplex)
{
Page blankPage = pdfdoc.PageCreate();
pdfdoc.PagePushBack(blankPage);
}
pdfdoc.InitSecurityHandler();
Print.StartPrintJob(pdfdoc, printQueue.FullName, documentName,string.Empty, new PageSet(1, pdfdoc.GetPageCount(), PageSet.Filter.e_all), printerMode, null);
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论