I have a JFrame, which i wish to save as a PDF. How do i paint this JFrame using iText?
public PrintFrameToPDF(JFrame bill) {
try {
Document d = new Document();
PdfWriter writer = PdfWriter.getInstance(d, new FileOutputStream ("sample.pdf"));
d.open ();
// HOW ?
d.close ();
}
catch(Exception e) {
//
}
}