Я использую Pdfbox для создания PDF файлов с использованием Java. Проблема в том, что когда я добавляю длинное текстовое содержимое в документ, оно отображается неправильно. Отображается только его часть. Это тоже в одной строке.
Я хочу, чтобы текст был в нескольких строках.
Мой код приведен ниже:
PDPageContentStream pdfContent=new PDPageContentStream(pdfDocument, pdfPage, true, true);
pdfContent.beginText();
pdfContent.setFont(pdfFont, 11);
pdfContent.moveTextPositionByAmount(30,750);
pdfContent.drawString("I am trying to create a PDF file with a lot of text contents in the document. I am using PDFBox");
pdfContent.endText();
Мой вывод: