views:

197

answers:

4

The company I work for we have a CBT system we have developed. We have to go through and create books out of the content that is in our system, I have developed a program that goes through and downloads all of the content out of our system and creates a offline version of the different training modules.

I created a program that creates PDF documents using the offline version of the CBT. It works by using Websites Screenshot to create a screen shot of the different pages and then using iTextSharp it creates a PDF Document from those images.

It seams to be a memory hug and painfully slow. There are 40 CBT Modules that it needs to turn into books. Even though I take every step to clear the memory after each time it creates a book. After about 2 books it crashes because there is no memory left.

Is there a better way to do this instead of having to take a screen shot of the pages that will yield the same look of the web page inside the pdf document?

A: 

PrinceXML is commercial software that generates pdf from websites, but their site seems to be down for the moment.

Egil
+2  A: 

I have searched and demoed and found that ABCPdf from WebSuperGoo is the best product for .NET. It is the most accurate and doesn't require a printer driver. It uses IE as the rendering engine, so it looks almost exactly like what you get in IE.

Brian Genisio
+1  A: 

I've used PDFSharp in the past and have had good success in generating PDF's.

It's open source as well, so in the event of troubles like you've mentioned, you're able to hunt and peck to increase performance.

Gavin Miller
A: 

If you control the source it is probably not too difficult to generate pdf directly instead of through a screenshot.

Did you try unloading the dll?

There are also different ways of getting screenshots:

http://mashable.com/2007/08/24/web-screenshots/

Stephan Eggermont