简体   繁体   English

如何使用PDFsharp创建具有多个页面的PagePreview?

[英]How to create PagePreview with more than one page using PDFsharp?

I am using PDFsharp to create PDF files in my C# application. 我正在使用PDFsharp在C#应用程序中创建PDF文件。 It's working very good, but I did not find out how to create preview with more than one page. 它的工作情况非常好,但是我没有找到如何创建一页以上预览的方法。 I have no trouble creating and saving documents with multiple pages, also embedding PagePreview into my Form is working. 我可以轻松创建和保存具有多个页面的文档,也可以将PagePreview嵌入到我的表单中。

But how do I display (and draw on) more than one page in the Preview? 但是, 如何在“预览”中显示 (并绘制) 多个页面

Is there a way to pass another XGraphics object to associated RenderEvent function (that would be created from second page in document ( XGraphics.FromPdfPage(...) ))? 有没有一种方法可以将另一个XGraphics对象传递给相关的RenderEvent函数(该函数将从文档( XGraphics.FromPdfPage(...) )的第二页创建?

The RenderEvent must know which page to render. RenderEvent必须知道要渲染哪个页面。 Your application must know how many pages there are and which page is the current page. 您的应用程序必须知道有多少页以及当前页面是哪一页。

We are using MigraDoc to create PDF files and the preview handles multiple pages automatically. 我们正在使用MigraDoc创建PDF文件,并且预览会自动处理多个页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM