2013-02-13 96 views

回答

-1

PDDestinationPDAction的使用非常相似的PdfDestination的一個或PdfAction的iText

所以你可能想搜索iText首先的例子。

具體在PDFBox, 例如, 以下內容首頁爲第5頁。

PDDestination dest = new PDPageDestination(); 
// When you open this PDF, you will see page 5. 
dest.setPageNumber(4) 
PDActionGoTo action = new PDActionGoTo(); 
action.setDestination(dest); 
document.getDocumentCatalog().setOpenAction(action);