Author: ssteiner Date: Wed Mar 25 12:10:07 2020 New Revision: 1875633 URL: http://svn.apache.org/viewvc?rev=1875633&view=rev Log: FOP-2922: Syntax error after writing content stream
Modified: xmlgraphics/fop-pdf-images/trunk/src/java/org/apache/fop/render/pdf/pdfbox/PDFWriter.java xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/PDFWriterTestCase.java Modified: xmlgraphics/fop-pdf-images/trunk/src/java/org/apache/fop/render/pdf/pdfbox/PDFWriter.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop-pdf-images/trunk/src/java/org/apache/fop/render/pdf/pdfbox/PDFWriter.java?rev=1875633&r1=1875632&r2=1875633&view=diff ============================================================================== --- xmlgraphics/fop-pdf-images/trunk/src/java/org/apache/fop/render/pdf/pdfbox/PDFWriter.java (original) +++ xmlgraphics/fop-pdf-images/trunk/src/java/org/apache/fop/render/pdf/pdfbox/PDFWriter.java Wed Mar 25 12:10:07 2020 @@ -130,7 +130,7 @@ public class PDFWriter { readPDFArguments(op, dictArgs); s.append(">>"); } else if (c instanceof COSBoolean) { - s.append(((COSBoolean) c).getValue()); + s.append(((COSBoolean) c).getValue()).append(" "); } else { throw new IOException(c + " not supported"); } Modified: xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/PDFWriterTestCase.java URL: http://svn.apache.org/viewvc/xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/PDFWriterTestCase.java?rev=1875633&r1=1875632&r2=1875633&view=diff ============================================================================== --- xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/PDFWriterTestCase.java (original) +++ xmlgraphics/fop-pdf-images/trunk/test/java/org/apache/fop/render/pdf/PDFWriterTestCase.java Wed Mar 25 12:10:07 2020 @@ -60,5 +60,14 @@ public class PDFWriterTestCase { super.addCache(f); i++; } - }; + } + + @Test + public void testBoolean() throws IOException { + String text = "[true true ] a\n"; + PDStream pdStream = new PDStream(new PDDocument(), new ByteArrayInputStream(text.getBytes("UTF-8"))); + PDFWriter pdfWriter = new MyPDFWriter(); + String out = pdfWriter.writeText(pdStream); + Assert.assertEquals(out, text); + } } --------------------------------------------------------------------- To unsubscribe, e-mail: fop-commits-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-commits-h...@xmlgraphics.apache.org