[
https://issues.apache.org/jira/browse/FOP-2263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Luis Bernardo resolved FOP-2263.
--------------------------------
Resolution: Done
Fix Version/s: trunk
makes sense. change applied in
http://svn.apache.org/viewvc?view=revision&revision=1550834
> PDFDocumentGraphics2D.closePage() should not nullify currentStream
> ------------------------------------------------------------------
>
> Key: FOP-2263
> URL: https://issues.apache.org/jira/browse/FOP-2263
> Project: Fop
> Issue Type: Improvement
> Components: pdf
> Affects Versions: 1.1
> Reporter: Max Gilead
> Priority: Minor
> Fix For: trunk
>
>
> In version 1.1 the PDFDocumentGraphics2D.closePage() method nullifies
> currentStream in line 281:
> currentStream = null;
> I suggest to remove this line.
> Nullifying currentStream prevents the user from obtaining raw (not wrapped
> inside a PDF document) output using the PDFGraphics2D.getString() method.
> PDFGraphics2D.dispose() nullifies currentStream so there seems to be no
> reason for .closePage() to do the same.
> Current workaround is to create a new PDFDocumentGraphics2D instance like
> this:
> g = new PDFDocumentGraphics2D(false, out, w, h) {
> @Override protected void closePage() {
> content = super.getString() + "Q\n";
> super.closePage();
> }
> };
> which works (and proves the data is there) but is, quite obviously, ugly and
> fragile.
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)