1

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?

DarthRoman
  • 35
  • 1
  • 5
  • Is the generated PDF always only one page? Can you post the code you use to chain the document together assuming you are using the AddImageUrl method? – Jakkwylde Sep 21 '10 at 15:26

1 Answers1

0

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();
EpicKip
  • 4,015
  • 1
  • 20
  • 37
Dustin Brooks
  • 2,544
  • 3
  • 23
  • 33