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

MH commented on FOP-2495:
-------------------------

Thanks for the hint, but even though I had some progress (my resolver get's 
fired), only parts work again. Other parts still don't work:

EVen though I log out all calls of my resolver's getResource() URIs, and adjust 
them to the paths of our app, we still get file not found errors - e.g. in the 
IFConcatenator:

------------
111303024 SEVERE  SVG error: Image not found: 
file:1_4986/3_R_Result_40/C_PerfFigSer_M.svg
    java.io.FileNotFoundException: Image not found: 
file:1_4986/3_R_Result_40/C_PerfFigSer_M.svg
        at 
org.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.needSource(AbstractImageSessionContext.java:193)
        at 
org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:123)
        at 
org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:123)
        at 
org.apache.fop.svg.AbstractFOPImageElementBridge.createImageGraphicsNode(AbstractFOPImageElementBridge.java:78)
        at 
org.apache.batik.bridge.SVGImageElementBridge.buildImageGraphicsNode(Unknown 
Source)
        at 
org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode(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.drawImageUsingDocument(AbstractIFPainter.java:319)
        at org.apache.fop.render.pdf.PDFPainter.drawImage(PDFPainter.java:232)
        at 
org.apache.fop.render.intermediate.IFParser$Handler$ImageHandler.endElement(IFParser.java:796)
        at 
org.apache.fop.render.intermediate.IFParser$Handler.endElement(IFParser.java:413)
        at 
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1102)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)
        at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at 
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
        at org.apache.fop.render.intermediate.IFParser.parse(IFParser.java:108)
        at 
org.apache.fop.render.intermediate.util.IFConcatenator.appendDocument(IFConcatenator.java:106)
-----------------

It seems that the resolver is not fired through FI concatenation!?


We also get thousands of font errors:

 Font "FrutigerIC,normal,400" not found. Substituting with "any,normal,400".

even though I set a fixed (correct) <font-base> URI in the config.

> Embedding: missing migration documentation from FOP 1.x
> -------------------------------------------------------
>
>                 Key: FOP-2495
>                 URL: https://issues.apache.org/jira/browse/FOP-2495
>             Project: FOP
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 2.0
>         Environment: WIndows, Java 8, FOP 1.0
>            Reporter: MH
>            Priority: Blocker
>              Labels: documentation
>
> Because of bug FOP-2177 we couldn't upgrade form FOP 1.0 to FOP 1.1. FOP 2.0 
> has solved this bug (tested with standalone FOP scripts).
> Now we would like to upgrade our Java code from FOP 1.0 to FOP 2.0. The 
> Upgrading page (https://xmlgraphics.apache.org/fop/2.0/upgrading.html) says 
> "You should encounter very few issues in upgrading from FOP 1.0, except as 
> noted in the following: ...". The truth is completely different: starting by 
> replacing fop.jar, our code gets dozens of compiler errors! Many methods are 
> simply gone:
> FopFactory.newInstance()
> FoUserAgent.setBaseURL(String);
> FopFactory.getFontManager().setFontBaseURL(String)
> FopFactory.setURIResolver(URIResolver);
> etc.
> The javadocs from 1.1 to 2.0 simple changed - no deprecated methods, no hints 
> how to replace old methods.
> The FOP 2.0 embedding page 
> (https://xmlgraphics.apache.org/fop/2.0/embedding.html) just shows simple 
> examples to start from the ground. I can't find any migration help how to 
> replace old code. 
> E.g. how can I set the font base? 
> FopFactory.getFontManager().setFontBaseURL(String) is gone and I can't find 
> any equivalent code for FOP 2.0!
> This is a major bug in FOP 2.0 as API changes are not documented to upgrade 
> from FOP 1.x Java API to FOP 2.0!
> Now I just can search and try and experiment if I get our old code somehow 
> running with all those undocumented API changes. Can you please state a 
> migration documentation for all methods (method signatures) that don't exist 
> anymore? We can't start coding all over again from scratch. Thank you very 
> much!



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

Reply via email to