I want to add image to android PDF using iText. I want to achieve this without saving image to SDCard first. I put my image into res/drawable folder but proving the image path doesn’t work and it throws FileNotFound Exception. My path is like this:
String path = “res/drawable/myImage.png”
Image image = Image.getInstance(path);
document.add(image);
Now please suggest me a solution how I will add correct file path to getInstance(…) method. Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…