[jira] [Commented] (FOP-2469) [PATCH] auto table layout

2015-06-16 Thread Gregor Berg (JIRA)

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

Gregor Berg commented on FOP-2469:
--

In the width determination, having one table is quite simple and 
straight-forward: collect minIPD and IPD and, if the sum of IPDs is greater 
than the available space: redistribute until each column has an individual 
optimal value opt for which holds: minIPD<=opt<=IPD (for each column's 
respective pair of minIPD and IPD!).

In case we have to deal with nested tables, things get much more complicated 
mainly due to the fact that we cannot know the minIPD of the 'outside' table 
without determining the minIPD of the 'inside' table (which is the sum of all 
column's minIPD + indentations). If, e.g., the outer table is fixed, has a 
width of 100pt and two columns, both columns would have a 'hard refIPD' of 
50pt, which is set for all the outer table's TableCellLMs. If another table, 
which has a minIPD of 51pt, is contained in one of these table cells an 
overflow will occur since FOP cannot shrink the inner table any more.

HOWEVER, if the outer table itself is contained in a table with auto-layout, 
its 'hard refIPF' is subject to change depending on how wide the column of the 
auto table will be. In these cases, the innermost table's minIPD is set as 
minIPD of the middle/fixed table's TableCellLM, which in turn may influence the 
minIPD of the outer auto table. Essentially, FOP needs to derive appropriate 
minIPD values for all containers - while it starts from the top, FOP has to 
drill down into each atomic unit and, if one of its parents uses auto-layout, 
propagate its minIPD bottom-up.
During this process, ipd values may be smaller than minIPD values - this should 
be handled by increasing the ipd value which, in turn, is propagated via 
context.setRefIPD():
{code:title=TableLayoutManager.getNextKnuthElements()|borderStyle=solid}
referenceIPD = context.getRefIPD();
// ... 
final int ipd = childLC.getRefIPD();
if (currentChildLM instanceof LineLayoutManager) {
if (getContentAreaIPD() < ipd && (isAutoLayout() || 
context.isChildOfAutoLayoutElement())) {
this.referenceIPD = this.startIndent + ipd + this.endIndent;
updateContentAreaIPDwithOverconstrainedAdjust();
context.setRefIPD(this.referenceIPD);
}
} else if (this.referenceIPD < ipd && (isAutoLayout() || 
context.isChildOfAutoLayoutElement())) {
this.referenceIPD = ipd;
updateContentAreaIPDwithOverconstrainedAdjust();
context.setRefIPD(this.referenceIPD);
}
{code}

So, while it should not occur, it is technically possible that a PGU's 
TableCellLM has an ipd which is less than its minIPD.
*Possible cause are:* the TableCellLM's ipd was not increased after the 
TableCellLM's content was determined to require more space _or_ the PGU's 
minIPD was calculated incorrectly.
The latter happened for me which is why you can find this crude correction as 
well:
{code:title=TableLayoutManager.setBaseLength()|borderStyle=solid}
if ((availableSpanWidth == 0) || (length == null)) {
// TODO: remove the following IF as soon as the computation of minIPD is 
corrected
if (minIPD > ipd) {// happens e.g. for cells containing a space: ipd=0, 
minIPD=len(" ")
ipd = minIPD;
} // ...
}
{code}
Looking at this assignment and the _if_ clause above - it may also be the case 
that your code bypasses this first assignment and goes straight to _else_. In 
this case, it may be worth a try to put this corrective assignment even before 
the first _if_ to ensure that the minIPD value (the least amount of space this 
LM needs) is the one which FOP propagates to from this LM upwards.
I hope this helps to solve the problem.

> [PATCH] auto table layout
> -
>
> Key: FOP-2469
> URL: https://issues.apache.org/jira/browse/FOP-2469
> Project: FOP
>  Issue Type: Bug
>  Components: layout/unqualified
>Affects Versions: trunk
> Environment: Windows 7, JDK 7
>Reporter: Gregor Berg
>Assignee: Andreas L. Delmelle
> Fix For: trunk
>
> Attachments: 2015-05-13-auto-table-layout.patch, 
> 2015-05-27-LM-to-LC-refactoring.patch, 
> 2015-06-09-LM-to-LC-refactoring-update.patch, FOP2469-auto-table-layout.xml, 
> LayoutContext_Tweak.diff, resize-all-but-static-spanned-columns.xml, 
> resize-spanned-columns.xml, warning-only-static-columns-are-spanned.xml
>
>
> Hi,
> this is a patch which enables table-layout=auto. It is quite robust, it can 
> not only handle linebreaks and pagebreaks, but it also copes with auto tables 
> in fixed tables in auto tables.
> Essentially, it is the patch of issue FOP-2450 adapted to the trunk version 
> of FOP.
> Best regards,
> Gregor



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (FOP-2490) Embedded SVG 1.2 not supported by FOP 2.0

2015-06-16 Thread Hussein Shafie (JIRA)

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

Hussein Shafie updated FOP-2490:

Description: 
h4. Embedded SVG 1.2 not supported by FOP 2.0

How to reproduce the problem (see attached files)

fop -fo __doc.fo -pdf __doc.pdf

Running this command fails with:
{noformat}
org.w3c.dom.DOMException: The current document is unable to create an element 
of the requested type (namespace: http://www.w3.org/2000/svg, name: 
svg:flowRoot).
at org.apache.batik.dom.AbstractNode.createDOMException(Unknown Source)
at 
org.apache.batik.anim.dom.SVGDOMImplementation.createElementNS(Unknown Source)
at org.apache.batik.anim.dom.SVGOMDocument.createElementNS(Unknown 
Source)
at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:324)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
at 
org.apache.fop.util.DelegatingContentHandler.startElement(DelegatingContentHandler.java:185)
at 
org.apache.fop.fo.extensions.svg.SVGDOMContentHandlerFactory$Handler.startElement(SVGDOMContentHandlerFactory.java:137)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
{noformat}

The expected result is EXPECTED__doc.pdf

My workaround:

In org/apache/fop/fo/extensions/svg/SVGDOMContentHandlerFactory.java, 
I've replaced:

{noformat}
private DOMImplementation getDOMImplementation(String ver) {
//TODO It would be great if Batik provided this method as static 
helper method.
if (ver == null || ver.length() == 0
|| ver.equals("1.0") || ver.equals("1.1")) {
return SVGDOMImplementation.getDOMImplementation();
} else if (ver.equals("1.2")) {
try {
Class clazz = Class.forName(

"org.apache.batik.dom.svg12.SVG12DOMImplementation");
return (DOMImplementation)clazz.getMethod(
"getDOMImplementation", (Class[])null).invoke(null, 
(Object[])null);
} catch (Exception e) {
return SVGDOMImplementation.getDOMImplementation();
}
}
throw new RuntimeException("Unsupport SVG version '" + ver + "'");
}
{noformat}

by:

{noformat}
import org.apache.batik.anim.dom.SVG12DOMImplementation;

private DOMImplementation getDOMImplementation(String ver) {
//TODO It would be great if Batik provided this method as static 
helper method.
if (ver == null || ver.length() == 0
|| ver.equals("1.0") || ver.equals("1.1")) {
return SVGDOMImplementation.getDOMImplementation();
} else if (ver.equals("1.2")) {
return SVG12DOMImplementation.getDOMImplementation();
}
throw new RuntimeException("Unsupport SVG version '" + ver + "'");
}
{noformat}

org.apache.batik.anim.dom.SVG12DOMImplementation is always 
included in Batik-1.8-all.jar. Even if you prefer to keep Class.forName(), 
please note that org.apache.batik.dom.svg12.SVG12DOMImplementation 
no longer exists in Batik 1.8.



  was:
How to reproduce the problem (see attached files)

fop -fo __doc.fo -pdf __doc.pdf

