Questions tagged [batik]

Batik is a Java-based toolkit for applications or applets that want to use images in the Scalable Vector Graphics (SVG) format for various purposes, such as display, generation or manipulation.

Apache Batik is a Java-based toolkit for applications or applets that want to use images in the Scalable Vector Graphics (SVG) format for various purposes, such as display, generation or manipulation.

The project’s ambition is to give developers a set of core modules that can be used together or individually to support specific SVG solutions. Examples of modules are the SVG Parser, the SVG Generator and the SVG DOM. Another ambition for the Batik project is to make it highly extensible —for example, Batik allows the developer to handle custom SVG elements. Even though the goal of the project is to provide a set of core modules, one of the deliverables is a full fledged SVG browser implementation which validates the various modules and their inter-operability.

The Batik toolkit includes the following:

Modules:

  • An SVG DOM implementation
  • A set of SVG microsyntax parsers
  • A scripting module
  • A generator that creates an SVG document from Java2D calls
  • A Swing SVG component
  • A transcoder module

Tools and applications:

  • Squiggle, an SVG browser
  • An SVG rasterizer
  • A to SVG converter
  • A pretty printer for SVG source files

Official Website: http://xmlgraphics.apache.org/batik/

Useful Links:

391 questions
0
votes
2 answers

How to set a transparent Icon from a transparent SVG file

I have a transparent SVG file. I would like to use it as the icon of a JLabel, via setIcon(). I use Batik for SVG, but I don't know how to do this. Can you help me ? Thanks :)
g123k
  • 3,748
  • 6
  • 42
  • 45
0
votes
0 answers

Is there an easy way to tell JSVGComponent to scale SVG image to fit the preferred size?

I tried setting the preferred size, but the SVG image stays the same. Same if I set the size as well. Furthermore, if it does not fit, then nothing is rendered. Batik only has Javadoc and few pages about the architecture. What I am working on is…
DejanLekic
  • 18,787
  • 4
  • 46
  • 77
0
votes
1 answer

Batik Java - JSVGCanvas Gradient not rendering?

I am creating a small program that will make an SVG file based on options I select. The problem I am having is that JSVGCanvas (from Batik) will not seem to render gradients that are made (using the DOM api). The weird part is, if I export the file…
David L
  • 33
  • 6
0
votes
1 answer

Java & SVG using the img tag

In reference to this post I am creating a charting engine and I have everything setup where a GET request returns an SVG. I am using JFreeSVG (extremely similar to Batik). I can render the SVG using a iframe and object HTML tag. I want to use a img…
Sep
  • 43
  • 1
  • 9
0
votes
1 answer

Batik - how do I find the "fill" colour of a TextNode?

I am trying to use Batik to perform an SVG conversion and it is going alright except that I can't seem to find out where the value of the fill attribute for the original SVG document is stored on the Batik TextNode element. So in my SVG I have the…
glenatron
  • 11,018
  • 13
  • 64
  • 112
0
votes
1 answer

Can't write JPEG files using Batik java.io.FilePermission PYCC.pf read

https://issues.apache.org/jira/browse/BATIK-1062 I'm running into the issue outlined in the Jira issue above. Based on the comment from over a year ago, this issue seems to have been resolved. I am not a Java developer, so I'm not sure what the…
Siraris
  • 1,088
  • 3
  • 13
  • 21
0
votes
0 answers

Linking embedded Svg in Xsl-Fo Pdf

I'm playing with Xml--xslt-->xsl-fo-->pdf and I'm finding a way to include reference inside sub-block of svg image to have the possibility to link to them from other part of the document. Actually I'm using Saxon to trasform the xml to xsl-fo and…
profires
  • 13
  • 2
0
votes
1 answer

SVG Rendering Error in Batik/Eclipse

I have been using Batik with Eclipse for a year, and came across a rendering error I cannot seem to shake. I have reduced it to a minimal set and placed the image on flickr:https://www.flickr.com/photos/dattatreya/15019722962/. I expect to see a…
0
votes
2 answers

HeadlessException thrown by Apache Batik 1.7 WMFTranscoder

I use this code successfully in a Java desktop application (JUnit tests in NetBeans) to generate SVG from WMF data: InputStream wmfStream = new ByteArrayInputStream(wmfBytes); WMFTranscoder transcoder = new WMFTranscoder(); TranscoderInput wmf = new…
mjn
  • 36,362
  • 28
  • 176
  • 378
0
votes
2 answers

Java Create element in SVG DOM

I create a Java application to modify some SVG files. Here is my issue : I would like to add an elements to the DOM of my SVG files to create link on a rectangle. The SVG file is generated from another application. I need to do it in Java. So here…
0
votes
1 answer

Error exporting vaadin chart to pdf, using Batik and Itext

everyone. I'm getting this error when I try to export a chart to a pdf file. I took the example from the Itext site and implemented it in my code. This is a snippet of the code where it does the exportation else if (isGrafico(componente)) { …
0
votes
1 answer

Java : Batik exception

Thanks in advance for your help ! I've encountered a problem using batik with an svg file I'm actually creating with the svg I got from my html element. The exception I get is: org.apache.batik.bridge.BridgeException: The markup in the document…
0
votes
0 answers

Access svg path 'd' attribute

I have added SVG path element into a nodelist and I can print out the length of the list. May I know how to access the path 'd' attribute of the node. svgDoc = domObj.createDoc(f.toURL().toString()); NodeList svgPathList =…
0
votes
1 answer

org.w3c.dom.Document undo in java

Is it possible to apply an UndoManager() to an org.w3c.dom.Document? If not, is there any way for undo / redo an org.w3c.dom.Document? Thanks in advance.
Javier
  • 189
  • 3
  • 16
0
votes
1 answer

Highcharts - Export PDF texts as text (and not vectorized shapes)

I export an Highcharts chart as a PDF file, everything's fine. But when I open this chart in Adobe Illustrator (to change some text) : the characters are all vectorized so, to change the text, I have to delete all my text and rewrite another…
kmas
  • 6,401
  • 13
  • 40
  • 62