views:

178

answers:

1

HI, I have a large html formatted text. I want to display the text in pages ( as in MS Word ). Is there any way to do this?

+2  A: 

Best way would be rendering it in a PDF with component (Can be ABCPdf from WebSuperGoo or other solution)

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();
Eduardo Molteni