Tables truncated with AbcPdf
I'm using the AbcPdf library to transform an aspx page to a pdf o开发者_StackOverflow中文版bject. 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?
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();
精彩评论