ByteArrayOutputStream bos=null;
mencoba {
Pembaca PdfReader = PdfReader baru(pdf_byte);
bos = new ByteArrayOutputStream();
PdfStamper ps = PdfStamper baru(pembaca, bos);
Skrip StringBuffer = StringBuffer baru();
script.append("this.print({bUI: false,bSilent: true,bShrinkToFit: false});").append("/r/nthis.closeDoc();");
ps.addJavaScript(script.toString());
//ps.addJavaScript("ini.cetak(benar);");
ps.setFormFlattening(benar);
ps.tutup();
} tangkapan (Pengecualian e) {
e.printStackTrace();
}
kembalikan bos.toByteArray();
}