I am developing a program in which i must create pdf file inside application.
This is the code that i use for creating pdf file but an error occurred that say
"/Image.pdf:open failed:EROFS(read-only file system)"
This is my button click code:
Document document = new Document();
PdfWriter.getInstance(document,new FileOutputStream("Image.pdf"));
document.open();
Image image1 = Image.getInstance("watermark.png");
document.add(image1);
String imageUrl = "http://jenkov.com/images/20081123-20081123-3E1W7902-small-portrait.jpg";
Image image2 = Image.getInstance(new URL(imageUrl));
document.add(image2);
document.close();