使用 AbcPdf 截断的表

发布于 2024-09-15 05:24:25 字数 219 浏览 3 评论 0原文

我正在使用 AbcPdf 库将 aspx 页面转换为 pdf 对象。我已经实现了我的目标,但我有一个问题。 aspx页面中的数据是一组表,它们是动态的,我的意思是,它可以是2个表,也可以是30个表或其他什么。我已经实现了,当表的数量大于一页时,库会创建所需的页面,但问题是它会截断表。

问题: AbcPdf 库中是否有任何方法可以在表或对象的数量大于一页时不截断表或对象?

I'm using the AbcPdf library to transform an aspx page to a pdf object. I have achieved my goal, but I have a problem. The data in the aspx page is a set of Tables, and they are dynamic, I mean, it can be 2 tables, or 30 or whatever. I have achieved that when the number of tables is bigger than one page, the library creates the required pages, but the problem is that it truncates the table.

Question: Is there any way in the AbcPdf library to not truncate tables or objects when the number of them is bigger than one page?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

好久不见√ 2024-09-22 05:24:26

以下是效果很好的示例代码:

http://www .websupergoo.com/helppdf7net/source/4-examples/13-pagedhtml.htm

Doc theDoc = new Doc();
theDoc.Rect.Inset(72, 144);

theDoc.Page = theDoc.AddPage();
int theID;
theID = theDoc.AddImageUrl("http://www.yahoo.com/");

while (true) {
  theDoc.FrameRect(); // add a black border
  if (!theDoc.Chainable(theID))
    break;
  theDoc.Page = theDoc.AddPage();
  theID = theDoc.AddImageToChain(theID);
}

for (int i = 1; i <= theDoc.PageCount; i++) {
  theDoc.PageNumber = i;
  theDoc.Flatten();
}

theDoc.Save(Server.MapPath("pagedhtml.pdf"));
theDoc.Clear();

Here is the sample code that works great:

http://www.websupergoo.com/helppdf7net/source/4-examples/13-pagedhtml.htm

Doc theDoc = new Doc();
theDoc.Rect.Inset(72, 144);

theDoc.Page = theDoc.AddPage();
int theID;
theID = theDoc.AddImageUrl("http://www.yahoo.com/");

while (true) {
  theDoc.FrameRect(); // add a black border
  if (!theDoc.Chainable(theID))
    break;
  theDoc.Page = theDoc.AddPage();
  theID = theDoc.AddImageToChain(theID);
}

for (int i = 1; i <= theDoc.PageCount; i++) {
  theDoc.PageNumber = i;
  theDoc.Flatten();
}

theDoc.Save(Server.MapPath("pagedhtml.pdf"));
theDoc.Clear();
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文