我使用AbcPdf库将aspx页面转换为pdf对象。我已经实现了我的目标,但我有一个问题。aspx页面中的数据是一组表,它们是动态的,我的意思是,它可以是2个表,或者30个或其他什么。我已经实现了,当表的数量大于一页时,库会创建所需的页面,但问题是它会截断表。
问题:当表或对象的数量大于一页时,AbcPdf库中是否存在不截断表或对象的方法?
发布于 2011-04-05 13:32:44
下面是工作良好的示例代码:
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();https://stackoverflow.com/questions/3547010
复制相似问题