gpt4 book ai didi

c# - 使用 iTextSharp 为 PDF 中的图像添加透明度/不透明度

转载 作者:行者123 更新时间:2023-12-02 05:17:47 25 4
gpt4 key购买 nike

我需要设置图像的不透明度并使用 iTextSharp 将其添加到 PDF。我看过 http://itextpdf.com/examples/但找不到这样做的任何工作示例。

任何人都可以帮助我或指导我找到正确的资源。

最佳答案

//create new graphics state and assign opacity    
PdfGState graphicsState = new PdfGState();
graphicsState.FillOpacity = 0.2F; // (or whatever)
//set graphics state to pdfcontentbyte
pdfData.SetGState(graphicsState);

关于c# - 使用 iTextSharp 为 PDF 中的图像添加透明度/不透明度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14363046/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com