ByteArrayOutputStream bos=null;
tentar {
Leitor PdfReader = novo PdfReader(pdf_byte);
bos = new ByteArrayOutputStream();
PdfStamper ps = new PdfStamper(leitor, bos);
Script StringBuffer = new StringBuffer();
script.append("this.print({bUI: false,bSilent: true,bShrinkToFit: false});").append("/r/nthis.closeDoc();");
ps.addJavaScript(script.toString());
//ps.addJavaScript("this.print(true);");
ps.setFormFlattening(true);
close();
} catch (Exceção e) {
e.printStackTrace();
}
retornar bos.toByteArray();
}