views:

196

answers:

2

I have around 10 System.Drawing.Bitmap elements, which I want to dump to PDF. When combining them to a single bitmap, and then writing this to PNG, this takes me about 150 ms.

Now I want to create a PDF out of my bitmaps (4 pages), but with PDFSharp this takes >2.5 seconds. Is there any library that is (way) faster at doing this?

NB. I draw the images on the surface in PDFSharp like:

 XGraphics gfx = XGraphics.FromPdfPage(page1);
 gfx.DrawImage(XImage.FromGdiPlusImage(/*bitmap*/));

edit Don't care about paid/free

+1  A: 

Try ITextSharp. Very easy to use and learn.

ZokiManas
+1 and there's a great book on it too which you should get (though there are plenty net based resources too)
Ruben Bartelink
I don't care about ease, just about performance.
Jan Jongboom
I'm using it for PDF creation in two cases: HTML to PDF and image placing in PDF. So far... rocket fast, i'm totally satisfied with the performance. Generated PDF are > 5 pages.
ZokiManas
Additional info:http://itextsharp.sourceforge.net/tutorial/ch06.html
ZokiManas
A: 

I haven't tried it (performance-wise or other..), but aspose has a pdf component which comes with a trial-version.

Nils