Running this command fails with:
{noformat}
org.w3c.dom.DOMException: The current document is unable to create an element 
of the requested type (namespace: http://www.w3.org/2000/svg, name: 
svg:flowRoot).
at org.apache.batik.dom.AbstractNode.createDOMException(Unknown Source)
at 
org.apache.batik.anim.dom.SVGDOMImplementation.createElementNS(Unknown Source)
at org.apache.batik.anim.dom.SVGOMDocument.createElementNS(Unknown 
Source)
at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:324)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
at 
org.apache.fop.util.DelegatingContentHandler.startElement(DelegatingContentHandler.java:185)
at 
org.apache.fop.fo.extensions.svg.SVGDOMContentHandlerFactory$Handler.startElement(SVGDOMContentHandlerFactory.java:137)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
{noformat}

The expected result is EXPECTED__doc.pdf

My workaround:

In org/apache/fop/fo/extensions/svg/SVGDOMContentHandlerFactory.java, 
I've replaced:

{noformat}
private DOMImplementation getDOMImplementation(String ver) {
//TODO It would be great if Batik provided this method as static 
helper method.
if (ver == null || ver.length() == 0
|| 

[jira] [Updated] (FOP-2489) An SVG file using markers is not rendered by FOP 2.0

2015-06-16 Thread Hussein Shafie (JIRA)

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

Hussein Shafie updated FOP-2489:

Description: 
h4. An SVG file using markers is not rendered by FOP 2.0

How to reproduce the problem (see attached files)

fop -fo __doc.fo -pdf __doc.pdf

Running this command reports:
{noformat}
SEVERE: SVG graphic could not be built. Reason: 
org.apache.batik.bridge.BridgeException: resources/resources/header_layout.svg 
(No such file or directory)
org.apache.batik.bridge.BridgeException: resources/resources/header_layout.svg 
(No such file or directory)
at org.apache.batik.bridge.BridgeContext.getReferencedNode(Unknown 
Source)
at org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown 
Source)
at org.apache.batik.bridge.PaintServer.convertMarker(Unknown Source)
at org.apache.batik.bridge.PaintServer.convertMarkers(Unknown Source)
at 
org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createMarkerPainter(Unknown
 Source)
at 
org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createShapePainter(Unknown
 Source)
at 
org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
at 
org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:103)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingURI(AbstractIFPainter.java:292)
at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:173)
at 
org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1295)
at 
org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1282)
at 
org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:858)
{noformat}

The expected result is EXPECTED__doc.pdf

My workaround:

To resolve URLs such as "marker-start:url(#TriangleInM)", Batik 1.8 needs 
to know the URL of the SVG document it processes.

Therefore in org/apache/fop/apps/FOUserAgent.java, I've replaced:

{noformat}
public StreamSource resolveURI(String uri) {
// TODO: What do we want to do when resources aren't found??? We also 
need to remove this
// method entirely
try {
// Have to do this so we can resolve data URIs
StreamSource src = new 
StreamSource(resourceResolver.getResource(uri));
src.setSystemId(uri);
return src;
} catch (URISyntaxException use) {
return null;
} catch (IOException ioe) {
return null;
}
}
{noformat}

by:

{noformat}
public StreamSource resolveURI(String uri) {
// TODO: What do we want to do when resources aren't found??? We also 
need to remove this
// method entirely
try {
// Have to do this so we can resolve data URIs
StreamSource src = new 
StreamSource(resourceResolver.getResource(uri));

// A systemId is always expected to be absolute.
// Anyway, without this, SVG files using markers 
// (e.g. marker-start:url(#TriangleInM)) cannot be rendered.

if (!uri.startsWith("data:")) {
uri = 
resourceResolver.getBaseURI().resolve(uri).toASCIIString();
}

src.setSystemId(uri);
return src;
} catch (URISyntaxException use) {
return null;
} catch (IOException ioe) {
return null;
}
}
{noformat}


  was:
An SVG file using markers is not rendered by FOP 2.0


How to reproduce the problem (see attached files)

fop -fo __doc.fo -pdf __doc.pdf

Running this command reports:
{noformat}
SEVERE: SVG graphic could not be built. Reason: 
org.apache.batik.bridge.BridgeException: resources/resources/header_layout.svg 
(No such file or directory)
org.apache.batik.bridge.BridgeException: resources/resources/header_layout.svg 
(No such file or directory)
at org.apache.batik.bridge.BridgeContext.ge

[jira] [Updated] (FOP-2489) An SVG file using markers is not rendered by FOP 2.0

2015-06-16 Thread Hussein Shafie (JIRA)

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

Hussein Shafie updated FOP-2489:

Description: 
An SVG file using markers is not rendered by FOP 2.0


How to reproduce the problem (see attached files)

fop -fo __doc.fo -pdf __doc.pdf

Running this command reports:
{noformat}
SEVERE: SVG graphic could not be built. Reason: 
org.apache.batik.bridge.BridgeException: resources/resources/header_layout.svg 
(No such file or directory)
org.apache.batik.bridge.BridgeException: resources/resources/header_layout.svg 
(No such file or directory)
at org.apache.batik.bridge.BridgeContext.getReferencedNode(Unknown 
Source)
at org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown 
Source)
at org.apache.batik.bridge.PaintServer.convertMarker(Unknown Source)
at org.apache.batik.bridge.PaintServer.convertMarkers(Unknown Source)
at 
org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createMarkerPainter(Unknown
 Source)
at 
org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createShapePainter(Unknown
 Source)
at 
org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
at 
org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:103)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingURI(AbstractIFPainter.java:292)
at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:173)
at 
org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1295)
at 
org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1282)
at 
org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:858)
{noformat}

The expected result is EXPECTED__doc.pdf

My workaround:

To resolve URLs such as "marker-start:url(#TriangleInM)", Batik 1.8 needs 
to know the URL of the SVG document it processes.

Therefore in org/apache/fop/apps/FOUserAgent.java, I've replaced:

{noformat}
public StreamSource resolveURI(String uri) {
// TODO: What do we want to do when resources aren't found??? We also 
need to remove this
// method entirely
try {
// Have to do this so we can resolve data URIs
StreamSource src = new 
StreamSource(resourceResolver.getResource(uri));
src.setSystemId(uri);
return src;
} catch (URISyntaxException use) {
return null;
} catch (IOException ioe) {
return null;
}
}
{noformat}

by:

{noformat}
public StreamSource resolveURI(String uri) {
// TODO: What do we want to do when resources aren't found??? We also 
need to remove this
// method entirely
try {
// Have to do this so we can resolve data URIs
StreamSource src = new 
StreamSource(resourceResolver.getResource(uri));

// A systemId is always expected to be absolute.
// Anyway, without this, SVG files using markers 
// (e.g. marker-start:url(#TriangleInM)) cannot be rendered.

if (!uri.startsWith("data:")) {
uri = 
resourceResolver.getBaseURI().resolve(uri).toASCIIString();
}

src.setSystemId(uri);
return src;
} catch (URISyntaxException use) {
return null;
} catch (IOException ioe) {
return null;
}
}
{noformat}


  was:
An SVG file using markers is not rendered by FOP 2.0


How to reproduce the problem (see attached files)

fop -fo __doc.fo -pdf __doc.pdf

Running this command reports:
---
SEVERE: SVG graphic could not be built. Reason: 
org.apache.batik.bridge.BridgeException: resources/resources/header_layout.svg 
(No such file or directory)
org.apache.batik.bridge.BridgeException: resources/resources/header_layout.svg 
(No such file or directory)
a

[jira] [Updated] (FOP-2490) Embedded SVG 1.2 not supported by FOP 2.0

2015-06-16 Thread Hussein Shafie (JIRA)

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

Hussein Shafie updated FOP-2490:

Description: 
How to reproduce the problem (see attached files)

fop -fo __doc.fo -pdf __doc.pdf

Running this command fails with:
{noformat}
org.w3c.dom.DOMException: The current document is unable to create an element 
of the requested type (namespace: http://www.w3.org/2000/svg, name: 
svg:flowRoot).
at org.apache.batik.dom.AbstractNode.createDOMException(Unknown Source)
at 
org.apache.batik.anim.dom.SVGDOMImplementation.createElementNS(Unknown Source)
at org.apache.batik.anim.dom.SVGOMDocument.createElementNS(Unknown 
Source)
at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:324)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
at 
org.apache.fop.util.DelegatingContentHandler.startElement(DelegatingContentHandler.java:185)
at 
org.apache.fop.fo.extensions.svg.SVGDOMContentHandlerFactory$Handler.startElement(SVGDOMContentHandlerFactory.java:137)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
{noformat}

The expected result is EXPECTED__doc.pdf

My workaround:

In org/apache/fop/fo/extensions/svg/SVGDOMContentHandlerFactory.java, 
I've replaced:

{noformat}
private DOMImplementation getDOMImplementation(String ver) {
//TODO It would be great if Batik provided this method as static 
helper method.
if (ver == null || ver.length() == 0
|| ver.equals("1.0") || ver.equals("1.1")) {
return SVGDOMImplementation.getDOMImplementation();
} else if (ver.equals("1.2")) {
try {
Class clazz = Class.forName(

"org.apache.batik.dom.svg12.SVG12DOMImplementation");
return (DOMImplementation)clazz.getMethod(
"getDOMImplementation", (Class[])null).invoke(null, 
(Object[])null);
} catch (Exception e) {
return SVGDOMImplementation.getDOMImplementation();
}
}
throw new RuntimeException("Unsupport SVG version '" + ver + "'");
}
{noformat}

by:

{noformat}
import org.apache.batik.anim.dom.SVG12DOMImplementation;

private DOMImplementation getDOMImplementation(String ver) {
//TODO It would be great if Batik provided this method as static 
helper method.
if (ver == null || ver.length() == 0
|| ver.equals("1.0") || ver.equals("1.1")) {
return SVGDOMImplementation.getDOMImplementation();
} else if (ver.equals("1.2")) {
return SVG12DOMImplementation.getDOMImplementation();
}
throw new RuntimeException("Unsupport SVG version '" + ver + "'");
}
{noformat}

org.apache.batik.anim.dom.SVG12DOMImplementation is always 
included in Batik-1.8-all.jar. Even if you prefer to keep Class.forName(), 
please note that org.apache.batik.dom.svg12.SVG12DOMImplementation 
no longer exists in Batik 1.8.



  was:
How to reproduce the problem (see attached files)

fop -fo __doc.fo -pdf __doc.pdf

Running this command fails with:
---
org.w3c.dom.DOMException: The current document is unable to create an element 
of the requested type (namespace: http://www.w3.org/2000/svg, name: 
svg:flowRoot).
at org.apache.batik.dom.AbstractNode.createDOMException(Unknown Source)
at 
org.apache.batik.anim.dom.SVGDOMImplementation.createElementNS(Unknown Source)
at org.apache.batik.anim.dom.SVGOMDocument.createElementNS(Unknown 
Source)
at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:324)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
at 
org.apache.fop.util.DelegatingContentHandler.startElement(DelegatingContentHandler.java:185)
at 
org.apache.fop.fo.extensions.svg.SVGDOMContentHandlerFactory$Handler.startElement(SVGDOMContentHandlerFactory.java:137)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
---

The expected result is EXPECTED__doc.pdf

My workaround:

In org/apache/fop/fo/extensions/svg/SVGDOMContentHandlerFactory.java, 
I've replaced:

---
private DOMImplementation getDOMImplementation(String ver) {
//TODO It would be great if Batik provided this method as static 
helper method.
if (ver == null || ver.length() == 0
|| ver.equals("1.0") || ver.equals("1.1")) {
return SVG

[jira] [Updated] (FOP-2490) Embedded SVG 1.2 not supported by FOP 2.0

2015-06-16 Thread Hussein Shafie (JIRA)

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

Hussein Shafie updated FOP-2490:

Attachment: EXPECTED__doc.pdf

> Embedded SVG 1.2 not supported by FOP 2.0
> -
>
> Key: FOP-2490
> URL: https://issues.apache.org/jira/browse/FOP-2490
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: Linux, Java 1.6 64-bit (not relevant)
>Reporter: Hussein Shafie
> Attachments: EXPECTED__doc.pdf, __doc.fo
>
>
> How to reproduce the problem (see attached files)
> fop -fo __doc.fo -pdf __doc.pdf
> Running this command fails with:
> ---
> org.w3c.dom.DOMException: The current document is unable to create an element 
> of the requested type (namespace: http://www.w3.org/2000/svg, name: 
> svg:flowRoot).
> at org.apache.batik.dom.AbstractNode.createDOMException(Unknown 
> Source)
> at 
> org.apache.batik.anim.dom.SVGDOMImplementation.createElementNS(Unknown Source)
> at org.apache.batik.anim.dom.SVGOMDocument.createElementNS(Unknown 
> Source)
> at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:324)
> at 
> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
> at 
> org.apache.fop.util.DelegatingContentHandler.startElement(DelegatingContentHandler.java:185)
> at 
> org.apache.fop.fo.extensions.svg.SVGDOMContentHandlerFactory$Handler.startElement(SVGDOMContentHandlerFactory.java:137)
> at 
> org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
> at 
> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
> ---
> The expected result is EXPECTED__doc.pdf
> My workaround:
> In org/apache/fop/fo/extensions/svg/SVGDOMContentHandlerFactory.java, 
> I've replaced:
> ---
> private DOMImplementation getDOMImplementation(String ver) {
> //TODO It would be great if Batik provided this method as static 
> helper method.
> if (ver == null || ver.length() == 0
> || ver.equals("1.0") || ver.equals("1.1")) {
> return SVGDOMImplementation.getDOMImplementation();
> } else if (ver.equals("1.2")) {
> try {
> Class clazz = Class.forName(
> 
> "org.apache.batik.dom.svg12.SVG12DOMImplementation");
> return (DOMImplementation)clazz.getMethod(
> "getDOMImplementation", 
> (Class[])null).invoke(null, (Object[])null);
> } catch (Exception e) {
> return SVGDOMImplementation.getDOMImplementation();
> }
> }
> throw new RuntimeException("Unsupport SVG version '" + ver + "'");
> }
> ---
> by:
> ---
> import org.apache.batik.anim.dom.SVG12DOMImplementation;
> private DOMImplementation getDOMImplementation(String ver) {
> //TODO It would be great if Batik provided this method as static 
> helper method.
> if (ver == null || ver.length() == 0
> || ver.equals("1.0") || ver.equals("1.1")) {
> return SVGDOMImplementation.getDOMImplementation();
> } else if (ver.equals("1.2")) {
> return SVG12DOMImplementation.getDOMImplementation();
> }
> throw new RuntimeException("Unsupport SVG version '" + ver + "'");
> }
> ---
> org.apache.batik.anim.dom.SVG12DOMImplementation is always 
> included in Batik-1.8-all.jar. Even if you prefer to keep Class.forName(), 
> please note that org.apache.batik.dom.svg12.SVG12DOMImplementation 
> no longer exists in Batik 1.8.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (FOP-2490) Embedded SVG 1.2 not supported by FOP 2.0

2015-06-16 Thread Hussein Shafie (JIRA)

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

Hussein Shafie updated FOP-2490:

Attachment: __doc.fo

> Embedded SVG 1.2 not supported by FOP 2.0
> -
>
> Key: FOP-2490
> URL: https://issues.apache.org/jira/browse/FOP-2490
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: Linux, Java 1.6 64-bit (not relevant)
>Reporter: Hussein Shafie
> Attachments: EXPECTED__doc.pdf, __doc.fo
>
>
> How to reproduce the problem (see attached files)
> fop -fo __doc.fo -pdf __doc.pdf
> Running this command fails with:
> ---
> org.w3c.dom.DOMException: The current document is unable to create an element 
> of the requested type (namespace: http://www.w3.org/2000/svg, name: 
> svg:flowRoot).
> at org.apache.batik.dom.AbstractNode.createDOMException(Unknown 
> Source)
> at 
> org.apache.batik.anim.dom.SVGDOMImplementation.createElementNS(Unknown Source)
> at org.apache.batik.anim.dom.SVGOMDocument.createElementNS(Unknown 
> Source)
> at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:324)
> at 
> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
> at 
> org.apache.fop.util.DelegatingContentHandler.startElement(DelegatingContentHandler.java:185)
> at 
> org.apache.fop.fo.extensions.svg.SVGDOMContentHandlerFactory$Handler.startElement(SVGDOMContentHandlerFactory.java:137)
> at 
> org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
> at 
> org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
> ---
> The expected result is EXPECTED__doc.pdf
> My workaround:
> In org/apache/fop/fo/extensions/svg/SVGDOMContentHandlerFactory.java, 
> I've replaced:
> ---
> private DOMImplementation getDOMImplementation(String ver) {
> //TODO It would be great if Batik provided this method as static 
> helper method.
> if (ver == null || ver.length() == 0
> || ver.equals("1.0") || ver.equals("1.1")) {
> return SVGDOMImplementation.getDOMImplementation();
> } else if (ver.equals("1.2")) {
> try {
> Class clazz = Class.forName(
> 
> "org.apache.batik.dom.svg12.SVG12DOMImplementation");
> return (DOMImplementation)clazz.getMethod(
> "getDOMImplementation", 
> (Class[])null).invoke(null, (Object[])null);
> } catch (Exception e) {
> return SVGDOMImplementation.getDOMImplementation();
> }
> }
> throw new RuntimeException("Unsupport SVG version '" + ver + "'");
> }
> ---
> by:
> ---
> import org.apache.batik.anim.dom.SVG12DOMImplementation;
> private DOMImplementation getDOMImplementation(String ver) {
> //TODO It would be great if Batik provided this method as static 
> helper method.
> if (ver == null || ver.length() == 0
> || ver.equals("1.0") || ver.equals("1.1")) {
> return SVGDOMImplementation.getDOMImplementation();
> } else if (ver.equals("1.2")) {
> return SVG12DOMImplementation.getDOMImplementation();
> }
> throw new RuntimeException("Unsupport SVG version '" + ver + "'");
> }
> ---
> org.apache.batik.anim.dom.SVG12DOMImplementation is always 
> included in Batik-1.8-all.jar. Even if you prefer to keep Class.forName(), 
> please note that org.apache.batik.dom.svg12.SVG12DOMImplementation 
> no longer exists in Batik 1.8.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (FOP-2490) Embedded SVG 1.2 not supported by FOP 2.0

2015-06-16 Thread Hussein Shafie (JIRA)
Hussein Shafie created FOP-2490:
---

 Summary: Embedded SVG 1.2 not supported by FOP 2.0
 Key: FOP-2490
 URL: https://issues.apache.org/jira/browse/FOP-2490
 Project: FOP
  Issue Type: Bug
Affects Versions: 2.0
 Environment: Linux, Java 1.6 64-bit (not relevant)
Reporter: Hussein Shafie
 Attachments: EXPECTED__doc.pdf, __doc.fo

How to reproduce the problem (see attached files)

fop -fo __doc.fo -pdf __doc.pdf

Running this command fails with:
---
org.w3c.dom.DOMException: The current document is unable to create an element 
of the requested type (namespace: http://www.w3.org/2000/svg, name: 
svg:flowRoot).
at org.apache.batik.dom.AbstractNode.createDOMException(Unknown Source)
at 
org.apache.batik.anim.dom.SVGDOMImplementation.createElementNS(Unknown Source)
at org.apache.batik.anim.dom.SVGOMDocument.createElementNS(Unknown 
Source)
at org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:324)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
at 
org.apache.fop.util.DelegatingContentHandler.startElement(DelegatingContentHandler.java:185)
at 
org.apache.fop.fo.extensions.svg.SVGDOMContentHandlerFactory$Handler.startElement(SVGDOMContentHandlerFactory.java:137)
at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:179)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072)
---

The expected result is EXPECTED__doc.pdf

My workaround:

In org/apache/fop/fo/extensions/svg/SVGDOMContentHandlerFactory.java, 
I've replaced:

---
private DOMImplementation getDOMImplementation(String ver) {
//TODO It would be great if Batik provided this method as static 
helper method.
if (ver == null || ver.length() == 0
|| ver.equals("1.0") || ver.equals("1.1")) {
return SVGDOMImplementation.getDOMImplementation();
} else if (ver.equals("1.2")) {
try {
Class clazz = Class.forName(

"org.apache.batik.dom.svg12.SVG12DOMImplementation");
return (DOMImplementation)clazz.getMethod(
"getDOMImplementation", (Class[])null).invoke(null, 
(Object[])null);
} catch (Exception e) {
return SVGDOMImplementation.getDOMImplementation();
}
}
throw new RuntimeException("Unsupport SVG version '" + ver + "'");
}
---

by:

---
import org.apache.batik.anim.dom.SVG12DOMImplementation;

private DOMImplementation getDOMImplementation(String ver) {
//TODO It would be great if Batik provided this method as static 
helper method.
if (ver == null || ver.length() == 0
|| ver.equals("1.0") || ver.equals("1.1")) {
return SVGDOMImplementation.getDOMImplementation();
} else if (ver.equals("1.2")) {
return SVG12DOMImplementation.getDOMImplementation();
}
throw new RuntimeException("Unsupport SVG version '" + ver + "'");
}
---

org.apache.batik.anim.dom.SVG12DOMImplementation is always 
included in Batik-1.8-all.jar. Even if you prefer to keep Class.forName(), 
please note that org.apache.batik.dom.svg12.SVG12DOMImplementation 
no longer exists in Batik 1.8.





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (FOP-2489) An SVG file using markers is not rendered by FOP 2.0

2015-06-16 Thread Hussein Shafie (JIRA)

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

Hussein Shafie updated FOP-2489:

Attachment: EXPECTED__doc.pdf

> An SVG file using markers is not rendered by FOP 2.0
> 
>
> Key: FOP-2489
> URL: https://issues.apache.org/jira/browse/FOP-2489
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: Linux; Java 1.6 64-bit (not relevant).
>Reporter: Hussein Shafie
> Attachments: EXPECTED__doc.pdf, __doc.fo, __doc.pdf, header_layout.svg
>
>
> An SVG file using markers is not rendered by FOP 2.0
> 
> How to reproduce the problem (see attached files)
> fop -fo __doc.fo -pdf __doc.pdf
> Running this command reports:
> ---
> SEVERE: SVG graphic could not be built. Reason: 
> org.apache.batik.bridge.BridgeException: 
> resources/resources/header_layout.svg (No such file or directory)
> org.apache.batik.bridge.BridgeException: 
> resources/resources/header_layout.svg (No such file or directory)
> at org.apache.batik.bridge.BridgeContext.getReferencedNode(Unknown 
> Source)
> at org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown 
> Source)
> at org.apache.batik.bridge.PaintServer.convertMarker(Unknown Source)
> at org.apache.batik.bridge.PaintServer.convertMarkers(Unknown Source)
> at 
> org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createMarkerPainter(Unknown
>  Source)
> at 
> org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createShapePainter(Unknown
>  Source)
> at 
> org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
> at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
> at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
> at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
> at 
> org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:103)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingURI(AbstractIFPainter.java:292)
> at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:173)
> at 
> org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1295)
> at 
> org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1282)
> at 
> org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:858)
> ---
> The expected result is EXPECTED__doc.pdf
> My workaround:
> To resolve URLs such as "marker-start:url(#TriangleInM)", Batik 1.8 needs 
> to know the URL of the SVG document it processes.
> Therefore in org/apache/fop/apps/FOUserAgent.java, I've replaced:
> ---
> public StreamSource resolveURI(String uri) {
> // TODO: What do we want to do when resources aren't found??? We also 
> need to remove this
> // method entirely
> try {
> // Have to do this so we can resolve data URIs
> StreamSource src = new 
> StreamSource(resourceResolver.getResource(uri));
> src.setSystemId(uri);
> return src;
> } catch (URISyntaxException use) {
> return null;
> } catch (IOException ioe) {
> return null;
> }
> }
> ---
> by:
> ---
> public StreamSource resolveURI(String uri) {
> // TODO: What do we want to do when resources aren't found??? We also 
> need to remove this
> // method entirely
> try {
> // Have to do this so we can resolve data URIs
> StreamSource src = new 
> StreamSource(resourceResolver.getResource(uri));
> // A systemId is always expected to be absolute.
> // Anyway, without this, SVG files using markers 
> // (e.g. marker-start:url(#TriangleInM)) cannot be rendered.
> if (!uri.startsWith("data:")) {
> uri = 
> resourceResolver.getBaseURI().resolve(uri).toASCIIString();
> }
> src.setSystemId(uri);
> return src;
> } catch (

[jira] [Updated] (FOP-2489) An SVG file using markers is not rendered by FOP 2.0

2015-06-16 Thread Hussein Shafie (JIRA)

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

Hussein Shafie updated FOP-2489:

Attachment: __doc.fo

> An SVG file using markers is not rendered by FOP 2.0
> 
>
> Key: FOP-2489
> URL: https://issues.apache.org/jira/browse/FOP-2489
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: Linux; Java 1.6 64-bit (not relevant).
>Reporter: Hussein Shafie
> Attachments: __doc.fo, __doc.pdf, header_layout.svg
>
>
> An SVG file using markers is not rendered by FOP 2.0
> 
> How to reproduce the problem (see attached files)
> fop -fo __doc.fo -pdf __doc.pdf
> Running this command reports:
> ---
> SEVERE: SVG graphic could not be built. Reason: 
> org.apache.batik.bridge.BridgeException: 
> resources/resources/header_layout.svg (No such file or directory)
> org.apache.batik.bridge.BridgeException: 
> resources/resources/header_layout.svg (No such file or directory)
> at org.apache.batik.bridge.BridgeContext.getReferencedNode(Unknown 
> Source)
> at org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown 
> Source)
> at org.apache.batik.bridge.PaintServer.convertMarker(Unknown Source)
> at org.apache.batik.bridge.PaintServer.convertMarkers(Unknown Source)
> at 
> org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createMarkerPainter(Unknown
>  Source)
> at 
> org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createShapePainter(Unknown
>  Source)
> at 
> org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
> at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
> at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
> at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
> at 
> org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:103)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingURI(AbstractIFPainter.java:292)
> at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:173)
> at 
> org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1295)
> at 
> org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1282)
> at 
> org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:858)
> ---
> The expected result is EXPECTED__doc.pdf
> My workaround:
> To resolve URLs such as "marker-start:url(#TriangleInM)", Batik 1.8 needs 
> to know the URL of the SVG document it processes.
> Therefore in org/apache/fop/apps/FOUserAgent.java, I've replaced:
> ---
> public StreamSource resolveURI(String uri) {
> // TODO: What do we want to do when resources aren't found??? We also 
> need to remove this
> // method entirely
> try {
> // Have to do this so we can resolve data URIs
> StreamSource src = new 
> StreamSource(resourceResolver.getResource(uri));
> src.setSystemId(uri);
> return src;
> } catch (URISyntaxException use) {
> return null;
> } catch (IOException ioe) {
> return null;
> }
> }
> ---
> by:
> ---
> public StreamSource resolveURI(String uri) {
> // TODO: What do we want to do when resources aren't found??? We also 
> need to remove this
> // method entirely
> try {
> // Have to do this so we can resolve data URIs
> StreamSource src = new 
> StreamSource(resourceResolver.getResource(uri));
> // A systemId is always expected to be absolute.
> // Anyway, without this, SVG files using markers 
> // (e.g. marker-start:url(#TriangleInM)) cannot be rendered.
> if (!uri.startsWith("data:")) {
> uri = 
> resourceResolver.getBaseURI().resolve(uri).toASCIIString();
> }
> src.setSystemId(uri);
> return src;
> } catch (URISyntaxException use) {
> 

[jira] [Updated] (FOP-2489) An SVG file using markers is not rendered by FOP 2.0

2015-06-16 Thread Hussein Shafie (JIRA)

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

Hussein Shafie updated FOP-2489:

Attachment: header_layout.svg

> An SVG file using markers is not rendered by FOP 2.0
> 
>
> Key: FOP-2489
> URL: https://issues.apache.org/jira/browse/FOP-2489
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: Linux; Java 1.6 64-bit (not relevant).
>Reporter: Hussein Shafie
> Attachments: __doc.fo, __doc.pdf, header_layout.svg
>
>
> An SVG file using markers is not rendered by FOP 2.0
> 
> How to reproduce the problem (see attached files)
> fop -fo __doc.fo -pdf __doc.pdf
> Running this command reports:
> ---
> SEVERE: SVG graphic could not be built. Reason: 
> org.apache.batik.bridge.BridgeException: 
> resources/resources/header_layout.svg (No such file or directory)
> org.apache.batik.bridge.BridgeException: 
> resources/resources/header_layout.svg (No such file or directory)
> at org.apache.batik.bridge.BridgeContext.getReferencedNode(Unknown 
> Source)
> at org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown 
> Source)
> at org.apache.batik.bridge.PaintServer.convertMarker(Unknown Source)
> at org.apache.batik.bridge.PaintServer.convertMarkers(Unknown Source)
> at 
> org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createMarkerPainter(Unknown
>  Source)
> at 
> org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createShapePainter(Unknown
>  Source)
> at 
> org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
> at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
> at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
> at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
> at 
> org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:103)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingURI(AbstractIFPainter.java:292)
> at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:173)
> at 
> org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1295)
> at 
> org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1282)
> at 
> org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:858)
> ---
> The expected result is EXPECTED__doc.pdf
> My workaround:
> To resolve URLs such as "marker-start:url(#TriangleInM)", Batik 1.8 needs 
> to know the URL of the SVG document it processes.
> Therefore in org/apache/fop/apps/FOUserAgent.java, I've replaced:
> ---
> public StreamSource resolveURI(String uri) {
> // TODO: What do we want to do when resources aren't found??? We also 
> need to remove this
> // method entirely
> try {
> // Have to do this so we can resolve data URIs
> StreamSource src = new 
> StreamSource(resourceResolver.getResource(uri));
> src.setSystemId(uri);
> return src;
> } catch (URISyntaxException use) {
> return null;
> } catch (IOException ioe) {
> return null;
> }
> }
> ---
> by:
> ---
> public StreamSource resolveURI(String uri) {
> // TODO: What do we want to do when resources aren't found??? We also 
> need to remove this
> // method entirely
> try {
> // Have to do this so we can resolve data URIs
> StreamSource src = new 
> StreamSource(resourceResolver.getResource(uri));
> // A systemId is always expected to be absolute.
> // Anyway, without this, SVG files using markers 
> // (e.g. marker-start:url(#TriangleInM)) cannot be rendered.
> if (!uri.startsWith("data:")) {
> uri = 
> resourceResolver.getBaseURI().resolve(uri).toASCIIString();
> }
> src.setSystemId(uri);
> return src;
> } catch (URISyntaxException 

[jira] [Updated] (FOP-2489) An SVG file using markers is not rendered by FOP 2.0

2015-06-16 Thread Hussein Shafie (JIRA)

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

Hussein Shafie updated FOP-2489:

Attachment: __doc.pdf

> An SVG file using markers is not rendered by FOP 2.0
> 
>
> Key: FOP-2489
> URL: https://issues.apache.org/jira/browse/FOP-2489
> Project: FOP
>  Issue Type: Bug
>Affects Versions: 2.0
> Environment: Linux; Java 1.6 64-bit (not relevant).
>Reporter: Hussein Shafie
> Attachments: __doc.fo, __doc.pdf, header_layout.svg
>
>
> An SVG file using markers is not rendered by FOP 2.0
> 
> How to reproduce the problem (see attached files)
> fop -fo __doc.fo -pdf __doc.pdf
> Running this command reports:
> ---
> SEVERE: SVG graphic could not be built. Reason: 
> org.apache.batik.bridge.BridgeException: 
> resources/resources/header_layout.svg (No such file or directory)
> org.apache.batik.bridge.BridgeException: 
> resources/resources/header_layout.svg (No such file or directory)
> at org.apache.batik.bridge.BridgeContext.getReferencedNode(Unknown 
> Source)
> at org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown 
> Source)
> at org.apache.batik.bridge.PaintServer.convertMarker(Unknown Source)
> at org.apache.batik.bridge.PaintServer.convertMarkers(Unknown Source)
> at 
> org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createMarkerPainter(Unknown
>  Source)
> at 
> org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createShapePainter(Unknown
>  Source)
> at 
> org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
> at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
> at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown 
> Source)
> at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
> at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
> at 
> org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:103)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
> at 
> org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingURI(AbstractIFPainter.java:292)
> at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:173)
> at 
> org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1295)
> at 
> org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1282)
> at 
> org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:858)
> ---
> The expected result is EXPECTED__doc.pdf
> My workaround:
> To resolve URLs such as "marker-start:url(#TriangleInM)", Batik 1.8 needs 
> to know the URL of the SVG document it processes.
> Therefore in org/apache/fop/apps/FOUserAgent.java, I've replaced:
> ---
> public StreamSource resolveURI(String uri) {
> // TODO: What do we want to do when resources aren't found??? We also 
> need to remove this
> // method entirely
> try {
> // Have to do this so we can resolve data URIs
> StreamSource src = new 
> StreamSource(resourceResolver.getResource(uri));
> src.setSystemId(uri);
> return src;
> } catch (URISyntaxException use) {
> return null;
> } catch (IOException ioe) {
> return null;
> }
> }
> ---
> by:
> ---
> public StreamSource resolveURI(String uri) {
> // TODO: What do we want to do when resources aren't found??? We also 
> need to remove this
> // method entirely
> try {
> // Have to do this so we can resolve data URIs
> StreamSource src = new 
> StreamSource(resourceResolver.getResource(uri));
> // A systemId is always expected to be absolute.
> // Anyway, without this, SVG files using markers 
> // (e.g. marker-start:url(#TriangleInM)) cannot be rendered.
> if (!uri.startsWith("data:")) {
> uri = 
> resourceResolver.getBaseURI().resolve(uri).toASCIIString();
> }
> src.setSystemId(uri);
> return src;
> } catch (URISyntaxException use) {
>

[jira] [Created] (FOP-2489) An SVG file using markers is not rendered by FOP 2.0

2015-06-16 Thread Hussein Shafie (JIRA)
Hussein Shafie created FOP-2489:
---

 Summary: An SVG file using markers is not rendered by FOP 2.0
 Key: FOP-2489
 URL: https://issues.apache.org/jira/browse/FOP-2489
 Project: FOP
  Issue Type: Bug
Affects Versions: 2.0
 Environment: Linux; Java 1.6 64-bit (not relevant).
Reporter: Hussein Shafie


An SVG file using markers is not rendered by FOP 2.0


How to reproduce the problem (see attached files)

fop -fo __doc.fo -pdf __doc.pdf

Running this command reports:
---
SEVERE: SVG graphic could not be built. Reason: 
org.apache.batik.bridge.BridgeException: resources/resources/header_layout.svg 
(No such file or directory)
org.apache.batik.bridge.BridgeException: resources/resources/header_layout.svg 
(No such file or directory)
at org.apache.batik.bridge.BridgeContext.getReferencedNode(Unknown 
Source)
at org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown 
Source)
at org.apache.batik.bridge.PaintServer.convertMarker(Unknown Source)
at org.apache.batik.bridge.PaintServer.convertMarkers(Unknown Source)
at 
org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createMarkerPainter(Unknown
 Source)
at 
org.apache.batik.bridge.SVGDecoratedShapeElementBridge.createShapePainter(Unknown
 Source)
at 
org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
at 
org.apache.fop.render.pdf.PDFImageHandlerSVG.handleImage(PDFImageHandlerSVG.java:103)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:249)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImage(AbstractIFPainter.java:205)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingImageHandler(AbstractIFPainter.java:170)
at 
org.apache.fop.render.intermediate.AbstractIFPainter.drawImageUsingURI(AbstractIFPainter.java:292)
at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:173)
at 
org.apache.fop.render.intermediate.IFRenderer.drawImage(IFRenderer.java:1295)
at 
org.apache.fop.render.intermediate.IFRenderer.renderImage(IFRenderer.java:1282)
at 
org.apache.fop.render.AbstractRenderer.renderInlineViewport(AbstractRenderer.java:858)
---

The expected result is EXPECTED__doc.pdf

My workaround:

To resolve URLs such as "marker-start:url(#TriangleInM)", Batik 1.8 needs 
to know the URL of the SVG document it processes.

Therefore in org/apache/fop/apps/FOUserAgent.java, I've replaced:

---
public StreamSource resolveURI(String uri) {
// TODO: What do we want to do when resources aren't found??? We also 
need to remove this
// method entirely
try {
// Have to do this so we can resolve data URIs
StreamSource src = new 
StreamSource(resourceResolver.getResource(uri));
src.setSystemId(uri);
return src;
} catch (URISyntaxException use) {
return null;
} catch (IOException ioe) {
return null;
}
}
---

by:

---
public StreamSource resolveURI(String uri) {
// TODO: What do we want to do when resources aren't found??? We also 
need to remove this
// method entirely
try {
// Have to do this so we can resolve data URIs
StreamSource src = new 
StreamSource(resourceResolver.getResource(uri));

// A systemId is always expected to be absolute.
// Anyway, without this, SVG files using markers 
// (e.g. marker-start:url(#TriangleInM)) cannot be rendered.

if (!uri.startsWith("data:")) {
uri = 
resourceResolver.getBaseURI().resolve(uri).toASCIIString();
}

src.setSystemId(uri);
return src;
} catch (URISyntaxException use) {
return null;
} catch (IOException ioe) {
return null;
}
}
---




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (FOP-2462) PDF to PDF decimal format wrong

2015-06-16 Thread simon steiner (JIRA)

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

simon steiner updated FOP-2462:
---
Summary: PDF to PDF decimal format wrong  (was: Fop PDF Image Plugin broken 
since rev 1590626)

> PDF to PDF decimal format wrong
> ---
>
> Key: FOP-2462
> URL: https://issues.apache.org/jira/browse/FOP-2462
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: trunk
>Reporter: Matthias Reischenbacher
> Attachments: fop-2462-acrobat-error-message.png, 
> fop-2462-external-pdf.pdf, fop-2462-test-case-null-filter.pdf, 
> fop-2462-test-case.pdf, fop-2462-test-case.xml, out-nocomp.pdf, out.pdf
>
>
> Rendering the attached sample fo and pdf file with FOP and the PDF Image 
> Plugin creates a corrupted PDF file since revision 1590626. The generated PDF 
> file can be opened with Adobe Acrobat but when opening the page with the 
> external PDF file an error message is displayed and no content is visible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (FOP-2462) PDF to PDF content stream decimal format wrong

2015-06-16 Thread simon steiner (JIRA)

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

simon steiner updated FOP-2462:
---
Summary: PDF to PDF content stream decimal format wrong  (was: PDF to PDF 
decimal format wrong)

> PDF to PDF content stream decimal format wrong
> --
>
> Key: FOP-2462
> URL: https://issues.apache.org/jira/browse/FOP-2462
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: trunk
>Reporter: Matthias Reischenbacher
> Attachments: fop-2462-acrobat-error-message.png, 
> fop-2462-external-pdf.pdf, fop-2462-test-case-null-filter.pdf, 
> fop-2462-test-case.pdf, fop-2462-test-case.xml, out-nocomp.pdf, out.pdf
>
>
> Rendering the attached sample fo and pdf file with FOP and the PDF Image 
> Plugin creates a corrupted PDF file since revision 1590626. The generated PDF 
> file can be opened with Adobe Acrobat but when opening the page with the 
> external PDF file an error message is displayed and no content is visible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (FOP-2462) Fop PDF Image Plugin broken since rev 1590626

2015-06-16 Thread Matthias Reischenbacher (JIRA)

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

Matthias Reischenbacher resolved FOP-2462.
--
Resolution: Fixed

Yes, it is. Thanks a lot for having a second look and fixing it right away!

> Fop PDF Image Plugin broken since rev 1590626
> -
>
> Key: FOP-2462
> URL: https://issues.apache.org/jira/browse/FOP-2462
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: trunk
>Reporter: Matthias Reischenbacher
> Attachments: fop-2462-acrobat-error-message.png, 
> fop-2462-external-pdf.pdf, fop-2462-test-case-null-filter.pdf, 
> fop-2462-test-case.pdf, fop-2462-test-case.xml, out-nocomp.pdf, out.pdf
>
>
> Rendering the attached sample fo and pdf file with FOP and the PDF Image 
> Plugin creates a corrupted PDF file since revision 1590626. The generated PDF 
> file can be opened with Adobe Acrobat but when opening the page with the 
> external PDF file an error message is displayed and no content is visible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2462) Fop PDF Image Plugin broken since rev 1590626

2015-06-16 Thread simon steiner (JIRA)

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

simon steiner commented on FOP-2462:


Is the issue working for you after commit above.

> Fop PDF Image Plugin broken since rev 1590626
> -
>
> Key: FOP-2462
> URL: https://issues.apache.org/jira/browse/FOP-2462
> Project: FOP
>  Issue Type: Bug
>  Components: image/unqualified
>Affects Versions: trunk
>Reporter: Matthias Reischenbacher
> Attachments: fop-2462-acrobat-error-message.png, 
> fop-2462-external-pdf.pdf, fop-2462-test-case-null-filter.pdf, 
> fop-2462-test-case.pdf, fop-2462-test-case.xml, out-nocomp.pdf, out.pdf
>
>
> Rendering the attached sample fo and pdf file with FOP and the PDF Image 
> Plugin creates a corrupted PDF file since revision 1590626. The generated PDF 
> file can be opened with Adobe Acrobat but when opening the page with the 
> external PDF file an error message is displayed and no content is visible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Closed] (FOP-2488) Support PDF/UA

2015-06-16 Thread simon steiner (JIRA)

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

simon steiner closed FOP-2488.
--
Resolution: Fixed

> Support PDF/UA
> --
>
> Key: FOP-2488
> URL: https://issues.apache.org/jira/browse/FOP-2488
> Project: FOP
>  Issue Type: Bug
>Reporter: simon steiner
>Assignee: simon steiner
> Attachments: fop.xconf, img.jpg, test.fo
>
>
> A standard for accessible PDF
> Validation using 
> http://www.access-for-all.ch/en/pdf-lab/pdf-accessibility-checker-pac.html
> fop test.fo -c fop.xconf out.pdf



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2488) Support PDF/UA

2015-06-16 Thread simon steiner (JIRA)

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

simon steiner commented on FOP-2488:


Added
http://svn.apache.org/viewvc?view=revision&revision=1685768
http://svn.apache.org/viewvc?view=revision&revision=1685770

> Support PDF/UA
> --
>
> Key: FOP-2488
> URL: https://issues.apache.org/jira/browse/FOP-2488
> Project: FOP
>  Issue Type: Bug
>Reporter: simon steiner
>Assignee: simon steiner
> Attachments: fop.xconf, img.jpg, test.fo
>
>
> A standard for accessible PDF
> Validation using 
> http://www.access-for-all.ch/en/pdf-lab/pdf-accessibility-checker-pac.html
> fop test.fo -c fop.xconf out.pdf



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (FOP-2488) Support PDF/UA

2015-06-16 Thread simon steiner (JIRA)

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

simon steiner updated FOP-2488:
---
Attachment: img.jpg
test.fo
fop.xconf

> Support PDF/UA
> --
>
> Key: FOP-2488
> URL: https://issues.apache.org/jira/browse/FOP-2488
> Project: FOP
>  Issue Type: Bug
>Reporter: simon steiner
>Assignee: simon steiner
> Attachments: fop.xconf, img.jpg, test.fo
>
>
> A standard for accessible PDF
> Validation using 
> http://www.access-for-all.ch/en/pdf-lab/pdf-accessibility-checker-pac.html
> fop test.fo -c fop.xconf out.pdf



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (FOP-2488) Support PDF/UA

2015-06-16 Thread simon steiner (JIRA)

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

simon steiner updated FOP-2488:
---
Description: 
A standard for accessible PDF

Validation using 
http://www.access-for-all.ch/en/pdf-lab/pdf-accessibility-checker-pac.html

fop test.fo -c fop.xconf out.pdf

  was:A standard for accessible PDF


> Support PDF/UA
> --
>
> Key: FOP-2488
> URL: https://issues.apache.org/jira/browse/FOP-2488
> Project: FOP
>  Issue Type: Bug
>Reporter: simon steiner
>Assignee: simon steiner
>
> A standard for accessible PDF
> Validation using 
> http://www.access-for-all.ch/en/pdf-lab/pdf-accessibility-checker-pac.html
> fop test.fo -c fop.xconf out.pdf



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Jenkins build is back to normal : xmlgraphics-fop #135

2015-06-16 Thread Apache Jenkins Server
See 



[jira] [Created] (FOP-2488) Support PDF/UA

2015-06-16 Thread simon steiner (JIRA)
simon steiner created FOP-2488:
--

 Summary: Support PDF/UA
 Key: FOP-2488
 URL: https://issues.apache.org/jira/browse/FOP-2488
 Project: FOP
  Issue Type: Bug
Reporter: simon steiner
Assignee: simon steiner


A standard for accessible PDF



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: Build failed in Jenkins: xmlgraphics-fop #134

2015-06-16 Thread Matthias Reischenbacher

Hi,

sorry, seems like I messed up somehow. I haven't set up Checkstyle yet, 
but I'll do so now and commit a fix shortly.


BR,
Matthias

On 15.06.2015 11:20, Apache Jenkins Server wrote:

See 

Changes:

[matthias] FOP-2487: replace cached pages if span condition doesn't match

--
[...truncated 2637 lines...]
 [junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.033 sec
 [junit]
 [junit] Testsuite: 
org.apache.fop.render.bitmap.BitmapRendererConfiguratorTestCase
 [junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.039 sec
 [junit]
 [junit] Testsuite: 
org.apache.fop.render.bitmap.TIFFCompressionValueTestCase
 [junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
 [junit]
 [junit] Testsuite: 
org.apache.fop.render.bitmap.TIFFRendererConfigParserTestCase
 [junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.054 sec
 [junit]
 [junit] Testsuite: 
org.apache.fop.render.bitmap.TIFFRendererConfiguratorTestCase
 [junit] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.059 sec
 [junit]
 [junit] Testsuite: 
org.apache.fop.render.extensions.prepress.PageBoundariesTestCase
 [junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
 [junit]
 [junit] Testsuite: 
org.apache.fop.render.extensions.prepress.PageScaleTestCase
 [junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
 [junit]
 [junit] Testsuite: org.apache.fop.render.gradient.GradientTestCase
 [junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.014 sec
 [junit]
 [junit] Testsuite: 
org.apache.fop.render.intermediate.AbstractIFPainterTestCase
 [junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.033 sec
 [junit]
 [junit] Testsuite: 
org.apache.fop.render.intermediate.ArcToBezierCurveTransformerTestCase
 [junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.004 sec
 [junit]
 [junit] Testsuite: org.apache.fop.render.intermediate.BorderPainterTestCase
 [junit] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.105 sec
 [junit]
 [junit] Testsuite: org.apache.fop.render.intermediate.IFSerializerTestCase
 [junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.004 sec
 [junit]
 [junit] Testsuite: 
org.apache.fop.render.intermediate.IFStructureTreeBuilderTestCase
 [junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.013 sec
 [junit]
 [junit] Testsuite: 
org.apache.fop.render.intermediate.SAXEventRecorderTestCase
 [junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.005 sec
 [junit]
 [junit] Testsuite: 
org.apache.fop.render.pcl.PCLRendererConfigParserTestCase
 [junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.018 sec
 [junit]
 [junit] Testsuite: 
org.apache.fop.render.pcl.PCLRendererConfiguratorTestCase
 [junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.035 sec
 [junit]
 [junit] Testsuite: org.apache.fop.render.pdf.ImageRawPNGAdapterTestCase
 [junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.097 sec
 [junit]
 [junit] Testsuite: org.apache.fop.render.pdf.PDFAConformanceTestCase
 [junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.151 sec
 [junit]
 [junit] Testsuite: org.apache.fop.render.pdf.PDFAMetadataTestCase
 [junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.011 sec
 [junit]
 [junit] Testsuite: org.apache.fop.render.pdf.PDFBorderPainterTestCase
 [junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
 [junit]
 [junit] Testsuite: org.apache.fop.render.pdf.PDFCMapTestCase
 [junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
 [junit]
 [junit] Testsuite: org.apache.fop.render.pdf.PDFEncodingTestCase
 [junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 
0.043 sec
 [junit]
 [junit] Testcase: 
testPDFEncodingWithCustomFont(org.apache.fop.render.pdf.PDFEncodingTestCase):SKIPPED:
 This should be tested using PDFBox. If PDFBox can extract the text 
correctly,everything is fine. The tests here are too unstable.
 [junit] Testsuite: org.apache.fop.render.pdf.PDFGraphicsPainterTestCase
 [junit] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.017 sec
 [junit]
 [junit] Testsuite: org.apache.fop.render.pdf.PDFPainterTestCase
 [junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.02 sec
 [junit]
 [junit] Testsuite: 
org.apache.fop.render.pdf.PDFRendererC

[jira] [Updated] (FOP-2469) [PATCH] auto table layout

2015-06-16 Thread Gregor Berg (JIRA)

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

Gregor Berg updated FOP-2469:
-
Attachment: resize-spanned-columns.xml
resize-all-but-static-spanned-columns.xml
warning-only-static-columns-are-spanned.xml

> [PATCH] auto table layout
> -
>
> Key: FOP-2469
> URL: https://issues.apache.org/jira/browse/FOP-2469
> Project: FOP
>  Issue Type: Bug
>  Components: layout/unqualified
>Affects Versions: trunk
> Environment: Windows 7, JDK 7
>Reporter: Gregor Berg
>Assignee: Andreas L. Delmelle
> Fix For: trunk
>
> Attachments: 2015-05-13-auto-table-layout.patch, 
> 2015-05-27-LM-to-LC-refactoring.patch, 
> 2015-06-09-LM-to-LC-refactoring-update.patch, FOP2469-auto-table-layout.xml, 
> LayoutContext_Tweak.diff, resize-all-but-static-spanned-columns.xml, 
> resize-spanned-columns.xml, warning-only-static-columns-are-spanned.xml
>
>
> Hi,
> this is a patch which enables table-layout=auto. It is quite robust, it can 
> not only handle linebreaks and pagebreaks, but it also copes with auto tables 
> in fixed tables in auto tables.
> Essentially, it is the patch of issue FOP-2450 adapted to the trunk version 
> of FOP.
> Best regards,
> Gregor



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Build failed in Jenkins: xmlgraphics-fop #134

2015-06-16 Thread Apache Jenkins Server
See 

Changes:

[matthias] FOP-2487: replace cached pages if span condition doesn't match

--
[...truncated 2637 lines...]
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.033 sec
[junit] 
[junit] Testsuite: 
org.apache.fop.render.bitmap.BitmapRendererConfiguratorTestCase
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.039 sec
[junit] 
[junit] Testsuite: org.apache.fop.render.bitmap.TIFFCompressionValueTestCase
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] 
[junit] Testsuite: 
org.apache.fop.render.bitmap.TIFFRendererConfigParserTestCase
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.054 sec
[junit] 
[junit] Testsuite: 
org.apache.fop.render.bitmap.TIFFRendererConfiguratorTestCase
[junit] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.059 sec
[junit] 
[junit] Testsuite: 
org.apache.fop.render.extensions.prepress.PageBoundariesTestCase
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.003 sec
[junit] 
[junit] Testsuite: 
org.apache.fop.render.extensions.prepress.PageScaleTestCase
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.002 sec
[junit] 
[junit] Testsuite: org.apache.fop.render.gradient.GradientTestCase
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.014 sec
[junit] 
[junit] Testsuite: 
org.apache.fop.render.intermediate.AbstractIFPainterTestCase
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.033 sec
[junit] 
[junit] Testsuite: 
org.apache.fop.render.intermediate.ArcToBezierCurveTransformerTestCase
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.004 sec
[junit] 
[junit] Testsuite: org.apache.fop.render.intermediate.BorderPainterTestCase
[junit] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.105 sec
[junit] 
[junit] Testsuite: org.apache.fop.render.intermediate.IFSerializerTestCase
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.004 sec
[junit] 
[junit] Testsuite: 
org.apache.fop.render.intermediate.IFStructureTreeBuilderTestCase
[junit] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.013 sec
[junit] 
[junit] Testsuite: 
org.apache.fop.render.intermediate.SAXEventRecorderTestCase
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.005 sec
[junit] 
[junit] Testsuite: org.apache.fop.render.pcl.PCLRendererConfigParserTestCase
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.018 sec
[junit] 
[junit] Testsuite: org.apache.fop.render.pcl.PCLRendererConfiguratorTestCase
[junit] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.035 sec
[junit] 
[junit] Testsuite: org.apache.fop.render.pdf.ImageRawPNGAdapterTestCase
[junit] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.097 sec
[junit] 
[junit] Testsuite: org.apache.fop.render.pdf.PDFAConformanceTestCase
[junit] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.151 sec
[junit] 
[junit] Testsuite: org.apache.fop.render.pdf.PDFAMetadataTestCase
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.011 sec
[junit] 
[junit] Testsuite: org.apache.fop.render.pdf.PDFBorderPainterTestCase
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] 
[junit] Testsuite: org.apache.fop.render.pdf.PDFCMapTestCase
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.001 sec
[junit] 
[junit] Testsuite: org.apache.fop.render.pdf.PDFEncodingTestCase
[junit] Tests run: 2, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 
0.043 sec
[junit] 
[junit] Testcase: 
testPDFEncodingWithCustomFont(org.apache.fop.render.pdf.PDFEncodingTestCase):SKIPPED:
 This should be tested using PDFBox. If PDFBox can extract the text 
correctly,everything is fine. The tests here are too unstable.
[junit] Testsuite: org.apache.fop.render.pdf.PDFGraphicsPainterTestCase
[junit] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.017 sec
[junit] 
[junit] Testsuite: org.apache.fop.render.pdf.PDFPainterTestCase
[junit] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.02 sec
[junit] 
[junit] Testsuite: org.apache.fop.render.pdf.PDFRendererConfigParserTestCase
[junit] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
0.33 sec
[junit] 
[junit] Testsuite: 
org.apache.fop.render.pdf.PDFRendererOptionsConfigTestCase
[junit] Tests run: 3, Failures: 0, Er