我正在使用iTextSharp版本5.5.2.0,当我尝试加载附加的pdf示例058780-02.pdf时,我在ImageRenderInfo.GetImage()方法中得到一个异常,"PdfImageObject"没有被返回,并显示一条消息"颜色深度不支持1".有什么建议?谢谢,Abedellatif
我修复了它,修改iTextSharp源代码PdfImageObject类FindColorspace方法在222行添加
if (PdfName.CALGRAY.Equals(tyca) || PdfName.DEVICEGRAY.Equals(tyca)) {
stride = (width * bpc + 7) / 8;
pngColorType = 0;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
823 次 |
| 最近记录: |