You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2014/10/02 19:11:36 UTC

[jira] [Commented] (PDFBOX-2400) Insert page

    [ https://issues.apache.org/jira/browse/PDFBOX-2400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14156771#comment-14156771 ] 

Tilman Hausherr commented on PDFBOX-2400:
-----------------------------------------

I'm not sure if this is possible. Here's the code of addPage:
{code}
        PDPageNode rootPages = getDocumentCatalog().getPages();
        rootPages.getKids().add(page);
{code}
The problem is that getKids can return a list of pages, or a list of pageNodes. To understand what I mean, open a PDF with many pages in the PDFDebugger command line application. So there's potentially a complex tree there and one has to make a decision where to insert / append the new page.

> Insert page
> -----------
>
>                 Key: PDFBOX-2400
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2400
>             Project: PDFBox
>          Issue Type: New Feature
>          Components: PDModel
>            Reporter: Patrick Tucker
>            Priority: Minor
>
> It would be nice if PDDocument had an insertPage function similar to addPage, but takes a number to indicate where to add the new page in the current set of pages.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)