Image auto resizes in PdfPCell with iTextSharp

后端 未结 5 1381
南笙
南笙 2021-02-20 10:34

I\'m having a weird problem with images in iTextSharp library. I\'m adding the image to the PdfPCell and for some reason it gets scaled up. How do i keep it to original size?

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-20 11:00

    For those asking for the overload, use this :

    var imageCell = new PdfPCell(image, true);
    

    instead of :

    cell.AddElement(image,true);
    

提交回复
热议问题