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

Jeff Martin commented on FOP-2843:
----------------------------------

Well, I found a possible solution (works so far). The PDFGraphics object has a 
public method called getBuffer() which returns a StringBuffer. So after I call 
nextPage(), I call getBuffer().setLength(0). This seems to do the trick, even 
though it feels like I’m doing something dangerous behind PDFGraphics back.

> PDFDocumentGraphics2D#nextPage() creates a copy of the current page instead 
> of an empty page
> --------------------------------------------------------------------------------------------
>
>                 Key: FOP-2843
>                 URL: https://issues.apache.org/jira/browse/FOP-2843
>             Project: FOP
>          Issue Type: Bug
>          Components: renderer/pdf
>    Affects Versions: 2.1
>         Environment: Windows 8.1
>            Reporter: Martin Leitner
>            Priority: Major
>         Attachments: MultiPagePdf.java
>
>
> When creating a multi-page PDF with PDFDocumentGraphics2D, each page contains 
> a copy of the previous page.
> In the attached sample, the expected content is: "Page 1" on page 1, "Page 2" 
> on page 2, "Page 3" on page 3
> The actual content is: "Page 1" on page 1, "Page 1" and "Page 2" on page 2, 
> "Page 1", "Page 2", "Page 3" on page 3



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to