有一个边界显示iframe,我无法摆脱它.
IE 6和7可以通过一点JavaScript工作:
function test(){
var iframe = document.getElementById('frame2');
iframe.contentWindow.document.body.style.backgroundColor = "#a31d1d";
iframe.contentWindow.document.body.style.border = "#a31d1d";
iframe.contentWindow.document.body.style.outlineColor = "#a31d1d";
}
Run Code Online (Sandbox Code Playgroud)
但是在IE 8中边界仍然可见.
我正在尝试使用 itextsharp 添加图像,但没有任何运气,有大量的教程可以将图像添加到新的 pdf 文档,但不是现有的 pdf,因此 .add 方法不可用
我正在尝试使用压模写入方法添加图像,但没有出现任何错误,但没有显示图像
PdfReader reader = new PdfReader(pdfIn); //get pdf
if (File.Exists(pdfOut)) File.Delete(pdfOut); //reset
FileStream fs = new FileStream(pdfOut, FileMode.Create);
PdfStamper stamper = new PdfStamper(reader, fs);
try
{
// Convert base64string to bytes array
Byte[] bytes = Convert.FromBase64String(base64decode);
iTextSharp.text.Image sigimage = iTextSharp.text.Image.GetInstance(bytes);//
sigimage.SetAbsolutePosition(10, 10);
sigimage.ScaleToFit(140f, 120f);
stamper.Writer.Add(sigimage);
}catch (DocumentException dex){//log exception here
}catch (IOException ioex){//log exception here
}
AcroFields fields = stamper.AcroFields;
//repeat for each pdf form fill field
fields.SetField("agencyName", name.Value);
stamper.FormFlattening = true; …Run Code Online (Sandbox Code Playgroud)