Skip to content

Instantly share code, notes, and snippets.

@HashRaygoza
Created August 28, 2020 16:14
Show Gist options
  • Save HashRaygoza/52325e74378338975c96a64ddaa2ac12 to your computer and use it in GitHub Desktop.
Save HashRaygoza/52325e74378338975c96a64ddaa2ac12 to your computer and use it in GitHub Desktop.
crearDocumento.java
private Document crearDocumento(PdfDocument pdfDoc) throws IOException {
Rectangle rectangle3x5 = new Rectangle(216, 360);
PageSize pagesize3x5 = new PageSize(rectangle3x5);
Document documento = new Document(pdfDoc, pagesize3x5);
documento.setLeftMargin(10.0f);
documento.setRightMargin(10.0f);
PdfFont fuente = PdfFontFactory.createFont(StandardFonts.COURIER_BOLD);
documento.setFont(fuente);
documento.setFontSize(9f);
return documento;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment