Переместите поле ввода ввода в элемент оболочки.
& lt; style & gt; div.outer {background: red; padding: 10px; } div.inner {border: 1px solid # 888; padding: 5px 10px; фон: белый; } вход {ширина: 100%; border: none} & lt; / style & gt; & lt; div class = "external" & gt; & lt; div class = "inner" & gt; & Lt; вход / & GT; & Lt; / дел & GT; & Lt; / дел & GT;
См. пример здесь: http://jsfiddle.net/L7wYD/1/
Чтобы добавить к contentStream
, используйте следующий код
PDRectangle position = new PDRectangle();
position.setLowerLeftX(10);
position.setLowerLeftY(20);
position.setUpperRightX(100);
position.setUpperRightY(10);
txtLink.setRectangle(position);
page.getAnnotations().add(txtLink);
Существует библиотека, называемая PDFBox-Layout , которая делает проще добавлять гиперссылки :
Document document = new Document();
Paragraph paragraph = new Paragraph();
paragraph.addMarkup(
"This is a link to {link[https://github.com/ralfstuckert/pdfbox-layout]}PDFBox-Layout{link}",
18f, BaseFont.Helvetica);
document.add(paragraph);
final OutputStream outputStream = new FileOutputStream("link.pdf");
document.save(outputStream);