SVG in PDF

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SVG in PDF

Shaw, Richard A
SVG in PDF

When I put SVG in my FO for PDF printing I get the following error -

java.lang.NoSuchMethodError: org.apache.batik.bridge.UnitProcessor.createContext(Lorg/apache/batik/bridge/BridgeContext;Lorg/w3c/dom/Element;)Lorg/apache/batik/util/UnitProcessor$Context;

        at org.apache.fop.svg.SVGElement.layout(SVGElement.java:218)
        at org.apache.fop.fo.flow.InstreamForeignObject.layout(InstreamForeignObject.java:251)
        at org.apache.fop.fo.flow.TableCell.layout(TableCell.java:326)
        at org.apache.fop.fo.flow.TableRow.layout(TableRow.java:360)

Any idea why this is ?

I've looked in batik-all-1_5.jar and the method seems to be there.

A fragment on my fo is -

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xhtml="http://www.w3.org/1999/xhtml">


                            <fo:instream-foreign-object content-height="1em">
                                <svg:svg height="100" width="100" viewBox="-50 -50 100 100">
                                    <svg:circle r="50" style="fill:red; stroke:none"/>
                                    <svg:rect x="-40" y="-10" width="80" height="20" style="fill:white; stroke:none"/>
                                </svg:svg>
                            </fo:instream-foreign-object>


Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw  
Technical Design Authority - Information Solutions Consultancy  
Intelligent Transport Systems

Atkins Highways and Transportation
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: [hidden email]

www.atkinsglobal.com/its



This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.

The ultimate parent company of the Atkins Group is WS Atkins plc. Registered in England No. 1885586. Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW.

P Consider the environment. Please don't print this e-mail unless you really need to.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: SVG in PDF

Shaw, Richard A
SVG in PDF
I downloaded batik-1.5-fop-0.20-5.jar and replace the jar which is distributed with OPS and it works now. I'm just worried that I might have broken something else.
 

Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw  
Technical Design Authority - Information Solutions Consultancy  
Intelligent Transport Systems

Atkins Highways and Transportation
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: [hidden email]

www.atkinsglobal.com/its

 


From: Shaw, Richard A [mailto:[hidden email]]
Sent: 04 October 2007 09:19
To: [hidden email]
Subject: [ops-users] SVG in PDF

When I put SVG in my FO for PDF printing I get the following error -

java.lang.NoSuchMethodError: org.apache.batik.bridge.UnitProcessor.createContext(Lorg/apache/batik/bridge/BridgeContext;Lorg/w3c/dom/Element;)Lorg/apache/batik/util/UnitProcessor$Context;

        at org.apache.fop.svg.SVGElement.layout(SVGElement.java:218)
        at org.apache.fop.fo.flow.InstreamForeignObject.layout(InstreamForeignObject.java:251)
        at org.apache.fop.fo.flow.TableCell.layout(TableCell.java:326)
        at org.apache.fop.fo.flow.TableRow.layout(TableRow.java:360)
…

Any idea why this is ?

I've looked in batik-all-1_5.jar and the method seems to be there.

A fragment on my fo is -

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xhtml="http://www.w3.org/1999/xhtml">

…
                            <fo:instream-foreign-object content-height="1em">
                                <svg:svg height="100" width="100" viewBox="-50 -50 100 100">
                                    <svg:circle r="50" style="fill:red; stroke:none"/>
                                    <svg:rect x="-40" y="-10" width="80" height="20" style="fill:white; stroke:none"/>
                                </svg:svg>
                            </fo:instream-foreign-object>


Richard Shaw

¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤

Richard Shaw  
Technical Design Authority - Information Solutions Consultancy  
Intelligent Transport Systems

Atkins Highways and Transportation
Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW

Tel: +44 (0) 1372 756407 
Fax: +44 (0) 1372 740055
Mob: 07740 817586 
E-mail: [hidden email]

www.atkinsglobal.com/its



This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.

The ultimate parent company of the Atkins Group is WS Atkins plc. Registered in England No. 1885586. Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW.

P Consider the environment. Please don't print this e-mail unless you really need to.



This message has been scanned for viruses by MailControl



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws