Code Monkey home page Code Monkey logo

svg2emf's People

Contributors

behumble avatar

Watchers

James Cloos avatar  avatar

svg2emf's Issues

svg2emf does not respect SVG page settings

Margins (empty area) on the right and bottom are not preserved during 
conversion, and this can be disturbing.

Currently I have to add a white box on the bottom-right corner to prevent this.

Original issue reported on code.google.com by [email protected] on 28 May 2013 at 5:52

Failed to convert certain SVG

With downloaded svg2emf:

[SVG2EMF] input : file:/home/dword/桌面/OE/UThesis/figs/edfsa_types.svg
Graphics2D from BufferedImage lacks BUFFERED_IMAGE hint
Graphics2D from BufferedImage lacks BUFFERED_IMAGE hint
Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.freehep.graphicsio.emf.gdi.AlphaBlend.write(AlphaBlend.java:139)
        at org.freehep.graphicsio.emf.EMFTag.write(EMFTag.java:45)
        at org.freehep.util.io.TaggedOutputStream.writeTag(TaggedOutputStream.java:89)
        at org.freehep.graphicsio.emf.EMFOutputStream.writeTag(EMFOutputStream.java:242)
        at org.freehep.graphicsio.emf.EMFGraphics2D.writeImage(EMFGraphics2D.java:424)
        at org.freehep.graphicsio.AbstractVectorGraphicsIO.drawImage(AbstractVectorGraphicsIO.java:482)
        at org.freehep.graphicsio.AbstractVectorGraphicsIO.drawImage(AbstractVectorGraphicsIO.java:371)
        at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:361)
        at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:455)
        at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:549)
        at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165)
        at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509)
        at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165)
        at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(CanvasGraphicsNode.java:159)
        at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509)
        at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165)
        at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509)
        at net.hanjava.svg.SVG2EMF.convert(SVG2EMF.java:47)
        at net.hanjava.svg.CLI.main(CLI.java:29)
Caused by: java.lang.NullPointerException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.freehep.graphics2d.PixelGraphics2D.<clinit>(PixelGraphics2D.java:101)
        ... 19 more

With self-compiled version + freehep-graphicsio-emf 2.2.1:

[SVG2EMF] input : file:/home/dword/桌面/OE/UThesis/figs/edfsa_types.svg
Graphics2D from BufferedImage lacks BUFFERED_IMAGE hint
Graphics2D from BufferedImage lacks BUFFERED_IMAGE hint
Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.freehep.graphicsio.emf.gdi.AlphaBlend.write(AlphaBlend.java:139)
        at org.freehep.graphicsio.emf.EMFTag.write(EMFTag.java:45)
        at org.freehep.util.io.TaggedOutputStream.writeTag(TaggedOutputStream.java:99)
        at org.freehep.graphicsio.emf.EMFOutputStream.writeTag(EMFOutputStream.java:242)
        at org.freehep.graphicsio.emf.EMFGraphics2D.writeImage(EMFGraphics2D.java:425)
        at org.freehep.graphicsio.AbstractVectorGraphicsIO.drawImage(AbstractVectorGraphicsIO.java:482)
        at org.freehep.graphicsio.AbstractVectorGraphicsIO.drawImage(AbstractVectorGraphicsIO.java:371)
        at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:361)
        at org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(GraphicsUtil.java:455)
        at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:549)
        at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165)
        at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509)
        at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165)
        at org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(CanvasGraphicsNode.java:159)
        at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509)
        at org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(CompositeGraphicsNode.java:165)
        at org.apache.batik.gvt.AbstractGraphicsNode.paint(AbstractGraphicsNode.java:509)
        at net.hanjava.svg.SVG2EMF.writeEmf(SVG2EMF.java:93)
        at net.hanjava.svg.SVG2EMF.convert(SVG2EMF.java:40)
        at net.hanjava.svg.CLI.main(CLI.java:29)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 20
        at sun.font.FontManager.registerCompositeFont(FontManager.java:517)
        at sun.java2d.SunGraphicsEnvironment.initCompositeFonts(SunGraphicsEnvironment.java:1136)
        at sun.java2d.SunGraphicsEnvironment.access$600(SunGraphicsEnvironment.java:77)
        at sun.java2d.SunGraphicsEnvironment$2.run(SunGraphicsEnvironment.java:351)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.java2d.SunGraphicsEnvironment.<init>(SunGraphicsEnvironment.java:163)
        at sun.awt.X11GraphicsEnvironment.<init>(X11GraphicsEnvironment.java:253)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
        at java.lang.Class.newInstance0(Class.java:374)
        at java.lang.Class.newInstance(Class.java:327)
        at org.freehep.graphics2d.PixelGraphics2D.<clinit>(PixelGraphics2D.java:111)
        ... 20 more

The output is an empty emf.

Original issue reported on code.google.com by [email protected] on 28 May 2013 at 5:39

Attachments:

SVG text is rendered as a shape rather than text

What steps will reproduce the problem?
1. Create an SVG image including text nodes
2. Convert using SVG2EMF
3. Open EMF in Powerpoint

What is the expected output? What do you see instead?

I see the text displayed as shapes with a border and fill colour. These can be 
resized, but cannot be edited as text, which is a little frustrating.

I would expect to see them simply rendered as text with the same properties as 
they had on the original SVG document. 

What version of the product are you using? On what operating system?

Using version 0.0.3-SNAPSHOT on Ubuntu 14.04 

Please provide any additional information below.

Tracking through this appears to happen because the text elements are being 
passed through the Batik GVT TextPainter which renders them as shapes. 

Original issue reported on code.google.com by [email protected] on 23 Oct 2014 at 3:00

memory leak on exception

What steps will reproduce the problem?
1. convert malformed(or very complex) svg to emf
2. exception is occurred
3. repeat above steps

What is the expected output? What do you see instead?
expect sliently quit.
but out of memory error is occurred.

What version of the product are you using? On what operating system?
vista/jdk1.5.0_13

Please provide any additional information below.
the attached source is my test case to convert svg files on  openclipart.org 
into emf.  

Original issue reported on code.google.com by [email protected] on 3 Jan 2008 at 3:00

  • Blocking: #7

Attachments:

Conversion will fail when patterns are used in SVG file

This one will fail:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" baseProfile="full" height="560" 
id="aa24712a319014de77041d7cd7d49e9d2d358dad_svg" width="509">
    <defs>
        <pattern height="10" id="chart3containerModel.representation.4.1" patternUnits="userSpaceOnUse" width="10" x="0" y="0">
            <rect fill="white" height="10" width="10" x="0" y="0" />
            <line stroke="#323232" stroke-width="2" x1="10" x2="-20" y1="-10" y2="20" />
            <line stroke="#323232" stroke-width="2" x1="15" x2="-15" y1="-10" y2="20" />
            <line stroke="#323232" stroke-width="2" x1="20" x2="-10" y1="-10" y2="20" />
            <line stroke="#323232" stroke-width="2" x1="25" x2="-5" y1="-10" y2="20" />
            <line stroke="#323232" stroke-width="2" x1="30" x2="0" y1="-10" y2="20" />
        </pattern>
    </defs>
    <g id="chart3containerModel_aa24712a319014de77041d7cd7d49e9d2d358dad_svg">
        <rect fill="url(#chart3containerModel.representation.4.1)" height="146" id="chart3containerModel.representation.4.1" width="19" x="172.5" y="396.5" />
        <rect fill="none" height="146" id="chart3containerModel.representation.4.1" stroke="#323232" width="19" x="172.5" y="396.5" />
    </g>
</svg>

Original issue reported on code.google.com by [email protected] on 24 Apr 2013 at 4:01

Stream convert

Add version of "convert" method into SVG2EMF class that accepts svg as 
InputStream and outputs emf into OutputStream.

Original issue reported on code.google.com by [email protected] on 7 Jan 2013 at 12:15

  • Blocking: #7

Memory Leak

there are memory leaks when exception occurs.

Original issue reported on code.google.com by [email protected] on 2 Jan 2008 at 11:43

  • Merged into: #2

jar file has no main class (fix included)

What steps will reproduce the problem?
Run 'mvn assembly:single' and then java -jar svg2emf...jar

What is the expected output? What do you see instead?
It should not complain about missing class

What version of the product are you using? On what operating system?
Latest on SVN, affects all operating system

Please provide any additional information below.

Here's the fix. Modify the pom.xml so that...

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>net.hanjava.svg.CLI</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>
                            jar-with-dependencies
                        </descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>

Original issue reported on code.google.com by [email protected] on 30 Nov 2011 at 10:50

  • Blocking: #7

Circuits which have text as well as shapes, EMF is having text distorted

What steps will reproduce the problem?
1. Use the file http://imgh.us/POR_Deadbat.svg


What is the expected output? What do you see instead?
Expected output is where EMF file has fine text quality too.

What version of the product are you using? On what operating system?
NA as it's java

Please provide any additional information below.
NA

Original issue reported on code.google.com by [email protected] on 7 Aug 2015 at 5:35

conversion failed

What steps will reproduce the problem?
Please try to convert the attached multidepthpie.svg file into an EMF file
using:

svg2emf multidepthpie.svg

What is the expected output? What do you see instead?
I can only get an empty EMF file.

What version of the product are you using? On what operating system?
I'm using the newest version of svg2emf on Windows XP 64-bit.

Please provide any additional information below.
According to my test, svg2emf will crash entirely for charts that have
gradient shaded borders or lines. 

Original issue reported on code.google.com by [email protected] on 6 Apr 2010 at 1:50

Attachments:

EMF DPI Settings are incorrect. Image is skewed when imported into microsoft word

What steps will reproduce the problem?
1. Use the attached SVG file to generate an EMF
2. Import the file into Microsoft word
3. You'll notice that the text on the x-axis is compressed horizontally.  
Inspection of the image properties in windows XP shows a higher horizontal 
resolution setting (152, vs 126). (This property is not shown in Windows 7.)  
The result of the bad dpi settings is that the image is compacted horizontally. 


The issue exists on windows xp, windows 7, and microsoft word 2003, and 2007.  
The screenshot compares the display of an emf file within word to the svg in 
internet explorer. The expected size of the emf file as rendered in word at 96 
dpi should be 11 by 8.5 inches 



Original issue reported on code.google.com by [email protected] on 28 Nov 2012 at 9:58

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.