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:

367 questions
0
votes
1 answer

Adding a JfreeChart to SVG Image

I have a SVG image (a Map of a country) and I am trying to add a JfreeChart on top of it which would show 3d Bars on particular locations. Can someone please help point out how do i add a JfreeChart to an existing SVG image. Following is the code so…
Amit
  • 143
  • 1
  • 14
0
votes
1 answer

Interactive SVG - how to choose element to react on mouseover action?

I am trying to make an interactive SVG that would react on different user actions (mouse over, click etc.). I am using java Batik, but it will be enough, if you just describe me how to approach my problem in XML. Clicking function works for me just…
Smajl
  • 6,702
  • 23
  • 97
  • 163
0
votes
1 answer

Writing unicode characters with Batik doesn't work

I am writing a project with Batik, which is for multi-language image. Therefore I need signs like "sigma" or "alpha". I have to write the character as text - not as a polygon or as a glyph - because it has to be written by my project again. If I…
Luke
  • 1
  • 1
0
votes
2 answers

Highchart / Easyphp / Batik

I'm running both OS : mac os X and windows xp. On mac os X, i'm running MAMP and I used the solution Batik to export my chart (highchart) on my own server. Everything is doing well. On windows xp, I'm running Easyphp. Unfortunately, I'm not able to…
megahigh
  • 11
  • 1
0
votes
1 answer

Converting SVG with parameters to another file type?

on my website, I have an SVG image which is generated using parameters from a form that a user selects. All works fine, but I'm struggling to think of a way to do the next part. Once the user is finished, they click a button... I want this button to…
user1952067
  • 97
  • 1
  • 8
0
votes
2 answers

java.lang.NoClassDefFoundError while reading a svg file as BufferedImage

i have a .svg file to create a Map which will have Listeners relevant to boundaries (i guess its called "nodes" of a scalable vector graphic). However, i'm trying to add this file as a BufferedImage over a JPanel. (i'm a newbie about swing…
quartaela
  • 2,289
  • 14
  • 52
  • 89
0
votes
1 answer

Why does Batik dislike the "d" attribute in my SVG image?

My simple SVG image (below) seems to work in some applications, but not others. In a Java/Batik app, for instance, complains that - 'The attribute "d" of the element is invalid.' Can anyone see what part of the "d" attribute Batik would…
0
votes
1 answer

Checking SVG Upload using Batik

I try to examine uploaded SVG graphics and look for image elements to read there href attribute. I am using Batik 1.7 to search for corresponding elements. By using 'getElementsByTagName' / 'getElementsByTagNameNS' I only get an empty list. Here is…
Franatique
  • 75
  • 1
  • 4
0
votes
1 answer

How to scale a word cloud?

I'm working on word cloud generation. My words should appear in a rectangle of (0, 0, w, h), where w is the max width and h is the max height. I already have an algorithm for generating the word cloud, but sometimes the words go outside the bounds…
Lajos Arpad
  • 45,912
  • 26
  • 82
  • 148
0
votes
1 answer

Create SVG file from many small svg files in java

I'm currently working with JavaFX 2.2 und Batik. I have an application with a pane on which you can drag multiple SVG pictures. This is all working out, and the svg code of each picture is stored in each object, so I can get that, too. However now I…
user1582432
  • 645
  • 2
  • 7
  • 9
0
votes
1 answer

JSVGCanvas.getSVGDocument() is returning null?

I seem to have a problem working with batikSVG for manupilating SVG using Java. I can display the SVG just fine on the JSVG Canvas but when I try to the canvas's SVGDocument using getSVGDocument it seems to return null. Why is that, and how can I…
Bashir Beikzadeh
  • 691
  • 8
  • 15
0
votes
2 answers

SVG generation fails from command line, but is successful with NetBeans

I have a strange issue. I'm currently trying myself out with svg generation and I use the following code to generate an svg file: public class SVGGenerator { private static void drawSquare(Graphics2D g2d) { g2d.setPaint(Color.blue); …
Lajos Arpad
  • 45,912
  • 26
  • 82
  • 148
0
votes
2 answers

Using Custom Element Factory When Reading SVG File Using Batik

I am trying to read a largish (1 MB) svg file that is exported from an old program. I do not have access to this program or the data. I only have this exported svg file and I will probably have to import a freshly exported svg file somewhat…
crowmagnumb
  • 5,059
  • 6
  • 28
  • 39
0
votes
1 answer

SVG to image quality reducing

My requirement is to convert .SVG to image. The SVG files are generated by internal tool. I am trying these by 2 approaches: Converting SVG to image using JPEG transcoder. My SVG files are complex maps, that has some text on it. The resulting…
varunrao321
  • 835
  • 2
  • 10
  • 17
0
votes
2 answers

Apache Batik - Exception: "content not allowed in prolog" converting PDF to JPEG

I am getting the an exception when I try to convert some PDF to JPEG, with the message "content not allowed in prolog". I am performing a two-step opertaion converting SVG to PDF and then PDF to image. I am facing this issue when I try to do the…
varunrao321
  • 835
  • 2
  • 10
  • 17
1 2 3
24
25