Document document = new Document();
PdfWriter.getInstance(document, new FileOutputStream("test.pdf"));
document.open();
Font font = FontFactory.getFont(FontFactory.COURIER, 16, BaseColor.BLACK);
Chunk chunk = new Chunk("Hello World", font);
document.add(chunk);
document.close();
This generates test.pdf
on root folder of my project. Now I need a java.net.URL
of that file. How can I get that?