I am using iTextSharp version 5.5.2.0 and when trying to load the attached pdf sample 058780-02.pdf I get an exception in the ImageRenderInfo.GetImage() method the "PdfImageObject" is not returned and with a message saying "The color depth 1 is not supported". Any suggestions? Thanks, Abedellatif
i fixed it, modify the iTextSharp source code PdfImageObject
class FindColorspace
method at 222 line add
if (PdfName.CALGRAY.Equals(tyca) || PdfName.DEVICEGRAY.Equals(tyca)) {
stride = (width * bpc + 7) / 8;
pngColorType = 0;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With