[jira] [Commented] (FOP-2617) Text run using "dy" in SVG published to PDF is not properly placed vertically

2018-04-16 Thread Radu Coravu (JIRA)

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

Radu Coravu commented on FOP-2617:
--

[~lagivan] My patch was that when the field 
"org.apache.fop.svg.NativeTextPainter.COMPLEX_SCRIPT_TEXT_LAYOUT_FACTORY" is 
initialized to replace:

{code}if (ComplexGlyphLayout.mayRequireComplexLayout(aci)) {
return new ComplexGlyphLayout(aci, charMap, offset, frc);
} else {
return new GlyphLayout(aci, charMap, offset, frc);
}
{code}

with:

{code} 
return new GlyphLayout(aci, charMap, offset, frc);
{code}

so avoiding completely to return a ComplexGlyphLayout.

> Text run using "dy" in SVG published to PDF is not properly placed vertically
> -
>
> Key: FOP-2617
> URL: https://issues.apache.org/jira/browse/FOP-2617
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Affects Versions: 2.1
>Reporter: Radu Coravu
>Priority: Major
> Fix For: trunk
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> If we have an SVG like:
> {code} "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
> http://www.w3.org/2000/svg; 
>   width="15.90551in" height="12.93701in"
>   >
>   
>   A B  
> 
> {code}
> which gets embedded in an XSL-FO document and then using Apache FOP and Batik 
> we build the PDF, the PDF does not contain the "B" text run on a line under 
> the "A" text run. So it seems to ignore the "dy" attribute set on it.
> Using just Batik to convert the SVG to a binary image works though. So there 
> is probably a problem somewhere in the PDF Graphics 2D or the PDF Text 
> Painter.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FOP-2617) Text run using "dy" in SVG published to PDF is not properly placed vertically

2018-04-16 Thread Ivan Lagunov (JIRA)

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

Ivan Lagunov commented on FOP-2617:
---

[~radu_coravu] could you please share the source code of your patch?

> Text run using "dy" in SVG published to PDF is not properly placed vertically
> -
>
> Key: FOP-2617
> URL: https://issues.apache.org/jira/browse/FOP-2617
> Project: FOP
>  Issue Type: Bug
>  Components: image/svg
>Affects Versions: 2.1
>Reporter: Radu Coravu
>Priority: Major
> Fix For: trunk
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> If we have an SVG like:
> {code} "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
> http://www.w3.org/2000/svg; 
>   width="15.90551in" height="12.93701in"
>   >
>   
>   A B  
> 
> {code}
> which gets embedded in an XSL-FO document and then using Apache FOP and Batik 
> we build the PDF, the PDF does not contain the "B" text run on a line under 
> the "A" text run. So it seems to ignore the "dy" attribute set on it.
> Using just Batik to convert the SVG to a binary image works though. So there 
> is probably a problem somewhere in the PDF Graphics 2D or the PDF Text 
> Painter.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FOP-2738) ArrayIndexOutOfBoundsException in GlyphMapping.addToLetterAdjust

2018-04-16 Thread Vlad Ivanov (JIRA)

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

Vlad Ivanov commented on FOP-2738:
--

I guess it's a matter of waiting for release now.

> ArrayIndexOutOfBoundsException in GlyphMapping.addToLetterAdjust
> 
>
> Key: FOP-2738
> URL: https://issues.apache.org/jira/browse/FOP-2738
> Project: FOP
>  Issue Type: Bug
>  Components: fo/inline
>Affects Versions: 2.2
> Environment: Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
> Windows
>Reporter: Vlad Ivanov
>Priority: Major
> Fix For: trunk
>
> Attachments: fop.conf, fop1.fo, image.svg
>
>
> The following exception happens while rendering to a PDF file:
> {code}
>   [fop] SEVERE: SVG graphic could not be rendered. Reason: 
> java.lang.ArrayIndexOutOfBoundsException: 5
>   [fop] java.lang.ArrayIndexOutOfBoundsException: 5
>   [fop] at 
> org.apache.fop.fonts.GlyphMapping.addToLetterAdjust(GlyphMapping.java:286)
>   [fop] at 
> org.apache.fop.fonts.GlyphMapping.processWordNoMapping(GlyphMapping.java:248)
>   [fop] at 
> org.apache.fop.fonts.GlyphMapping.doGlyphMapping(GlyphMapping.java:93)
>   [fop] at 
> org.apache.fop.svg.font.FOPGVTGlyphVector.performDefaultLayout(FOPGVTGlyphVector.java:94)
>   [fop] at 
> org.apache.batik.bridge.GlyphLayout.doExplicitGlyphLayout(Unknown Source)
>   [fop] at 
> org.apache.batik.bridge.GlyphLayout.adjustTextSpacing(Unknown Source)
>   [fop] at org.apache.batik.bridge.GlyphLayout.getAdvance2D(Unknown 
> Source)
>   [fop] at 
> org.apache.batik.bridge.StrokingTextPainter.getTextChunk(Unknown Source)
>   [fop] at 
> org.apache.batik.bridge.StrokingTextPainter.computeTextRuns(Unknown Source)
>   [fop] at 
> org.apache.fop.svg.NativeTextPainter.computeTextRuns(NativeTextPainter.java:223)
>   [fop] at 
> org.apache.batik.bridge.StrokingTextPainter.getTextRuns(Unknown Source)
>   [fop] at 
> org.apache.batik.bridge.StrokingTextPainter.getBounds2D(Unknown Source)
>   [fop] at 
> org.apache.batik.bridge.TextNode.getPrimitiveBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds(Unknown
>  Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown
>  Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown
>  Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getBounds(Unknown Source)
>   [fop] at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown 
> Source)
>   [fop] at 
> org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:208)
>   [fop] at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
>   [fop] at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
>   [fop] at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
>   [fop] at 
> org.apache.fop.render.pdf.PDFPainter.drawImageUsingURI(PDFPainter.java:215)
>   [fop] at 
> org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:180)
>   [fop] at 
> org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1296)
>   [fop] at 
> org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1283)
>   [fop] at 
> org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:858)
>   [fop] at 
> org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:832)
>   [fop] at 
> org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:864)
>   [fop] at 
> org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:715)
>   [fop] at 
> org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:928)
>   [fop] at 
> 

[jira] [Commented] (FOP-2783) FOP fails to generate pdf for certain URLS

2018-04-16 Thread Luca Mambretti (JIRA)

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

Luca Mambretti commented on FOP-2783:
-

To me this looks more like a source XML problem than a real FOP problem, try 
wrapping your URL in a CDATA block and it will most probably fix your issue.

 

something like this should work:



> FOP fails to generate pdf for certain URLS
> --
>
> Key: FOP-2783
> URL: https://issues.apache.org/jira/browse/FOP-2783
> Project: FOP
>  Issue Type: Bug
>  Components: fo/page
>Affects Versions: 2.2
>Reporter: magnus melwin
>Priority: Major
>
>  I have an issue with generating pdf files using the apache fop tool from url 
> based data, whenever there are certain characters or keywords such as utm or 
> rel as the below given url
> For example : 
> [https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]
>  
> I get the following error
> _{{SEVERE: Exception org.apache.fop.apps.FOPException: The reference to 
> entity "rel" must end with the ';' delimiter. 
> javax.xml.transform.TransformerException: The reference to entity "rel" must 
> end with the ';' delimiter.}}_
>  
>  
> My XML DATA FILE - mytest.xml contains:
> _{{[https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]}}_
>  
> {{My XSL TEMPLATE FILE - mytest.xsl contains}}
>  
> _{{  xmlns:xsl="http://www.w3.org/1999/XSL/Transform; 
> xmlns:fo="http://www.w3.org/1999/XSL/Format;>  indent="yes"/>
>  page-width="21.0cm" margin="2cm">   
>  }}_
> _{{}}_
> _{{  color="blue" text-decoration="underline">  
>  }}_
>  _{{}}_
> _{{}}_{{}}
>  
> {{Tested using bash commandline:}}
> {{myvar=mytest && /opt/fop-2.2/fop/fop -r -v -xml $myvar.xml -xsl $myvar.xsl 
> -pdf $myvar.pdf }}{{}}
> {{PDF generation fails ..generating using fop v2.2 on kali linux 2018 and 
> opensuse 42.3}}
>  
>  
> I have tried both encodings - UTF-8 and  encoding="ISO-8859-1" ...still no 
> luck. Any help will be appreciated here.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (FOP-2783) FOP fails to generate pdf for certain URLS

2018-04-16 Thread magnus melwin (JIRA)
magnus melwin created FOP-2783:
--

 Summary: FOP fails to generate pdf for certain URLS
 Key: FOP-2783
 URL: https://issues.apache.org/jira/browse/FOP-2783
 Project: FOP
  Issue Type: Bug
  Components: fo/page
Affects Versions: 2.2
Reporter: magnus melwin


I have an issue with generating pdf files using the apache fop tool from url 
based data, whenever there are certain characters or keywords such as utm or 
rel as the below given url

For example : 

[https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]

 

I get the following error

_{{SEVERE: Exception org.apache.fop.apps.FOPException: The reference to entity 
"rel" must end with the ';' delimiter. 
javax.xml.transform.TransformerException: The reference to entity "rel" must 
end with the ';' delimiter.}}_

 

 

My XML DATA FILE - mytest.xml contains:

_{{https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque}}_

 

{{My XSL TEMPLATE FILE - mytest.xsl contains}}

 

_{{ http://www.w3.org/1999/XSL/Transform; 
xmlns:fo="http://www.w3.org/1999/XSL/Format;> 
   
 }}_ 

_{{}}_ 

_{{   
     }}_

 _{{}}_ 

_{{}}_{{}}

 

{{Tested using bash commandline:}}

{{myvar=mytest && /opt/fop-2.2/fop/fop -r -v -xml $myvar.xml -xsl $myvar.xsl 
-pdf $myvar.pdf }}{{}}

{{PDF generation fails ..generating using fop v2.2 on kali linux 2018 and 
opensuse 42.3}}

 

 

I have tried both encodings - UTF-8 and  encoding="ISO-8859-1" ...still no 
luck. Any help will be appreciated here.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (FOP-2783) FOP fails to generate pdf for certain URLS

2018-04-16 Thread Luca Mambretti (JIRA)

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

Luca Mambretti edited comment on FOP-2783 at 4/16/18 7:48 AM:
--

To me this looks more like a source XML problem than a real FOP problem, try 
wrapping your URL in a CDATA block and it will most probably fix your issue.

 

something like this should work:




was (Author: irian):
To me this looks more like a source XML problem than a real FOP problem, try 
wrapping your URL in a CDATA block and it will most probably fix your issue.

 

something like this should work:



> FOP fails to generate pdf for certain URLS
> --
>
> Key: FOP-2783
> URL: https://issues.apache.org/jira/browse/FOP-2783
> Project: FOP
>  Issue Type: Bug
>  Components: fo/page
>Affects Versions: 2.2
>Reporter: magnus melwin
>Priority: Major
>
>  I have an issue with generating pdf files using the apache fop tool from url 
> based data, whenever there are certain characters or keywords such as utm or 
> rel as the below given url
> For example : 
> [https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]
>  
> I get the following error
> _{{SEVERE: Exception org.apache.fop.apps.FOPException: The reference to 
> entity "rel" must end with the ';' delimiter. 
> javax.xml.transform.TransformerException: The reference to entity "rel" must 
> end with the ';' delimiter.}}_
>  
>  
> My XML DATA FILE - mytest.xml contains:
> _{{[https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]}}_
>  
> {{My XSL TEMPLATE FILE - mytest.xsl contains}}
>  
> _{{  xmlns:xsl="http://www.w3.org/1999/XSL/Transform; 
> xmlns:fo="http://www.w3.org/1999/XSL/Format;>  indent="yes"/>
>  page-width="21.0cm" margin="2cm">   
>  }}_
> _{{}}_
> _{{  color="blue" text-decoration="underline">  
>  }}_
>  _{{}}_
> _{{}}_{{}}
>  
> {{Tested using bash commandline:}}
> {{myvar=mytest && /opt/fop-2.2/fop/fop -r -v -xml $myvar.xml -xsl $myvar.xsl 
> -pdf $myvar.pdf }}{{}}
> {{PDF generation fails ..generating using fop v2.2 on kali linux 2018 and 
> opensuse 42.3}}
>  
>  
> I have tried both encodings - UTF-8 and  encoding="ISO-8859-1" ...still no 
> luck. Any help will be appreciated here.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (FOP-2783) FOP fails to generate pdf for certain URLS

2018-04-16 Thread Luca Mambretti (JIRA)

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

Luca Mambretti edited comment on FOP-2783 at 4/16/18 7:48 AM:
--

To me this looks more like a source XML problem than a real FOP problem, try 
wrapping your URL in a CDATA block and it will most probably fix your issue.

 

something like this should work:




was (Author: irian):
To me this looks more like a source XML problem than a real FOP problem, try 
wrapping your URL in a CDATA block and it will most probably fix your issue.

 

something like this should work:



> FOP fails to generate pdf for certain URLS
> --
>
> Key: FOP-2783
> URL: https://issues.apache.org/jira/browse/FOP-2783
> Project: FOP
>  Issue Type: Bug
>  Components: fo/page
>Affects Versions: 2.2
>Reporter: magnus melwin
>Priority: Major
>
>  I have an issue with generating pdf files using the apache fop tool from url 
> based data, whenever there are certain characters or keywords such as utm or 
> rel as the below given url
> For example : 
> [https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]
>  
> I get the following error
> _{{SEVERE: Exception org.apache.fop.apps.FOPException: The reference to 
> entity "rel" must end with the ';' delimiter. 
> javax.xml.transform.TransformerException: The reference to entity "rel" must 
> end with the ';' delimiter.}}_
>  
>  
> My XML DATA FILE - mytest.xml contains:
> _{{[https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]}}_
>  
> {{My XSL TEMPLATE FILE - mytest.xsl contains}}
>  
> _{{  xmlns:xsl="http://www.w3.org/1999/XSL/Transform; 
> xmlns:fo="http://www.w3.org/1999/XSL/Format;>  indent="yes"/>
>  page-width="21.0cm" margin="2cm">   
>  }}_
> _{{}}_
> _{{  color="blue" text-decoration="underline">  
>  }}_
>  _{{}}_
> _{{}}_{{}}
>  
> {{Tested using bash commandline:}}
> {{myvar=mytest && /opt/fop-2.2/fop/fop -r -v -xml $myvar.xml -xsl $myvar.xsl 
> -pdf $myvar.pdf }}{{}}
> {{PDF generation fails ..generating using fop v2.2 on kali linux 2018 and 
> opensuse 42.3}}
>  
>  
> I have tried both encodings - UTF-8 and  encoding="ISO-8859-1" ...still no 
> luck. Any help will be appreciated here.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FOP-2783) FOP fails to generate pdf for certain URLS

2018-04-16 Thread magnus melwin (JIRA)

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

magnus melwin commented on FOP-2783:


Tried that too...still fails with same error, wrapped the text in quotes 
too...stil the same. Thanks for the suggestion though.

  
![CDATA["https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque;]]
 

> FOP fails to generate pdf for certain URLS
> --
>
> Key: FOP-2783
> URL: https://issues.apache.org/jira/browse/FOP-2783
> Project: FOP
>  Issue Type: Bug
>  Components: fo/page
>Affects Versions: 2.2
>Reporter: magnus melwin
>Priority: Major
>
>  I have an issue with generating pdf files using the apache fop tool from url 
> based data, whenever there are certain characters or keywords such as utm or 
> rel as the below given url
> For example : 
> [https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]
>  
> I get the following error
> _{{SEVERE: Exception org.apache.fop.apps.FOPException: The reference to 
> entity "rel" must end with the ';' delimiter. 
> javax.xml.transform.TransformerException: The reference to entity "rel" must 
> end with the ';' delimiter.}}_
>  
>  
> My XML DATA FILE - mytest.xml contains:
> _{{[https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]}}_
>  
> {{My XSL TEMPLATE FILE - mytest.xsl contains}}
>  
> _{{  xmlns:xsl="http://www.w3.org/1999/XSL/Transform; 
> xmlns:fo="http://www.w3.org/1999/XSL/Format;>  indent="yes"/>
>  page-width="21.0cm" margin="2cm">   
>  }}_
> _{{}}_
> _{{  color="blue" text-decoration="underline">  
>  }}_
>  _{{}}_
> _{{}}_{{}}
>  
> {{Tested using bash commandline:}}
> {{myvar=mytest && /opt/fop-2.2/fop/fop -r -v -xml $myvar.xml -xsl $myvar.xsl 
> -pdf $myvar.pdf }}{{}}
> {{PDF generation fails ..generating using fop v2.2 on kali linux 2018 and 
> opensuse 42.3}}
>  
>  
> I have tried both encodings - UTF-8 and  encoding="ISO-8859-1" ...still no 
> luck. Any help will be appreciated here.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (FOP-2738) ArrayIndexOutOfBoundsException in GlyphMapping.addToLetterAdjust

2018-04-16 Thread Vlad Ivanov (JIRA)

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

Vlad Ivanov resolved FOP-2738.
--
   Resolution: Fixed
Fix Version/s: trunk

Not reproducible on trunk version.

> ArrayIndexOutOfBoundsException in GlyphMapping.addToLetterAdjust
> 
>
> Key: FOP-2738
> URL: https://issues.apache.org/jira/browse/FOP-2738
> Project: FOP
>  Issue Type: Bug
>  Components: fo/inline
>Affects Versions: 2.2
> Environment: Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
> Windows
>Reporter: Vlad Ivanov
>Priority: Major
> Fix For: trunk
>
> Attachments: fop.conf, fop1.fo, image.svg
>
>
> The following exception happens while rendering to a PDF file:
> {code}
>   [fop] SEVERE: SVG graphic could not be rendered. Reason: 
> java.lang.ArrayIndexOutOfBoundsException: 5
>   [fop] java.lang.ArrayIndexOutOfBoundsException: 5
>   [fop] at 
> org.apache.fop.fonts.GlyphMapping.addToLetterAdjust(GlyphMapping.java:286)
>   [fop] at 
> org.apache.fop.fonts.GlyphMapping.processWordNoMapping(GlyphMapping.java:248)
>   [fop] at 
> org.apache.fop.fonts.GlyphMapping.doGlyphMapping(GlyphMapping.java:93)
>   [fop] at 
> org.apache.fop.svg.font.FOPGVTGlyphVector.performDefaultLayout(FOPGVTGlyphVector.java:94)
>   [fop] at 
> org.apache.batik.bridge.GlyphLayout.doExplicitGlyphLayout(Unknown Source)
>   [fop] at 
> org.apache.batik.bridge.GlyphLayout.adjustTextSpacing(Unknown Source)
>   [fop] at org.apache.batik.bridge.GlyphLayout.getAdvance2D(Unknown 
> Source)
>   [fop] at 
> org.apache.batik.bridge.StrokingTextPainter.getTextChunk(Unknown Source)
>   [fop] at 
> org.apache.batik.bridge.StrokingTextPainter.computeTextRuns(Unknown Source)
>   [fop] at 
> org.apache.fop.svg.NativeTextPainter.computeTextRuns(NativeTextPainter.java:223)
>   [fop] at 
> org.apache.batik.bridge.StrokingTextPainter.getTextRuns(Unknown Source)
>   [fop] at 
> org.apache.batik.bridge.StrokingTextPainter.getBounds2D(Unknown Source)
>   [fop] at 
> org.apache.batik.bridge.TextNode.getPrimitiveBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds(Unknown
>  Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown
>  Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown
>  Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getBounds(Unknown Source)
>   [fop] at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown 
> Source)
>   [fop] at 
> org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:208)
>   [fop] at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
>   [fop] at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
>   [fop] at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
>   [fop] at 
> org.apache.fop.render.pdf.PDFPainter.drawImageUsingURI(PDFPainter.java:215)
>   [fop] at 
> org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:180)
>   [fop] at 
> org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1296)
>   [fop] at 
> org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1283)
>   [fop] at 
> org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:858)
>   [fop] at 
> org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:832)
>   [fop] at 
> org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:864)
>   [fop] at 
> org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:715)
>   [fop] at 
> org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:928)
>   [fop] at 
> 

[jira] [Updated] (FOP-2783) FOP fails to generate pdf for certain URLS

2018-04-16 Thread magnus melwin (JIRA)

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

magnus melwin updated FOP-2783:
---
Description: 
 I have an issue with generating pdf files using the apache fop tool from url 
based data, whenever there are certain characters or keywords such as utm or 
rel as the below given url

For example : 

[https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]

 

I get the following error

_{{SEVERE: Exception org.apache.fop.apps.FOPException: The reference to entity 
"rel" must end with the ';' delimiter. 
javax.xml.transform.TransformerException: The reference to entity "rel" must 
end with the ';' delimiter.}}_

 

 

My XML DATA FILE - mytest.xml contains:

_{{[https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]}}_

 

{{My XSL TEMPLATE FILE - mytest.xsl contains}}

 

_{{ http://www.w3.org/1999/XSL/Transform; 
xmlns:fo="http://www.w3.org/1999/XSL/Format;> 
   
 }}_

_{{}}_

_{{   
     }}_

 _{{}}_

_{{}}_{{}}

 

{{Tested using bash commandline:}}

{{myvar=mytest && /opt/fop-2.2/fop/fop -r -v -xml $myvar.xml -xsl $myvar.xsl 
-pdf $myvar.pdf }}{{}}

{{PDF generation fails ..generating using fop v2.2 on kali linux 2018 and 
opensuse 42.3}}

 

 

I have tried both encodings - UTF-8 and  encoding="ISO-8859-1" ...still no 
luck. Any help will be appreciated here.

 

  was:
I have an issue with generating pdf files using the apache fop tool from url 
based data, whenever there are certain characters or keywords such as utm or 
rel as the below given url

For example : 

[https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]

 

I get the following error

_{{SEVERE: Exception org.apache.fop.apps.FOPException: The reference to entity 
"rel" must end with the ';' delimiter. 
javax.xml.transform.TransformerException: The reference to entity "rel" must 
end with the ';' delimiter.}}_

 

 

My XML DATA FILE - mytest.xml contains:

_{{https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque}}_

 

{{My XSL TEMPLATE FILE - mytest.xsl contains}}

 

_{{ http://www.w3.org/1999/XSL/Transform; 
xmlns:fo="http://www.w3.org/1999/XSL/Format;> 
   
 }}_ 

_{{}}_ 

_{{   
     }}_

 _{{}}_ 

_{{}}_{{}}

 

{{Tested using bash commandline:}}

{{myvar=mytest && /opt/fop-2.2/fop/fop -r -v -xml $myvar.xml -xsl $myvar.xsl 
-pdf $myvar.pdf }}{{}}

{{PDF generation fails ..generating using fop v2.2 on kali linux 2018 and 
opensuse 42.3}}

 

 

I have tried both encodings - UTF-8 and  encoding="ISO-8859-1" ...still no 
luck. Any help will be appreciated here.

 


> FOP fails to generate pdf for certain URLS
> --
>
> Key: FOP-2783
> URL: https://issues.apache.org/jira/browse/FOP-2783
> Project: FOP
>  Issue Type: Bug
>  Components: fo/page
>Affects Versions: 2.2
>Reporter: magnus melwin
>Priority: Major
>
>  I have an issue with generating pdf files using the apache fop tool from url 
> based data, whenever there are certain characters or keywords such as utm or 
> rel as the below given url
> For example : 
> [https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]
>  
> I get the following error
> _{{SEVERE: Exception org.apache.fop.apps.FOPException: The reference to 
> entity "rel" must end with the ';' delimiter. 
> javax.xml.transform.TransformerException: The reference to entity "rel" must 
> end with the ';' delimiter.}}_
>  
>  
> My XML DATA FILE - mytest.xml contains:
> _{{[https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]}}_
>  
> {{My XSL TEMPLATE FILE - mytest.xsl contains}}
>  
> _{{  xmlns:xsl="http://www.w3.org/1999/XSL/Transform; 
> xmlns:fo="http://www.w3.org/1999/XSL/Format;>  indent="yes"/>
>  page-width="21.0cm" margin="2cm">   
>  }}_
> _{{}}_
> _{{  color="blue" text-decoration="underline">  
>  }}_
>  _{{}}_
> _{{}}_{{}}
>  
> {{Tested using bash commandline:}}
> {{myvar=mytest && /opt/fop-2.2/fop/fop -r -v -xml $myvar.xml -xsl $myvar.xsl 
> -pdf $myvar.pdf }}{{}}
> {{PDF generation fails ..generating using fop v2.2 on kali linux 2018 and 
> opensuse 42.3}}
>  
>  
> I have tried both encodings - UTF-8 and  encoding="ISO-8859-1" ...still no 
> luck. Any help will be appreciated here.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FOP-2738) ArrayIndexOutOfBoundsException in GlyphMapping.addToLetterAdjust

2018-04-16 Thread Vlad Ivanov (JIRA)

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

Vlad Ivanov commented on FOP-2738:
--

No longer reproducible on latest SVN revision (1829046).

> ArrayIndexOutOfBoundsException in GlyphMapping.addToLetterAdjust
> 
>
> Key: FOP-2738
> URL: https://issues.apache.org/jira/browse/FOP-2738
> Project: FOP
>  Issue Type: Bug
>  Components: fo/inline
>Affects Versions: 2.2
> Environment: Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
> Windows
>Reporter: Vlad Ivanov
>Priority: Major
> Fix For: trunk
>
> Attachments: fop.conf, fop1.fo, image.svg
>
>
> The following exception happens while rendering to a PDF file:
> {code}
>   [fop] SEVERE: SVG graphic could not be rendered. Reason: 
> java.lang.ArrayIndexOutOfBoundsException: 5
>   [fop] java.lang.ArrayIndexOutOfBoundsException: 5
>   [fop] at 
> org.apache.fop.fonts.GlyphMapping.addToLetterAdjust(GlyphMapping.java:286)
>   [fop] at 
> org.apache.fop.fonts.GlyphMapping.processWordNoMapping(GlyphMapping.java:248)
>   [fop] at 
> org.apache.fop.fonts.GlyphMapping.doGlyphMapping(GlyphMapping.java:93)
>   [fop] at 
> org.apache.fop.svg.font.FOPGVTGlyphVector.performDefaultLayout(FOPGVTGlyphVector.java:94)
>   [fop] at 
> org.apache.batik.bridge.GlyphLayout.doExplicitGlyphLayout(Unknown Source)
>   [fop] at 
> org.apache.batik.bridge.GlyphLayout.adjustTextSpacing(Unknown Source)
>   [fop] at org.apache.batik.bridge.GlyphLayout.getAdvance2D(Unknown 
> Source)
>   [fop] at 
> org.apache.batik.bridge.StrokingTextPainter.getTextChunk(Unknown Source)
>   [fop] at 
> org.apache.batik.bridge.StrokingTextPainter.computeTextRuns(Unknown Source)
>   [fop] at 
> org.apache.fop.svg.NativeTextPainter.computeTextRuns(NativeTextPainter.java:223)
>   [fop] at 
> org.apache.batik.bridge.StrokingTextPainter.getTextRuns(Unknown Source)
>   [fop] at 
> org.apache.batik.bridge.StrokingTextPainter.getBounds2D(Unknown Source)
>   [fop] at 
> org.apache.batik.bridge.TextNode.getPrimitiveBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds(Unknown
>  Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown
>  Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds(Unknown
>  Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds(Unknown Source)
>   [fop] at 
> org.apache.batik.gvt.AbstractGraphicsNode.getBounds(Unknown Source)
>   [fop] at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown 
> Source)
>   [fop] at 
> org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:208)
>   [fop] at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
>   [fop] at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
>   [fop] at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
>   [fop] at 
> org.apache.fop.render.pdf.PDFPainter.drawImageUsingURI(PDFPainter.java:215)
>   [fop] at 
> org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:180)
>   [fop] at 
> org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1296)
>   [fop] at 
> org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1283)
>   [fop] at 
> org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:858)
>   [fop] at 
> org.apache.fop.render.AbstractPathOrientedRenderer.renderInlineViewport(AbstractPathOrientedRenderer.java:832)
>   [fop] at 
> org.apache.fop.render.intermediate.IFRenderer.renderInlineViewport(IFRenderer.java:864)
>   [fop] at 
> org.apache.fop.render.AbstractRenderer.renderInlineArea(AbstractRenderer.java:715)
>   [fop] at 
> org.apache.fop.render.intermediate.IFRenderer.renderInlineArea(IFRenderer.java:928)
>   [fop] 

[jira] [Closed] (FOP-2783) FOP fails to generate pdf for certain URLS

2018-04-16 Thread magnus melwin (JIRA)

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

magnus melwin closed FOP-2783.
--
Resolution: Fixed

> FOP fails to generate pdf for certain URLS
> --
>
> Key: FOP-2783
> URL: https://issues.apache.org/jira/browse/FOP-2783
> Project: FOP
>  Issue Type: Bug
>  Components: fo/page
>Affects Versions: 2.2
>Reporter: magnus melwin
>Priority: Major
>
>  I have an issue with generating pdf files using the apache fop tool from url 
> based data, whenever there are certain characters or keywords such as utm or 
> rel as the below given url
> For example : 
> [https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]
>  
> I get the following error
> _{{SEVERE: Exception org.apache.fop.apps.FOPException: The reference to 
> entity "rel" must end with the ';' delimiter. 
> javax.xml.transform.TransformerException: The reference to entity "rel" must 
> end with the ';' delimiter.}}_
>  
>  
> My XML DATA FILE - mytest.xml contains:
> _{{[https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]}}_
>  
> {{My XSL TEMPLATE FILE - mytest.xsl contains}}
>  
> _{{  xmlns:xsl="http://www.w3.org/1999/XSL/Transform; 
> xmlns:fo="http://www.w3.org/1999/XSL/Format;>  indent="yes"/>
>  page-width="21.0cm" margin="2cm">   
>  }}_
> _{{}}_
> _{{  color="blue" text-decoration="underline">  
>  }}_
>  _{{}}_
> _{{}}_{{}}
>  
> {{Tested using bash commandline:}}
> {{myvar=mytest && /opt/fop-2.2/fop/fop -r -v -xml $myvar.xml -xsl $myvar.xsl 
> -pdf $myvar.pdf }}{{}}
> {{PDF generation fails ..generating using fop v2.2 on kali linux 2018 and 
> opensuse 42.3}}
>  
>  
> I have tried both encodings - UTF-8 and  encoding="ISO-8859-1" ...still no 
> luck. Any help will be appreciated here.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (FOP-2478) Incorrect position of block-container with fixed absolute-position

2018-04-16 Thread Daniel Norberg (JIRA)

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

Daniel Norberg commented on FOP-2478:
-

I am using FOP 2.2 and this still seem buggy.

When I test it I find the inconsistent behavior isolated to the bottom and 
right attributes. top and left seems to work as expected.

Br,

Daniel

> Incorrect position of block-container with fixed absolute-position
> --
>
> Key: FOP-2478
> URL: https://issues.apache.org/jira/browse/FOP-2478
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 1.1, 2.0, trunk
>Reporter: Jan Tošovský
>Priority: Major
> Attachments: block-container-fop.pdf, block-container-xep.pdf, 
> block-container.fo
>
>
> In the attached example there is specified a distance of 180 mm between the 
> bottom edge of block-container and bottom edge of the page. However, in FOP 
> output this distance is different, bigger. Like both top and bottom margins 
> (2x15 mm) would be added to this dimension.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (FOP-2784) [PATCH] FOP-2738: correct array offset when string span interator is used

2018-04-16 Thread Vlad Ivanov (JIRA)
Vlad Ivanov created FOP-2784:


 Summary: [PATCH] FOP-2738: correct array offset when string span 
interator is used
 Key: FOP-2784
 URL: https://issues.apache.org/jira/browse/FOP-2784
 Project: FOP
  Issue Type: Improvement
  Components: font/unqualified
Affects Versions: 2.2
Reporter: Vlad Ivanov
 Attachments: 
0001-FOP-2738-correct-array-offset-when-string-span-inter.patch, fop.conf, 
fop1.fo, image.svg

This patch fixes FOP-2738.

The issue occurred when code in GlyphMapping.java was used with string span 
iterator. This kind of iterator points somewhere in the string, not necessarily 
the start; however, iterator indexes were used to index into an array, which 
caused an exception in some cases. Fix removes iterator index offset in 
addLetterAdjust.

Reproducing:

{code}
fop -c fop.conf fop1.fo fop1.pdf
{code}





--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (FOP-2783) FOP fails to generate pdf for certain URLS

2018-04-16 Thread magnus melwin (JIRA)

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

magnus melwin edited comment on FOP-2783 at 4/16/18 9:22 AM:
-

Tried that ...works perfectly fine  Thanks Luca.

 


was (Author: magnusmel):
Tried that too...still fails with same error, wrapped the text in quotes 
too...stil the same. Thanks for the suggestion though.

  
![CDATA["https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque;]]
 

> FOP fails to generate pdf for certain URLS
> --
>
> Key: FOP-2783
> URL: https://issues.apache.org/jira/browse/FOP-2783
> Project: FOP
>  Issue Type: Bug
>  Components: fo/page
>Affects Versions: 2.2
>Reporter: magnus melwin
>Priority: Major
>
>  I have an issue with generating pdf files using the apache fop tool from url 
> based data, whenever there are certain characters or keywords such as utm or 
> rel as the below given url
> For example : 
> [https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]
>  
> I get the following error
> _{{SEVERE: Exception org.apache.fop.apps.FOPException: The reference to 
> entity "rel" must end with the ';' delimiter. 
> javax.xml.transform.TransformerException: The reference to entity "rel" must 
> end with the ';' delimiter.}}_
>  
>  
> My XML DATA FILE - mytest.xml contains:
> _{{[https://www.youtube.com/embed/1mDT-x2XnEg?autoplay=1=0=oembed=1=opaque]}}_
>  
> {{My XSL TEMPLATE FILE - mytest.xsl contains}}
>  
> _{{  xmlns:xsl="http://www.w3.org/1999/XSL/Transform; 
> xmlns:fo="http://www.w3.org/1999/XSL/Format;>  indent="yes"/>
>  page-width="21.0cm" margin="2cm">   
>  }}_
> _{{}}_
> _{{  color="blue" text-decoration="underline">  
>  }}_
>  _{{}}_
> _{{}}_{{}}
>  
> {{Tested using bash commandline:}}
> {{myvar=mytest && /opt/fop-2.2/fop/fop -r -v -xml $myvar.xml -xsl $myvar.xsl 
> -pdf $myvar.pdf }}{{}}
> {{PDF generation fails ..generating using fop v2.2 on kali linux 2018 and 
> opensuse 42.3}}
>  
>  
> I have tried both encodings - UTF-8 and  encoding="ISO-8859-1" ...still no 
> luck. Any help will be appreciated here.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)