2012-07-11 88 views
0

在我的Java EE應用程序中,我通過我的行動像這樣生成PDF:串連iText文檔轉換成PDF

response.setContentType("application/pdf"); 
Document document = new Document();     
PdfWriter.getInstance(document, response.getOutputStream()); 
processManagerHelper.exportingSystemStatisticsPage(document, foProcess); 

我的功能「exportingSystemStatisticsPage」,然後打開該文檔,用的iText和JFreeChart的加油吧,然後關閉文檔。 這很好。

我想現在要做的,是要叫我的功能「exportingSystemStatistics」幾個時間使用不同的參數,並連接該函數創建僅做一個PDF的PDF。 「exportingSystemStatisticsPage」正在創建一個PDF頁面。

你知道我該怎麼做嗎? 任何幫助將不勝感激。

+0

怎麼樣設置你的第一個函數的返回類型爲「ChapterAutoNumber」並連接這些章...? – 2012-07-11 13:26:40

+0

我的函數中沒有返回類型「exportingSystemStatistics」 此函數用於生成一頁PDF,我想保留它。 我想要做的是創建一個新的函數,它會多次調用「exportingSystemStatistics」,將所有Document取出並將它們連接起來。但我找不到... – user1484901 2012-07-11 13:41:16

+0

如果您將添加到「exportingSystemStatistics」PDF中的所有內容添加到「ChapterAutoNumber」,您可以輕鬆地連接這些章節... – 2012-07-11 22:23:40

回答

0

如果你想補充其添加到PDF中的「exportingSystemStatistics」到ChapterAutoNumber你可以很容易地串聯這些章節的所有內容......