public void saveDoc() {
        try {
//            if (this.pdfwriter != null) {
//                pdfwriter.close();
//            }
            if (document != null) {
                document.close();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }