[jira] [Commented] (FOP-2239) Soft hyphens appear in mid line in PDF output

2013-07-12 Thread Mark Craig (JIRA)

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

Mark Craig commented on FOP-2239:
-

I am not seeing the same behavior as you have seen. After making the change and 
compiling FOP, I see even more hyphens in mid line.

Here's what I have done:

1.
Get FOP source:

svn co http://svn.eu.apache.org/repos/asf/xmlgraphics/fop/trunk/ fop-svn

2.
Edit fop-svn/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java to 
comment out the while loop as follows:

/*while (lastIndex > 0 && foText.charAt(lastIndex - 1) == 
CharUtilities.SOFT_HYPHEN) {
lastIndex--;
}*/

3.
Compile FOP:

cd fop-svn ; ant

4.
Generate the sample PDF.

fop ../sample.fo ../sample.pdf


When I open sample.pdf, I see this content:

Some blocks with soft hyphens
.-.-
.- .-
.-
.-]
.-\
.-"
.-a
.-Z


> Soft hyphens appear in mid line in PDF output
> -
>
> Key: FOP-2239
> URL: https://issues.apache.org/jira/browse/FOP-2239
> Project: Fop
>  Issue Type: Bug
>  Components: pdf
>Affects Versions: 1.1, trunk
> Environment: $ java -version
> java version "1.7.0_17"
> Java(TM) SE Runtime Environment (build 1.7.0_17-b02)
> Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
>Reporter: Mark Craig
> Attachments: simple.fo, simple.pdf
>
>
> When producing PDF, soft hyphens show up in mid line when followed by 
> punctuation characters such as ., ], and ".
> In the test case that I will attach to this issue:
> .­.­
> .­ .­
> .­
> .­]
> .­\
> .­"
> .­a
> .­Z
> looks like this in the PDF:
> .-.
> . .
> .
> .-]
> .\
> .-"
> .a
> .Z
> The generation does not display any errors:
> $ fop simple.fo simple.pdf 
> Rendered page #1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (FOP-2274) Writing mode from block container ignored.

2013-07-12 Thread Glenn Adams (JIRA)
Glenn Adams created FOP-2274:


 Summary: Writing mode from block container ignored.
 Key: FOP-2274
 URL: https://issues.apache.org/jira/browse/FOP-2274
 Project: Fop
  Issue Type: Bug
  Components: page-master/layout
Affects Versions: 1.1, trunk
Reporter: Glenn Adams
Assignee: Glenn Adams


Writing mode from block-container is ignored in certain contexts.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (FOP-2274) Writing mode from block container ignored.

2013-07-12 Thread Glenn Adams (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2274?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Glenn Adams updated FOP-2274:
-

Attachment: test.pdf
test.fo.xml

In this test, both list items should have right to left directionality from the 
block container specified writing mode.

> Writing mode from block container ignored.
> --
>
> Key: FOP-2274
> URL: https://issues.apache.org/jira/browse/FOP-2274
> Project: Fop
>  Issue Type: Bug
>  Components: page-master/layout
>Affects Versions: 1.1, trunk
>Reporter: Glenn Adams
>Assignee: Glenn Adams
> Attachments: test.fo.xml, test.pdf
>
>
> Writing mode from block-container is ignored in certain contexts.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2274) Writing mode from block container ignored.

2013-07-12 Thread Glenn Adams (JIRA)

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

Glenn Adams commented on FOP-2274:
--

Fixed at 
https://github.com/skynavga/fop/commit/843ba1233794b09482f54385afc853f5c1e46e84.
 Leaving open until merged into trunk.

> Writing mode from block container ignored.
> --
>
> Key: FOP-2274
> URL: https://issues.apache.org/jira/browse/FOP-2274
> Project: Fop
>  Issue Type: Bug
>  Components: page-master/layout
>Affects Versions: 1.1, trunk
>Reporter: Glenn Adams
>Assignee: Glenn Adams
> Attachments: test.fo.xml, test.pdf
>
>
> Writing mode from block-container is ignored in certain contexts.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2273) Stroke miter limit is not clamped when writing PDFs

2013-07-12 Thread Max Gilead (JIRA)

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

Max Gilead commented on FOP-2273:
-

There should be two lines but Acrobat Reader shows only one. There is no error 
described above as I couldn't get it to display one with this simple example 
(the original PDF was generated using a 3rd party library).

import org.apache.fop.svg.PDFDocumentGraphics2D;
import org.apache.pdfbox.pdfwriter.COSWriter;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.PDPage;
import org.apache.pdfbox.pdmodel.common.PDRectangle;
import org.apache.pdfbox.pdmodel.edit.PDPageContentStream;
import org.apache.xmlgraphics.java2d.GraphicContext;

import java.awt.BasicStroke;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.OutputStream;

public class FopTest {

public static void main(String[] args) throws Exception {
final String[] content = new String[1];
PDFDocumentGraphics2D g = new PDFDocumentGraphics2D(false, new 
ByteArrayOutputStream(), 100, 100) {
@Override protected void closePage() {
content[0] = super.getString() + "Q\n";
super.closePage();
}
};
g.setGraphicContext(new GraphicContext());

g.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND, 
BasicStroke.JOIN_ROUND, 1.0f));
g.drawLine(0, 100, 100, 0);
g.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_ROUND, 
BasicStroke.JOIN_ROUND, 0.1f));
g.drawLine(0, 0, 100, 100);

g.finish();
g.dispose();

final PDDocument document = new PDDocument();
PDPage page = new PDPage(new PDRectangle(100, 100));
document.addPage(page);
PDPageContentStream writer = new PDPageContentStream(document, page);
writer.appendRawCommands(content[0].getBytes());
writer.close();

OutputStream out = new BufferedOutputStream(new 
FileOutputStream("FOP_Test.pdf"));
COSWriter coswriter = null;
coswriter = new COSWriter(out);
coswriter.write(document);
coswriter.close();

document.close();
out.close();
}

}


> Stroke miter limit is not clamped when writing PDFs
> ---
>
> Key: FOP-2273
> URL: https://issues.apache.org/jira/browse/FOP-2273
> Project: Fop
>  Issue Type: Bug
>  Components: pdf
>Affects Versions: trunk
>Reporter: Max Gilead
>  Labels: easyfix
>
> org.apache.fop.svg.PDFGraphics2D line 1240 (as of SVN revision 148001 [1]) is:
> float ml = bs.getMiterLimit();
> but should be (or equivalent):
> float ml = Math.max(1.0f, bs.getMiterLimit());
> Acrobat Reader (on all platforms) refuses to load graphics data after 
> encountering miter limit < 1.0 and reports an error.
> I can't find a reference to the valid range in the PDF spec but Inkscape also 
> had a problem with values less than 1.0 [2] and SVG spec mandates values >= 
> 1.0 as well [3] so clamping the value to 1.0 or more seems like the right 
> thing to do.
> [1] 
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java?revision=1480018&view=markup
> [2] 
> http://webcache.googleusercontent.com/search?q=cache:RHSt5Wk7-uQJ:inkscape-forum.andreas-s.net/topic/71990+&cd=7&hl=en&ct=clnk&gl=uk&client=firefox-beta
> [3] http://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (FOP-2273) Stroke miter limit is not clamped when writing PDFs

2013-07-12 Thread Max Gilead (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Max Gilead updated FOP-2273:


Attachment: FOP_Test.pdf

Test app output

> Stroke miter limit is not clamped when writing PDFs
> ---
>
> Key: FOP-2273
> URL: https://issues.apache.org/jira/browse/FOP-2273
> Project: Fop
>  Issue Type: Bug
>  Components: pdf
>Affects Versions: trunk
>Reporter: Max Gilead
>  Labels: easyfix
> Attachments: FOP_Test.pdf
>
>
> org.apache.fop.svg.PDFGraphics2D line 1240 (as of SVN revision 148001 [1]) is:
> float ml = bs.getMiterLimit();
> but should be (or equivalent):
> float ml = Math.max(1.0f, bs.getMiterLimit());
> Acrobat Reader (on all platforms) refuses to load graphics data after 
> encountering miter limit < 1.0 and reports an error.
> I can't find a reference to the valid range in the PDF spec but Inkscape also 
> had a problem with values less than 1.0 [2] and SVG spec mandates values >= 
> 1.0 as well [3] so clamping the value to 1.0 or more seems like the right 
> thing to do.
> [1] 
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java?revision=1480018&view=markup
> [2] 
> http://webcache.googleusercontent.com/search?q=cache:RHSt5Wk7-uQJ:inkscape-forum.andreas-s.net/topic/71990+&cd=7&hl=en&ct=clnk&gl=uk&client=firefox-beta
> [3] http://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2273) Stroke miter limit is not clamped when writing PDFs

2013-07-12 Thread Luis Bernardo (JIRA)

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

Luis Bernardo commented on FOP-2273:


I opened the PDF you provided without problem with Adobe Reader 10.1.7 on a 
Mac. Can you provide an fo/svg file that shows the issue?

> Stroke miter limit is not clamped when writing PDFs
> ---
>
> Key: FOP-2273
> URL: https://issues.apache.org/jira/browse/FOP-2273
> Project: Fop
>  Issue Type: Bug
>  Components: pdf
>Affects Versions: trunk
>Reporter: Max Gilead
>  Labels: easyfix
> Attachments: FOP_Test.pdf
>
>
> org.apache.fop.svg.PDFGraphics2D line 1240 (as of SVN revision 148001 [1]) is:
> float ml = bs.getMiterLimit();
> but should be (or equivalent):
> float ml = Math.max(1.0f, bs.getMiterLimit());
> Acrobat Reader (on all platforms) refuses to load graphics data after 
> encountering miter limit < 1.0 and reports an error.
> I can't find a reference to the valid range in the PDF spec but Inkscape also 
> had a problem with values less than 1.0 [2] and SVG spec mandates values >= 
> 1.0 as well [3] so clamping the value to 1.0 or more seems like the right 
> thing to do.
> [1] 
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java?revision=1480018&view=markup
> [2] 
> http://webcache.googleusercontent.com/search?q=cache:RHSt5Wk7-uQJ:inkscape-forum.andreas-s.net/topic/71990+&cd=7&hl=en&ct=clnk&gl=uk&client=firefox-beta
> [3] http://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2273) Stroke miter limit is not clamped when writing PDFs

2013-07-12 Thread Max Gilead (JIRA)

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

Max Gilead commented on FOP-2273:
-

As I mentioned in the previous comment: there should be two lines but Acrobat 
Reader shows only one. Do you see two diagonal lines in AR or only one?

Also, there is no error described above as I couldn't get it to display one 
with this simple example (the original PDF was generated using a 3rd party 
library) -- This is just a clarification as there is no error popup when 
opening the attached file yet the end result is the same -- the graphics 
rendering stops once Acrobat encounters a shape with a miter limit below 1.0


> Stroke miter limit is not clamped when writing PDFs
> ---
>
> Key: FOP-2273
> URL: https://issues.apache.org/jira/browse/FOP-2273
> Project: Fop
>  Issue Type: Bug
>  Components: pdf
>Affects Versions: trunk
>Reporter: Max Gilead
>  Labels: easyfix
> Attachments: FOP_Test.pdf, PDF-Rendering.png
>
>
> org.apache.fop.svg.PDFGraphics2D line 1240 (as of SVN revision 148001 [1]) is:
> float ml = bs.getMiterLimit();
> but should be (or equivalent):
> float ml = Math.max(1.0f, bs.getMiterLimit());
> Acrobat Reader (on all platforms) refuses to load graphics data after 
> encountering miter limit < 1.0 and reports an error.
> I can't find a reference to the valid range in the PDF spec but Inkscape also 
> had a problem with values less than 1.0 [2] and SVG spec mandates values >= 
> 1.0 as well [3] so clamping the value to 1.0 or more seems like the right 
> thing to do.
> [1] 
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java?revision=1480018&view=markup
> [2] 
> http://webcache.googleusercontent.com/search?q=cache:RHSt5Wk7-uQJ:inkscape-forum.andreas-s.net/topic/71990+&cd=7&hl=en&ct=clnk&gl=uk&client=firefox-beta
> [3] http://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (FOP-2273) Stroke miter limit is not clamped when writing PDFs

2013-07-12 Thread Kevin Pearcey (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Pearcey updated FOP-2273:
---

Attachment: PDF-Rendering.png

I suspect the test case PDF generation is too simple to totally throw out the 
Adobe parser, but the renderer doesn't like it.

Attached is a screen shot of the pdf in windows vs Chrome - Notice one has 2 
lines, the other only 1.

> Stroke miter limit is not clamped when writing PDFs
> ---
>
> Key: FOP-2273
> URL: https://issues.apache.org/jira/browse/FOP-2273
> Project: Fop
>  Issue Type: Bug
>  Components: pdf
>Affects Versions: trunk
>Reporter: Max Gilead
>  Labels: easyfix
> Attachments: FOP_Test.pdf, PDF-Rendering.png
>
>
> org.apache.fop.svg.PDFGraphics2D line 1240 (as of SVN revision 148001 [1]) is:
> float ml = bs.getMiterLimit();
> but should be (or equivalent):
> float ml = Math.max(1.0f, bs.getMiterLimit());
> Acrobat Reader (on all platforms) refuses to load graphics data after 
> encountering miter limit < 1.0 and reports an error.
> I can't find a reference to the valid range in the PDF spec but Inkscape also 
> had a problem with values less than 1.0 [2] and SVG spec mandates values >= 
> 1.0 as well [3] so clamping the value to 1.0 or more seems like the right 
> thing to do.
> [1] 
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java?revision=1480018&view=markup
> [2] 
> http://webcache.googleusercontent.com/search?q=cache:RHSt5Wk7-uQJ:inkscape-forum.andreas-s.net/topic/71990+&cd=7&hl=en&ct=clnk&gl=uk&client=firefox-beta
> [3] http://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Comment Edited] (FOP-2273) Stroke miter limit is not clamped when writing PDFs

2013-07-12 Thread Max Gilead (JIRA)

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

Max Gilead edited comment on FOP-2273 at 7/12/13 3:47 PM:
--

As I mentioned in the previous comment: there should be two lines but Acrobat 
Reader shows only one. Do you see two diagonal lines in AR or only one?

Also, there is no error popup when opening the attached file but the end result 
is the same -- the graphics rendering stops once Acrobat encounters a shape 
with a miter limit below 1.0


  was (Author: maxgilead):
As I mentioned in the previous comment: there should be two lines but 
Acrobat Reader shows only one. Do you see two diagonal lines in AR or only one?

Also, there is no error described above as I couldn't get it to display one 
with this simple example (the original PDF was generated using a 3rd party 
library) -- This is just a clarification as there is no error popup when 
opening the attached file yet the end result is the same -- the graphics 
rendering stops once Acrobat encounters a shape with a miter limit below 1.0

  
> Stroke miter limit is not clamped when writing PDFs
> ---
>
> Key: FOP-2273
> URL: https://issues.apache.org/jira/browse/FOP-2273
> Project: Fop
>  Issue Type: Bug
>  Components: pdf
>Affects Versions: trunk
>Reporter: Max Gilead
>  Labels: easyfix
> Attachments: FOP_Test.pdf, PDF-Rendering.png
>
>
> org.apache.fop.svg.PDFGraphics2D line 1240 (as of SVN revision 148001 [1]) is:
> float ml = bs.getMiterLimit();
> but should be (or equivalent):
> float ml = Math.max(1.0f, bs.getMiterLimit());
> Acrobat Reader (on all platforms) refuses to load graphics data after 
> encountering miter limit < 1.0 and reports an error.
> I can't find a reference to the valid range in the PDF spec but Inkscape also 
> had a problem with values less than 1.0 [2] and SVG spec mandates values >= 
> 1.0 as well [3] so clamping the value to 1.0 or more seems like the right 
> thing to do.
> [1] 
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java?revision=1480018&view=markup
> [2] 
> http://webcache.googleusercontent.com/search?q=cache:RHSt5Wk7-uQJ:inkscape-forum.andreas-s.net/topic/71990+&cd=7&hl=en&ct=clnk&gl=uk&client=firefox-beta
> [3] http://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (FOP-2273) Stroke miter limit is not clamped when writing PDFs

2013-07-12 Thread Max Gilead (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Max Gilead updated FOP-2273:


Attachment: Acrobat Reader.png

> Stroke miter limit is not clamped when writing PDFs
> ---
>
> Key: FOP-2273
> URL: https://issues.apache.org/jira/browse/FOP-2273
> Project: Fop
>  Issue Type: Bug
>  Components: pdf
>Affects Versions: trunk
>Reporter: Max Gilead
>  Labels: easyfix
> Attachments: Acrobat Reader.png, expected result.png, FOP_Test.pdf, 
> PDF-Rendering.png
>
>
> org.apache.fop.svg.PDFGraphics2D line 1240 (as of SVN revision 148001 [1]) is:
> float ml = bs.getMiterLimit();
> but should be (or equivalent):
> float ml = Math.max(1.0f, bs.getMiterLimit());
> Acrobat Reader (on all platforms) refuses to load graphics data after 
> encountering miter limit < 1.0 and reports an error.
> I can't find a reference to the valid range in the PDF spec but Inkscape also 
> had a problem with values less than 1.0 [2] and SVG spec mandates values >= 
> 1.0 as well [3] so clamping the value to 1.0 or more seems like the right 
> thing to do.
> [1] 
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java?revision=1480018&view=markup
> [2] 
> http://webcache.googleusercontent.com/search?q=cache:RHSt5Wk7-uQJ:inkscape-forum.andreas-s.net/topic/71990+&cd=7&hl=en&ct=clnk&gl=uk&client=firefox-beta
> [3] http://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (FOP-2273) Stroke miter limit is not clamped when writing PDFs

2013-07-12 Thread Max Gilead (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Max Gilead updated FOP-2273:


Attachment: expected result.png

> Stroke miter limit is not clamped when writing PDFs
> ---
>
> Key: FOP-2273
> URL: https://issues.apache.org/jira/browse/FOP-2273
> Project: Fop
>  Issue Type: Bug
>  Components: pdf
>Affects Versions: trunk
>Reporter: Max Gilead
>  Labels: easyfix
> Attachments: Acrobat Reader.png, expected result.png, FOP_Test.pdf, 
> PDF-Rendering.png
>
>
> org.apache.fop.svg.PDFGraphics2D line 1240 (as of SVN revision 148001 [1]) is:
> float ml = bs.getMiterLimit();
> but should be (or equivalent):
> float ml = Math.max(1.0f, bs.getMiterLimit());
> Acrobat Reader (on all platforms) refuses to load graphics data after 
> encountering miter limit < 1.0 and reports an error.
> I can't find a reference to the valid range in the PDF spec but Inkscape also 
> had a problem with values less than 1.0 [2] and SVG spec mandates values >= 
> 1.0 as well [3] so clamping the value to 1.0 or more seems like the right 
> thing to do.
> [1] 
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java?revision=1480018&view=markup
> [2] 
> http://webcache.googleusercontent.com/search?q=cache:RHSt5Wk7-uQJ:inkscape-forum.andreas-s.net/topic/71990+&cd=7&hl=en&ct=clnk&gl=uk&client=firefox-beta
> [3] http://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2273) Stroke miter limit is not clamped when writing PDFs

2013-07-12 Thread Luis Bernardo (JIRA)

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

Luis Bernardo commented on FOP-2273:


I confirm the issue with Adobe Reader and I think the suggested fix is 
appropriate too.

> Stroke miter limit is not clamped when writing PDFs
> ---
>
> Key: FOP-2273
> URL: https://issues.apache.org/jira/browse/FOP-2273
> Project: Fop
>  Issue Type: Bug
>  Components: pdf
>Affects Versions: trunk
>Reporter: Max Gilead
>  Labels: easyfix
> Attachments: Acrobat Reader.png, expected result.png, FOP_Test.pdf, 
> PDF-Rendering.png
>
>
> org.apache.fop.svg.PDFGraphics2D line 1240 (as of SVN revision 148001 [1]) is:
> float ml = bs.getMiterLimit();
> but should be (or equivalent):
> float ml = Math.max(1.0f, bs.getMiterLimit());
> Acrobat Reader (on all platforms) refuses to load graphics data after 
> encountering miter limit < 1.0 and reports an error.
> I can't find a reference to the valid range in the PDF spec but Inkscape also 
> had a problem with values less than 1.0 [2] and SVG spec mandates values >= 
> 1.0 as well [3] so clamping the value to 1.0 or more seems like the right 
> thing to do.
> [1] 
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java?revision=1480018&view=markup
> [2] 
> http://webcache.googleusercontent.com/search?q=cache:RHSt5Wk7-uQJ:inkscape-forum.andreas-s.net/topic/71990+&cd=7&hl=en&ct=clnk&gl=uk&client=firefox-beta
> [3] http://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2273) Stroke miter limit is not clamped when writing PDFs

2013-07-12 Thread Luis Bernardo (JIRA)

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

Luis Bernardo commented on FOP-2273:


If you use an svg with a invalid miterlimit value batik supposedly (I assume 
this happens when the svg is processed by batik) fixes it and the PDF generated 
by FOP is correct (has M with operand 1).

> Stroke miter limit is not clamped when writing PDFs
> ---
>
> Key: FOP-2273
> URL: https://issues.apache.org/jira/browse/FOP-2273
> Project: Fop
>  Issue Type: Bug
>  Components: pdf
>Affects Versions: trunk
>Reporter: Max Gilead
>  Labels: easyfix
> Attachments: Acrobat Reader.png, expected result.png, FOP_Test.pdf, 
> PDF-Rendering.png
>
>
> org.apache.fop.svg.PDFGraphics2D line 1240 (as of SVN revision 148001 [1]) is:
> float ml = bs.getMiterLimit();
> but should be (or equivalent):
> float ml = Math.max(1.0f, bs.getMiterLimit());
> Acrobat Reader (on all platforms) refuses to load graphics data after 
> encountering miter limit < 1.0 and reports an error.
> I can't find a reference to the valid range in the PDF spec but Inkscape also 
> had a problem with values less than 1.0 [2] and SVG spec mandates values >= 
> 1.0 as well [3] so clamping the value to 1.0 or more seems like the right 
> thing to do.
> [1] 
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java?revision=1480018&view=markup
> [2] 
> http://webcache.googleusercontent.com/search?q=cache:RHSt5Wk7-uQJ:inkscape-forum.andreas-s.net/topic/71990+&cd=7&hl=en&ct=clnk&gl=uk&client=firefox-beta
> [3] http://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2259) [PATCH] 1 bit TIFF error

2013-07-12 Thread Luis Bernardo (JIRA)

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

Luis Bernardo commented on FOP-2259:


I had access to the image that motivated this patch. This is the tiffinfo 
output:

TIFF Directory at offset 0x7c6 (1990)
  Subfile Type: (0 = 0x0)
  Image Width: 487 Image Length: 150
  Resolution: 300, 300 pixels/inch
  Bits/Sample: 1
  Compression Scheme: LZW
  Photometric Interpretation: palette color (RGB from colormap)
  Orientation: row 0 top, col 0 lhs
  Samples/Pixel: 1
  Rows/Strip: 150
  Planar Configuration: single image plane
  Color Map: (present)
  Software: Adobe Photoshop CS2 Macintosh
  DateTime: 2007:03:09 08:55:22
  Predictor: none 1 (0x1)


> [PATCH] 1 bit TIFF error
> 
>
> Key: FOP-2259
> URL: https://issues.apache.org/jira/browse/FOP-2259
> Project: Fop
>  Issue Type: Bug
>Reporter: simon steiner
> Attachments: fop1bit.patch, xgc1bit.patch
>
>
> fop test.fo out.pdf
> java.lang.ClassCastException: [S cannot be cast to [B
> I cant share tiff due to private information.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (FOP-2259) [PATCH] 1 bit TIFF error

2013-07-12 Thread Luis Bernardo (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luis Bernardo resolved FOP-2259.


   Resolution: Fixed
Fix Version/s: trunk

patch applied:
http://svn.apache.org/viewvc?view=revision&revision=1502693
http://svn.apache.org/viewvc?view=revision&revision=1502694

> [PATCH] 1 bit TIFF error
> 
>
> Key: FOP-2259
> URL: https://issues.apache.org/jira/browse/FOP-2259
> Project: Fop
>  Issue Type: Bug
>Reporter: simon steiner
> Fix For: trunk
>
> Attachments: fop1bit.patch, xgc1bit.patch
>
>
> fop test.fo out.pdf
> java.lang.ClassCastException: [S cannot be cast to [B
> I cant share tiff due to private information.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2273) Stroke miter limit is not clamped when writing PDFs

2013-07-12 Thread Luis Bernardo (JIRA)

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

Luis Bernardo commented on FOP-2273:


patch applied: http://svn.apache.org/viewvc?view=revision&revision=1502705

it follows from the PDF spec definition of miter limit as a cap on the ratio of 
the miter length and the line width that a value less than 1 makes little sense.

> Stroke miter limit is not clamped when writing PDFs
> ---
>
> Key: FOP-2273
> URL: https://issues.apache.org/jira/browse/FOP-2273
> Project: Fop
>  Issue Type: Bug
>  Components: pdf
>Affects Versions: trunk
>Reporter: Max Gilead
>  Labels: easyfix
> Attachments: Acrobat Reader.png, expected result.png, FOP_Test.pdf, 
> PDF-Rendering.png
>
>
> org.apache.fop.svg.PDFGraphics2D line 1240 (as of SVN revision 148001 [1]) is:
> float ml = bs.getMiterLimit();
> but should be (or equivalent):
> float ml = Math.max(1.0f, bs.getMiterLimit());
> Acrobat Reader (on all platforms) refuses to load graphics data after 
> encountering miter limit < 1.0 and reports an error.
> I can't find a reference to the valid range in the PDF spec but Inkscape also 
> had a problem with values less than 1.0 [2] and SVG spec mandates values >= 
> 1.0 as well [3] so clamping the value to 1.0 or more seems like the right 
> thing to do.
> [1] 
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java?revision=1480018&view=markup
> [2] 
> http://webcache.googleusercontent.com/search?q=cache:RHSt5Wk7-uQJ:inkscape-forum.andreas-s.net/topic/71990+&cd=7&hl=en&ct=clnk&gl=uk&client=firefox-beta
> [3] http://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (FOP-2273) Stroke miter limit is not clamped when writing PDFs

2013-07-12 Thread Luis Bernardo (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luis Bernardo resolved FOP-2273.


   Resolution: Fixed
Fix Version/s: trunk

> Stroke miter limit is not clamped when writing PDFs
> ---
>
> Key: FOP-2273
> URL: https://issues.apache.org/jira/browse/FOP-2273
> Project: Fop
>  Issue Type: Bug
>  Components: pdf
>Affects Versions: trunk
>Reporter: Max Gilead
>  Labels: easyfix
> Fix For: trunk
>
> Attachments: Acrobat Reader.png, expected result.png, FOP_Test.pdf, 
> PDF-Rendering.png
>
>
> org.apache.fop.svg.PDFGraphics2D line 1240 (as of SVN revision 148001 [1]) is:
> float ml = bs.getMiterLimit();
> but should be (or equivalent):
> float ml = Math.max(1.0f, bs.getMiterLimit());
> Acrobat Reader (on all platforms) refuses to load graphics data after 
> encountering miter limit < 1.0 and reports an error.
> I can't find a reference to the valid range in the PDF spec but Inkscape also 
> had a problem with values less than 1.0 [2] and SVG spec mandates values >= 
> 1.0 as well [3] so clamping the value to 1.0 or more seems like the right 
> thing to do.
> [1] 
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java?revision=1480018&view=markup
> [2] 
> http://webcache.googleusercontent.com/search?q=cache:RHSt5Wk7-uQJ:inkscape-forum.andreas-s.net/topic/71990+&cd=7&hl=en&ct=clnk&gl=uk&client=firefox-beta
> [3] http://www.w3.org/TR/SVG11/painting.html#StrokeMiterlimitProperty

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (FOP-2264) [PATCH] PDF form is offset

2013-07-12 Thread Luis Bernardo (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luis Bernardo resolved FOP-2264.


   Resolution: Fixed
Fix Version/s: trunk

patch applied: http://svn.apache.org/viewvc?view=revision&revision=1502718

> [PATCH] PDF form is offset
> --
>
> Key: FOP-2264
> URL: https://issues.apache.org/jira/browse/FOP-2264
> Project: Fop
>  Issue Type: Bug
>Reporter: simon steiner
> Fix For: trunk
>
> Attachments: pdfoffset.patch, Sample.pdf, test.fo
>
>
> PDF form is shifted
> fop test.fo out.pdf

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2271) [PATCH] XSL Infinite loop

2013-07-12 Thread Luis Bernardo (JIRA)

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

Luis Bernardo commented on FOP-2271:


I had investigated this issue before and asked a question in the xalan-dev 
list:http://mail-archives.apache.org/mod_mbox/xml-xalan-dev/201203.mbox/%3CCAO3yRHsUJBxnu7G4L-Zr1iLL6aVh%2BGwaUXWSgGCU%3DVb3WkcXrg%40mail.gmail.com%3E.

I think Simon came up with a nice workaround that does not require changing 
xalan.

> [PATCH] XSL Infinite loop
> -
>
> Key: FOP-2271
> URL: https://issues.apache.org/jira/browse/FOP-2271
> Project: Fop
>  Issue Type: Bug
>Reporter: simon steiner
> Attachments: case26692.xml, case26692.xsl, iloop.patch, 
> ilooptest.patch
>
>
> fop -xml case26692.xml -xsl case26692.xsl out.pdf
> causes Infinite loop due to xalan calling endElement in a finally block, so 
> exception in startElement wont stop xml parser straight away.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (FOP-2271) [PATCH] XSL Infinite loop

2013-07-12 Thread Luis Bernardo (JIRA)

 [ 
https://issues.apache.org/jira/browse/FOP-2271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Luis Bernardo resolved FOP-2271.


   Resolution: Fixed
Fix Version/s: trunk

patch applied: http://svn.apache.org/viewvc?view=revision&revision=1502722

> [PATCH] XSL Infinite loop
> -
>
> Key: FOP-2271
> URL: https://issues.apache.org/jira/browse/FOP-2271
> Project: Fop
>  Issue Type: Bug
>Reporter: simon steiner
> Fix For: trunk
>
> Attachments: case26692.xml, case26692.xsl, iloop.patch, 
> ilooptest.patch
>
>
> fop -xml case26692.xml -xsl case26692.xsl out.pdf
> causes Infinite loop due to xalan calling endElement in a finally block, so 
> exception in startElement wont stop xml parser straight away.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira