如何使用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();