这个示例项目演示了如何将许多不同的 告导出到一个大的 PDF 文件,并创建一个包含大量 告副本的 PDF 文件。
这个示例项目演示了如何将许多不同的 告导出到一个大的 PDF 文件,并创建一个包含大量 告副本的 PDF 文件。例如,创建一个渲染 告并将其添加到输出 PDF 文件中 1000 次。创建新的 告对象并启用必要的选项:
private void buttonExportClick(object sender, EventArgs e){var report = new StiReport();report.ReportCacheMode = StiReportCacheMode.On;report.RenderedPages.CanUseCacheMode = true;report.RenderedPages.CacheMode = true;report.RenderedPages.Clear();...
然后,将渲染的 告添加 1000 次:
...var tempReport = new StiReport();for (int index = 0; index < 1000; index++){using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("ExportManyFilesToOneBigPDF.MasterDetail.mdc")){tempReport.LoadDocument(stream);}tempReport.ReportUnit = report.ReportUnit;foreach (StiPage page in tempReport.RenderedPages){page.Report = tempReport;page.Guid = System.Guid.NewGuid().ToString().Replace("-", "");report.RenderedPages.Add(page);}}...
最后,导出 告:
...report.ExportDocument(StiExportFormat.Pdf, "d:\1.pdf");}
在下面的屏幕截图中,您可以看到示例代码的结果:

Aspose、E-iceblue、FastReport、Stimulsoft等文档/ 表图表类开发工具享超低折扣,如有需要可直接联系在线客服。
标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!