0
是否有任何解決方案將c#圖像對象轉換爲PDF內部使用的iTextSharp兼容圖像。如何在itextSharp中使用c#圖像對象
是否有任何解決方案將c#圖像對象轉換爲PDF內部使用的iTextSharp兼容圖像。如何在itextSharp中使用c#圖像對象
是。類別iTextSharp.text.Image
有一個稱爲GetInstance()
的方法,其中有18個過載,其中3個接受System.Drawing.Image
。
iTextSharp.text.Image.GetInstance(System.Drawing.Image, iTextSharp.text.BaseColor);
iTextSharp.text.Image.GetInstance(System.Drawing.Image, iTextSharp.text.BaseColor, Bool);
iTextSharp.text.Image.GetInstance(System.Drawing.Image, System.Drawing.Imaging.ImageFormat);
在幾乎所有情況下所需的第一個並且可以只是通過null
爲第二個參數(除非要強制透明像素到一定的色差)。
歡迎來到Stack Overflow。你有沒有試圖解決你的問題?首先顯示你的努力,以便人們可以展示他們的努力請閱讀[常見問題]和[問]作爲開始.. –