0
PDF 파일에 테이블을 생성하는 Java 코드가 있지만 더 많은 필드가 필요하더라도 하나 이상의 페이지를 생성 할 수 없습니다.자바를 사용하여 pdf 파일에 자동 증가 기능을 설정하는 방법은 무엇입니까?
페이지에 자동 증가 기능을 어떻게 추가합니까?
내가 추천하는 코드입니다.
public static void main(String[] args) {
PDDocument doc = new PDDocument();
PDPage page = new PDPage();
doc.addPage(page);
PDPageContentStream contentStream = new PDPageContentStream(doc, page);
String[][] content = { { "a", "b", "1" }, { "c", "d", "2" },
{ "e", "f", "3" }, { "g", "h", "4" }, { "i", "j", "5" } };
drawTable(page, contentStream, 700, 100, content);
contentStream.close();
doc.save("test.pdf");
}
전체 코드가 [여기] (http://fahdshariff.blogspot.com/2010/10/creating-tables-with-pdfbox.html)에 있다고 가정합니다. – demongolem