Hello,
here are code snippets we use, i hope it helps:
20190110_Customer_12345.pdf (3.3 MB)
Document pdfDocument = new Document();
Page pdfPage = pdfDocument.getPages().add();
//Here, content is written to the page so that the content fills 3/4 of the page, so that the following textbox does not fit to //the current page
//Now the textbox
Table table = new Table(“510”);
Row currentRow = table.getRows().add();
TextBoxField textBoxField = new TextBoxField(pdfDocument)
textBoxField .setHeight(“340”)
currentRow.setFixedRowHeight(“340”)
textBoxField.setWidth(“510”)
textBoxField.setMultiLine(true);
textBoxField.setVerticalAlignment(VerticalAlignment.Top);
textBoxField.getDefaultAppearance().setFontSize(11);
textBoxField.getDefaultAppearance().setTextColor(new java.awt.Color(0, 0, 0));
textBoxField.getDefaultAppearance().setFontName(“BoschSansGlobal-Regular”);
Cell cell = new Cell();
cell.setMargin(new MarginInfo(0, 0, 0, 0));
cell.getParagraphs().add(textBoxField);
cell.setColSpan(1);
currentRow.getCells().add(cell);
pdfPage.getParagraphs().add(table);