batik

Batik fails on transformations since JRE 1.7.0_25

徘徊边缘 提交于 2019-12-06 07:01:17
问题 Since I updated to JRE 1.7.0_25, batik throws exceptions when applyling transformations. The stacktrace is: java.awt.image.ImagingOpException: Unable to transform src image at java.awt.image.AffineTransformOp.filter(Unknown Source) at org.apache.batik.ext.awt.image.rendered.AffineRed.genRect(AffineRed.java:193) at org.apache.batik.ext.awt.image.rendered.AffineRed.copyData(AffineRed.java:109) at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:88) at org.apache.batik.ext.awt

Apache Batik Transcoder inside Docker Container Blocking

一曲冷凌霜 提交于 2019-12-06 02:53:22
We're running a Spring application within a docker container. Our application can take SVG files and transform them into PDF format to be embedded within a PDF. The application works correctly on osx and transcodes as expected. However when run from inside a docker container, which has a different file system, the transcoder gets stuck and thrashes the cpu in some bizarre recursive file searching loop. java.lang.Thread.State: RUNNABLE at java.io.UnixFileSystem.getBooleanAttributes0(Native Method) at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:242) at java.io.File.isFile

Batik with grails giving sax clash

北城余情 提交于 2019-12-05 14:15:21
I'm trying to use batik with grails to render some SVG stuff to PNG on the server. I'm getting the following error in IntelliJ when I add the dependencies to BuildConfig and then tell IntelliJ to load the changes: /Library/Java/JavaVirtualMachines/1.6.0_33-b03-424.jdk/Contents/Home/bin/java -Dgrails.home=/Applications/Dev/grails-2.1.0 -Dbase.dir=/Users/greg/Documents/development/git/liftyourgame-grails/webapp -Dtools.jar=/Library/Java/JavaVirtualMachines/1.6.0_33-b03-424.jdk/Contents/Home/lib/tools.jar -Dgroovy.starter.conf=/Applications/Dev/grails-2.1.0/conf/groovy-starter.conf -Xmx512M -XX

Scaling an SVG in Java

元气小坏坏 提交于 2019-12-04 17:36:06
问题 I'm attempting to scale an image, modify it, and then output to another image format. So far, I've been using the apache batik library. For simple conversion, this is easy. For clipping the svg, this is easy. However, I can't seem to figure out how to scale to the full image created by the svg. That is, I can specify the area of interest as a bounding rectangle, and then scaling works over the bounding rectangle, but I do NOT know how to scale over the image of the svg. This is what I have so

batik: svg to pdf on linux (no X server)

心已入冬 提交于 2019-12-04 16:05:29
Similar to approach in Convert SVG to PDF the svg2pdf conversion runs successfully under windows and text items are searchable in the resulting pdf. It produces pdfs (with -Djava.awt.headless=true to avoid exceptions due missing X11 window server) under linux (Ubuntu) as well, but the text items are not searchable and sometimes are even coded as images. Is it possible to preserve text in pdf under linux as well, am I missing some runtime options? UPD: Can I somehow force batik (SVGGraphics2D or SVGConverter) to fall back to a default font, if certain font wasn't found? Solved by following the

Batik fails on transformations since JRE 1.7.0_25

萝らか妹 提交于 2019-12-04 14:54:45
Since I updated to JRE 1.7.0_25, batik throws exceptions when applyling transformations. The stacktrace is: java.awt.image.ImagingOpException: Unable to transform src image at java.awt.image.AffineTransformOp.filter(Unknown Source) at org.apache.batik.ext.awt.image.rendered.AffineRed.genRect(AffineRed.java:193) at org.apache.batik.ext.awt.image.rendered.AffineRed.copyData(AffineRed.java:109) at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:88) at org.apache.batik.ext.awt.image.rendered.PadRed.copyData(PadRed.java:88) at org.apache.batik.ext.awt.image.rendered.Any2sRGBRed

Unable to edit SVG using Batik in Java?

安稳与你 提交于 2019-12-04 06:02:20
问题 I have a student card SVG that has name, id and other field that I want to edit through Java, as the user inputs them using GUI. I have successfully parsed the SVG using Batik but I can't see the changes that I made in SVG file when I open it. String parser = XMLResourceDescriptor.getXMLParserClassName(); SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser); String uri = "card.svg"; try { Document doc = f.createDocument(uri); NodeList nodeList = doc.getChildNodes(); Element svg = doc

How do I superimpose one SVG image onto another using Apache Batik?

ぐ巨炮叔叔 提交于 2019-12-04 00:38:15
问题 I have 2 SVG files I need to overlay using Batik. One file serve as the background image and is 308px by 308px while the second file (260px by 260px) is the foreground image that must be centered (that is at the center of the background image). I'd like the result of the operation to be saved in a third SVG file. If you are familiar with Batik, I'd appreciate your suggestions. Thanks, Olivier. 回答1: If you don't need to include the contents of the background and foreground documents in the

Scaling an SVG in Java

馋奶兔 提交于 2019-12-03 11:20:46
I'm attempting to scale an image, modify it, and then output to another image format. So far, I've been using the apache batik library. For simple conversion, this is easy. For clipping the svg, this is easy. However, I can't seem to figure out how to scale to the full image created by the svg. That is, I can specify the area of interest as a bounding rectangle, and then scaling works over the bounding rectangle, but I do NOT know how to scale over the image of the svg. This is what I have so far: ... //set the output width and height transcoder.addTranscodingHint( PNGTranscoder.KEY_WIDTH, new

Swing & Batik: Create an ImageIcon from an SVG file?

随声附和 提交于 2019-12-03 04:21:11
问题 Simply put, I'm looking for a way to make an ImageIcon from an SVG file using the batik library. I don't want to have to raster the SVG to disk first, I just want to be able to pull an svg out of the jar file and have it land as a UI element. I feel like this should be reasonably easy, but the batik javadocs aren't telling me what I need to know. (Why batik? Well, we're already using it, so we don't have to run another library past legal.) 回答1: It's really quite easy, just not very intuitive.