batik


Having problems with Apache Batik library on AWS ElasticBeanstalk Instance

南笙酒味 提交于 2020-01-14 18:45:15
问题 I am using AWS Elasti Beanstalk to power one of my apps. In this I need to export a svg document to png,jpg, pdf etc. For this I use Apache Batik library. This provides excellent output on my local dev workstation but as soon as I deploy it on the EBS I start getting errors, all related to fonts. The error stacktrace was - Caused by: java.lang.Error: Probable fatal error:No fonts found. at sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1088) at sun.font.FontManager

Generating PDF with iText and batik

倖福魔咒の 提交于 2020-01-14 02:30:14
问题 I'm trying to export text and SVG graphs to a PDF. I found out that iText and batik can do this. So I tried doing that, but everytime I put in a graph, it would become extraordinary small. I thought it might be something with my code, so I figured I would try an examplecode from Vaadin. public class PdfExportDemo { private String fontDirectory = null; private final String baseFont = "Arial"; private PdfWriter writer; private Document document; private Font captionFont; private Font normalFont

SVG line not getting rendered properly in PDF

我的未来我决定 提交于 2020-01-02 11:02:14
问题 I am using iText and some SVG rendering library. I want to render a SVG image to PDF. I am using following code to do that. Now the problem is I am giving an area chart SVG to it, it is not rendering line properly. Attaching screenshots. Following classes has been used: import org.apache.batik.bridge.BridgeContext; import org.apache.batik.bridge.DocumentLoader; import org.apache.batik.bridge.GVTBuilder; import org.apache.batik.bridge.UserAgent; import org.apache.batik.bridge.UserAgentAdapter;

SVG line not getting rendered properly in PDF

a 夏天 提交于 2020-01-02 11:01:30
问题 I am using iText and some SVG rendering library. I want to render a SVG image to PDF. I am using following code to do that. Now the problem is I am giving an area chart SVG to it, it is not rendering line properly. Attaching screenshots. Following classes has been used: import org.apache.batik.bridge.BridgeContext; import org.apache.batik.bridge.DocumentLoader; import org.apache.batik.bridge.GVTBuilder; import org.apache.batik.bridge.UserAgent; import org.apache.batik.bridge.UserAgentAdapter;

How to resize an svg (with batik) and display it?

a 夏天 提交于 2020-01-01 12:13:14
问题 I have a svg file of 100x100 pixels (for example). I am using Batik. If I do a : JSVGCanvas svg = new JSVGCanvas(); [...] svg.setSize(10,10); It will only show this part of the picture and not the resized image. Do you know how I can display a resized svg picture ? Thanks ;) 回答1: You need to ensure that the document you are displaying has a viewBox="" attribute set on its root <svg> element. For example, specifying viewBox="100 100 300 200" indicates that the region (100,100)→(400,300) will

How to resize an svg (with batik) and display it?

◇◆丶佛笑我妖孽 提交于 2020-01-01 12:12:11
问题 I have a svg file of 100x100 pixels (for example). I am using Batik. If I do a : JSVGCanvas svg = new JSVGCanvas(); [...] svg.setSize(10,10); It will only show this part of the picture and not the resized image. Do you know how I can display a resized svg picture ? Thanks ;) 回答1: You need to ensure that the document you are displaying has a viewBox="" attribute set on its root <svg> element. For example, specifying viewBox="100 100 300 200" indicates that the region (100,100)→(400,300) will

grails 2.3 java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/SVGOMDocument

牧云@^-^@ 提交于 2019-12-24 14:31:10
问题 When i run my grails application in tomcat i get the following error java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/SVGOMDocument . But the batik-svg-dom.1.7.jar is packaged in the war and in the classpath. I don't however get this error when i am running the application in debug mode in STS. I am using Grails 2.3 and building my war using maven. I am using FOP and have excluded the "xml-apis". I have tried to place the batik-svg-dom.jar in the lib folder of tomcat, that did not

Batik Incompatible object argument for function call

跟風遠走 提交于 2019-12-24 09:39:57
问题 I am seeing the following error while trying to load an svg document in to JSVG panel. Exception occurred in target VM: (class: org/apache/batik/bridge/BridgeContext, method: dispose signature: ()V) Incompatible object argument for function call java.lang.VerifyError: (class: org/apache/batik/bridge/BridgeContext, method: dispose signature: ()V) Incompatible object argument for function call at org.apache.batik.swing.svg.JSVGComponent.createBridgeContext(Unknown Source) at org.apache.batik

Infinite scan for fonts in Apache FOP on CentOS

不想你离开。 提交于 2019-12-24 07:16:07
问题 I use Apache Batik to convert SVG into PDF in one of the projects. The project is Spring application running in Tomcat 7. Everything works OK on development machine which runs under Ubuntu with Tomcat being started using $CATALINA_HOME/bin/startup.sh. But when I try to run the app on production server with CentOS 6 and Tomcat started using service tomcat7 start command the app falls into infinite loop on convertation. I've tried to debug the problem and found this piece of code: /** * Creates

Requested: https://www.w3.org/2000/svg Found: http://www.w3.org/2000/svg [duplicate]

ε祈祈猫儿з 提交于 2019-12-23 09:41:54
问题 This question already has an answer here : XML Namespace URI with HTTPS? (1 answer) Closed 2 years ago . We are using Apache Batik to render SVG files. For security reasons, all the URLs are converted to HTTP. Now, when we are rendering the SVG files, we get this issue. Original SVG is: svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" Converted SVG is: svg xmlns=\"https://www.w3.org/2000/svg\" xmlns:xlink=\"https://www.w3.org/1999/xlink\" So, I tried with

工具导航Map