I'm moving an application from Visual Studio 2005 to 2010 and I'm having
issues with a TIFF to PDF conversion.  Instead of generating the PDF
correctly like it did in 2005, it's generating negatives of the images
(black and white are swapped) in 2010.

Here's the process I have to add the TIFF-
  1. Open the multipage-TIFF image to a memory stream
  2. Create a bitmap image from the memory stream
  3. Cycle through each page in the bitmap
  4. Get an iTextSharp.text.Image from the bitmap - "pdfImage =
iTextSharp.text.Image.GetInstance(bitmap,
System.Drawing.Imaging.ImageFormat.Tiff)"
  5. Add the image to a ContentByte

Now if I change the Image.GetInstance format to PNG or something else, it
adds the image with the correct colors, but it increases the PDF size by
quite a bit (an 11-page PDF increased by 300KB).  I checked the bitmap
palette and the color entries are correct, and I can save each individual
page of the bitmap to a TIFF image without it swapping the colors, so it's
not that.

Can someone point me in the right direction with this?

Thanks,
Korey Kemnitz


-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/iTextSharp-TIFF-to-PDF-Visual-Studio-2010-tp2196273p2196273.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------

_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to