我正在使用pdfContentByte将内容添加到现有的PDF中。原来在Word中创建的现有PDF文档有几个复选框。在适当的时候,我需要在复选框上覆盖一个'X'。我能做些什么来使'X'覆盖复选框。用下面的代码将'X'放在复选框下。PdfContentByte不会覆盖复选框
private static void AddField(float xpos, float ypos, string Text, PdfImportedPage page, PdfContentByte cb2, BaseFont f_cn2)
{
cb2.AddTemplate(page, 0, 0);
cb2.BeginText();
cb2.SetFontAndSize(f_cn2, 10);
cb2.ShowTextAligned(Element.ALIGN_LEFT, Text, xpos, ypos, 0F);
//cb2.SetTextMatrix(xpos, ypos); //(xPos, yPos)
//cb2.ShowText(Text);
cb2.EndText();
}
在你的标题中,你的意思是_Override_或_Overwrite_? –