You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (JIRA)" <ji...@apache.org> on 2015/09/25 19:53:05 UTC

[jira] [Commented] (PDFBOX-2974) Multi Page print doesn't work with "book.append(new PDFPrintable(document), pageFormat);"

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

Andreas Lehmkühler commented on PDFBOX-2974:
--------------------------------------------

I never used the book class, but according to the javadoc, everything works as expected.
{quote}
public void append(Printable painter, PageFormat page)

Appends a single page to the end of this Book.
{quote}

You should use the following instead
{quote}
public void append(Printable painter, PageFormat page, int numPages)

Appends numPages pages to the end of this Book. Each of the pages is associated with page.
{quote}

> Multi Page print doesn't work with "book.append(new PDFPrintable(document), pageFormat);"
> -----------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-2974
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2974
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Matteo Carminati
>              Labels: example, multipage, print
>
> In the method printWithPaper of  Printing.java example,
> if I use java.awt.print.Book as in the example:
> Book book = new Book();
> book.append(new PDFPrintable(document), pageFormat);
> job.setPageable(book);
> when I execute job.print(); it print only the first page of the document.
> I solved this issue by replacing the three rows mentioned above with:
> job.setPrintable(new PDFPrintable(document), pageFormat);
> by that all pages are printed.
> I hope this is useful for someone.
> Matteo



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org