如何使用 DroidText
在 pdf 中添加图像我已经尝试了以下代码 -
Document document = new Document();
File f=new File(Environment.getExternalStorageDirectory(), "SimpleImages.pdf");
PdfWriter.getInstance(document,new FileOutputStream(f));
document.open();
document.add(new Paragraph("Simple Image"));
Image image =Image.getInstance("file:///mnt/sdcard/img.png");
document.add(image);
document.close();
最佳答案
解决了...
Image image =Image.getInstance("sdcard/img.png");
关于android - 在pdf android中插入图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10975668/