【发布时间】:2015-04-28 05:03:27
【问题描述】:
我想在 Android 中使用 iText 将图像添加到 PDF 文件中的特定位置。这是一个可填写的表格,我添加了作为图像占位符的文本框,我想要做的是像这样获取该文本框和图像。
public class FormFill {
public static void fill(AcroFields form, Person person) throws IOException, DocumentException{
form.setField("firstname", person.getFirstName());
form.setField("lastname", person.getLastName());
form.setField("imagetextbox", "???");
}
我有这样的图像 uri
Uri imageUri = Uri.parse(person.getImagePath());
任何帮助将不胜感激。
【问题讨论】:
-
这里有一个很好的例子:stackoverflow.com/questions/8656844/…
-
Bruno 非常感谢你,但是由于某种原因我无法让该示例正常工作,我最终使用了 PdfContentByte