如何识别Aspose PDF中的页面溢出
我正在使用Aspose .NET API将HTML内容转换为PDF。 HTML内容包含具有动态数据的表,因此,如果数据是更多日期,则表将溢出到第二页。
是否有一种方法可以识别文档中的页面溢出,因为每当发生溢出时,我都希望在两者之间插入一个空页面。
代码片段:
// Creating Doc
Aspose.Pdf.Document document = new Document();
for(var contentModel in listcontentModel)
{
Page page = document.Pages.Add();
string HTMLContent = //HTMLContent -- using contentModel to build HTML;
-- Sometime page overflow happens because of huge HTML content
HtmlFragment printHtml = new HtmlFragment(text);
page.Paragraphs.Add(printHtml);
}
document.Save(filePath);
预先感谢。
I am converting a HTML content to PDF using Aspose .Net API's. HTML content contains table which has dynamic data, so if the data is more date, then the table is overflown into second page.
Is there a way to Identify the page overflown in my document, because I want insert an empty page in between, whenever an overflow happens.
Code Snippet:
// Creating Doc
Aspose.Pdf.Document document = new Document();
for(var contentModel in listcontentModel)
{
Page page = document.Pages.Add();
string HTMLContent = //HTMLContent -- using contentModel to build HTML;
-- Sometime page overflow happens because of huge HTML content
HtmlFragment printHtml = new HtmlFragment(text);
page.Paragraphs.Add(printHtml);
}
document.Save(filePath);
Thanks in Advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论