9.102 转PDF打印如果超过一页没有自动换页而是报错
在执行导出操作时,未知的异常出现。请再次尝试。{"ClassName": "System.InvalidOperationException","Message": "The height of the repeat range is greater than the height of the page.","Data": null,"InnerException": null,"HelpURL": null,"StackTraceString": " at GrapeCity.Documents.Excel.ViewModel.cn.a(ao4 A_0, Int32 A_1, Int32 A_2, Int32 A_3, Int32 A_4, Double A_5, Int32 A_6, Int32 A_7, Double A_8, Double A_9, Boolean A_10, Func`2 A_11) at GrapeCity.Documents.Excel.ViewModel.cn.a(ao4 A_0, he A_1) at GrapeCity.Documents.Excel.ViewModel.cn.b(IRange A_0) at GrapeCity.Documents.Excel.PDF.h.a(ao4 A_0, IRange A_1) at GrapeCity.Documents.Excel.PrintManager.Paginate(IRange printArea) at GrapeCity.Documents.Excel.PrintManager.Paginate(IWorksheet worksheet) at Forguncy.Server2.Controllers.ExportToExcel.<>c__DisplayClass264_0.<SavePdfStreamWithRepeats>b__0(GcExcelSheetWrapper sheetWrapper) at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.ToList() at Forguncy.Server2.Controllers.ExportToExcel.a(MemoryStream A_0) at Forguncy.Server2.Controllers.ExportToExcel.b() at Forguncy.Server2.Controllers.ExportToExcel.ExportPageAsync() at Forguncy.Server2.Controllers.HomeController.a(Object A_0)","RemoteStackTraceString": null,"RemoteStackIndex": 0,"ExceptionMethod": null,"HResult": -2146233079,"Source": "GrapeCity.Documents.Excel","WatsonBuckets": null}CurrentMethodName: ExportToExcelThread检查下这个设置
如果顶端标题行需要的高度太太大,会导致这个问题。
可以改小一点 感谢大佬的支持,您那边检查一下打印标题设置的区域是不是打印纸张的高度了。
如果不能解决您的问题,建议您那边提供一个可以复现问题的 Demo,这边调查一下。
页:
[1]