Re: Rendering quality (subsampling)

2011-12-22 Thread Jeremias Maerki
I'm not a specialist on these matters, but AFAIK Batik basically uses
the Java2D/Graphics2D infrastructure from Java which may have limitations
in this regard at least on some platforms (probably even depending on
the OS backend). Enlarging the canvas for painting and then downscaling
the resulting bitmap might actually not be the worst idea in this case.
But maybe I'm missing something.

On 14.12.2011 15:01:55 Steve Maher wrote:
 Hi,
 
 I'm looking for a high-quality SVG renderer.  Batik's rasterizer seems to
 be the best out of the three I've tried, but I need it to do better.  I've
 tried all the image-rendering, shape-rendering, color-rendering hints
 without much (any?) change.  I've searched the source - mainly to try to
 increase any subsampling quantities - but had no luck.
 
 I'm dealing with small circles that need to be rendered correctly for a
 custom projector in our lab at work.
 
 For example, for a circle of radius .5 pixels (no stroke), and centered in
 the middle of a pixel (in other words, a circle touching the edges of a
 pixel), the rendered pixel intensity should be roughly PI/4 times the
 intensity of the circle (because the ratio of circle area to square area is
 PI/4).
 
 Also, if I rotate the circle by 45 degrees (rotation centered on corner of
 pixel), there will be a 4 pixel square used to render the circle, with most
 intensity split between two adjacent pixels and much less intensity split
 between the other two adjacent pixels.
 
 Batik comes close, but the intensity is high in the first case and in the
 second case, the intensity is not symmetric between the adjacent pixels
 (like the rotation wasn't exactly 45 degrees).
 
 One option I am exploring is to artificially enlarge the scene, render by 1
 pixel circle across, oh, 100 pixels, and then shrink the image.
  Effectively increasing the subsampling of the circle to determine pixel
 intensity.  I was hoping to be able to do that natively in the Batik source
 - or use some other SVG renderer.
 
 Any tips are appreciated -
 
 Regards,
 Steve




Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: ParsedURL and Virtuals Filesystems

2011-10-20 Thread Jeremias Maerki
I've looked into this some time ago. My idea was to add support for JAXP
URIResolvers like we did in Apache FOP. But ParsedURL seems to be so
knit into Batik that it's difficult to do that (without major
refactoring and API changes). Since I didn't have enough time, I
resorted to a URL protocol handler that is globally registered. You
could also implement a ParsedURLProtocolHandler but they are maintained
in a static variable in ParsedURL, so they, too, are global. No
connection with the user agent. For me, the normal URL protocol handler
works well enough for now, but I'm not entirely happy.

On 19.10.2011 23:00:20 Robert Marcano wrote:
 Greetings.
 
 I have been using Batik for a few years and I love its extensibility. I 
 even use the CSS Engine directly for a non SVG dialect document without 
 needing to add another library.
 
 My problem right now is that I need to run/paint the SVG file inside 
 some kind of virtual filesystem. The linked files inside the SVG 
 (xml-stylesheet processing instructions, images...) are not on a real 
 filesystem, they are on RAM isolated from any other SVG loaded. I tried 
 using ParsedURL to define a new protocol but despite the advantages of 
 it over the standard URL class, It still has the problem that protocol 
 handlers are global, I haven't found a way to isolate a protocol for 
 only a SVG document (I set the ParsedURL on the document directly 
 because there is no real URL for it). I tried using ThreadLocal to 
 create a ParsedURL protocol handler context aware, but I found many 
 problems with this approach, Batik is not single threaded, some external 
 to the svg resources are loaded with parsing, some of them are loaded on 
 threads created by Batik out of my control (script on the document that 
 add elements linking to external resources), so there is no easy way to 
 use a ThreadLocal for that.
 
 It would be nice if Batik could be extended with a VFS layer in order to 
 be able work with svg files that resides on things not directly mapped 
 to a virtual protocol, but that is something that I could hack a little 
 later, in the short them I need to solve this problem with something 
 less intrusive in the Batik codebase. Any help is really appreciated.
 
 Note: I thought about registering those virtual files on some kind of 
 global registry and then create a protocol handler accessing that 
 registry but I am trying to avoid anything with globals because I need 
 very good isolation between docs.
 
 Thanks in advance



Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: Configuring fonts for FOP used inside batik (SVGConverter)

2011-09-28 Thread Jeremias Maerki
Hi Matthias

I don't think DestinationType would be the right place to hold the
configuration information. That's the Main class where the command-line
parameters are processed and then set on the SVGConverter using simple
bean-style calls. SVGConverter.computeTranscodingHints() is then where
the parameters are turned into transcoding hints that make the
configuration for the transcoders. I'd probably rather look in that
direction.

However, as you noticed, the bigger problem is that the PDFTranscoder
currently doesn't support setting a URIResolver. It does support setting
an EntityResolver programmatically but that doesn't help with resolving
fonts since only a dummy FontResolver is set up [1].
Also, a font configuration can currently only be set via
PDFTranscoder.configure() (i.e. no transcoding hint) which requires an
Avalon Configuration object as parameter.

So, the whole business is not quite as simple at the moment. I think you
have two options:

1. Improve FOP's PDFTranscoder and AbstractFOPTranscoder to enable
setting configuration files and URIResolvers (for font resolution) via
transcoding hints. Then improve SVGConverter to support them. I'd
probably use an URI/URL as data type for the configuration file and let
the PDFTranscoder actually load it (using URIResolver as a helper if
available).

2. Don't use SVGConverter for creating PDFs from SVG. From the
command-line, FOP supports the -imagein parameter where you can create
PDFs directly from SVGs. There's very little magic behind that if you
want to reproduce that programmatically: Look for image2fo.xsl in FOP
and wrap the URI for your SVG in an image tag. See [2]. That way you
can use all of FOP's power with configuration and URIResolvers. The only
downside is that you can't transcode only parts of an SVG and maybe some
other smaller options supported by SVGConverter. Depends on your
requirements.

[1] 
org.apache.fop.svg.PDFDocumentGraphics2DConfigurator.createFontInfo(Configuration)
[2] org.apache.fop.cli.ImageInputHandler

BTW, copying some classes from Batik/FOP and modifying them is one way.
The other, better way, would be to modify Batik/FOP directly and post
patches for them so that additional functionality can be incorporated in
the products themselves (it's useful stuff after all). And it's how open
source software evolves.

HTH

On 28.09.2011 09:06:57 gerber wrote:
 Dear Batik Developers/Users
 
 Abstract: I have difficulty providing specific (not auto-detected) font 
 information to an SVGConverter instance for converting to PDF's.
 
 What we do:
 We are using batik to convert svg images in to different formats.
 We also use fop for transforming xml-files in to PDF's.
 One major thing is to supply the correct fonts for these libraries.
 I did so for fop when used as xslt-fo engine to create PDF's by supplying 
 a user configuration and and custom URIResolver to the FOP-Factory.
 We use an SVGConverter of batik instance for converting SVG in different 
 formats.
 The fonts work fine for images like image/png. I took care of this by 
 using java GraphicsEnvironment.
 The problem is, when I want to transform an svg-image in to a PDF. 
 There the fonts have to be supplied to fop, that is used inside batik 
 (SVGConverter).
 The problem is, that I am not able to supply the font configuration and 
 and URIResolver to the PDFTranscoder used inside SVGConverter.
 So I thought about extending the DestinationType class, which is 
 responsible for creating the PDFTranscoder,
 so that DestinationType can suppliy the  PDFTranscoder with the needed 
 font configuration.
 Unfortunately the class DestinationType is declared as final, so I can not 
 extend it.
 And additionally, PDFTranscoder knows nothing about custom URIResolver, as 
 far as i saw.
 I don't want to use the auto-detect feature, becaus of performance issues 
 (scans to much directories/jars for finding the fonts).
 
 Is there a way to add a font configuration and an URIResolver 
 programmatically (i think embedded is the term you use) to batik 
 SVGConverter for PDF-Transformation.
 I really would hate to copy the existing classes (SVGConverter, 
 DestinationType , PDFTranscoder ) and modify them :-)
 
 thanks for your help and best regards.
 Matthias Gerber
 

Gruess vo Lozärn uf Davos ufe,
Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: Placing SVG Text into PDF

2011-08-30 Thread Jeremias Maerki
Peppo,
I assume you're using the current Batik release. I recommend you
download Apache FOP 1.0 [1] and switch Batik's pdf-transcoder.jar with
FOP's build/fop-transcoder-allinone.jar. There have been some
improvements since the last Batik release and since the FOP 0.95 release.
By default, the PDFTranscoder should be enabling the auto-fonts
feature and therefore make available all operating system fonts for use
in PDF output. [2] might also help.

[1] http://xmlgraphics.apache.org/fop/download.html
[2] 
http://wiki.apache.org/xmlgraphics-fop/SvgNotes/PdfTranscoderTrueTypeEmbedding

On 30.08.2011 09:30:50 Peppo Herney wrote:
 Hello,
 
 I use batik to convert svg files to pdf files. It would be very helpful to
 have the text in the pdf version still as searchable text and not drawn as
 shapes by Batik, using the stroking text painter.
 In the manual [1] it says Batik will use normal PDF text [...], if the text
 can be drawn normally and the font is supported. I tried with a few svg
 files, but the text was always rendered.
 Can anybody please give me a hint under which circumstances or font batik
 produces regular text in the pdf file?
 
 Cheers
 
 [1] http://xmlgraphics.apache.org/fop/0.95/graphics.html#svg-pdf-text
 
 Peppo Herney
 Geoinformatiker
 
 EBERHARD  Partner AG
 General Guisan-Strasse 2
 5000 Aarau
 Telefon +41 (0) 62 834 40 60
 Direkt  +41 (0) 62 834 40 63
 Fax +41 (0) 62 834 40 61
 
 her...@eberhard-partner.ch
 
 www.eberhard-partner.ch - Ihr Partner für geothermische Anlagen
 www.heizanlagenvergleich.ch - Was kostet Ihre neue Heizung?
 www.info-geothermie.ch - Informationsstelle Geothermie
 www.vgka.ch - Strom aus Aargauer Erdwärme
 


Gruess vo Lozärn
Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: Placing SVG Text into PDF

2011-08-30 Thread Jeremias Maerki
Oops, you're right. I looked in the wrong FOP 1.0 extract. So, yes,
you'll have to build [1] it from the FOP 1.0 source distribution. Just
run ant package. If you're calling batik-rasterizer.jar (using java
-jar...), then it might be necessary to rename
fop-transcoder-allinone.jar to pdf-transcoder.jar so it'll be picked up.
The filenames are hard-coded in the manifest.

[1] http://xmlgraphics.apache.org/fop/1.0/compiling.html

On 30.08.2011 11:47:47 Peppo Herney wrote:
 Hello Jeremias,
 
 thank you for your quick reply. I downloaded fop and noticed that there is
 no fop-transcoder-allinone.jar included in the binary zip. Do I have to
 build it?
 I did not mention - i am just calling the batik-rasterizer.jar from
 commandline/python.
 
 Gruess
 
 Peppo Herney



Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: Create a multi page pdf using Batik

2011-08-22 Thread Jeremias Maerki
Hi Dayana,
no, I'm afraid it's not. There is some support in the underlying
PDFDocumentGraphics2D to create multiple pages
(PDFDocumentGraphics2d.nextPage()). But multi-page output is currently
not supported by the design of Batik's transcoders.

You could try to adapt code from PDFTranscoder (the PDF transcoder is
located in FOP, not Batik!) to try to implement painting on multiple
pages:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/

But it's probably easier if you just create one PDF for the whole SVG
and then take it apart with some PDF post-processor that supports tiling
a PDF (if that's what you want to do). I'm sure you'll find something on
the net.


On 22.08.2011 07:07:54 Dayana wrote:
 Hi,
 
 How is it possible to create multiple page pdf using batik PDFTranscoder?
 
 My SVG file is very big and I wish to convert it to multiple pages in pdf to
 print it across mutiple pages
 
 Any advice would be highly  appreciated.
 
 Thanks,
 Dayana
 
 --
 View this message in context: 
 http://batik.2283329.n4.nabble.com/Create-a-multi-page-pdf-using-Batik-tp3759367p3759367.html
 Sent from the Batik - Users mailing list archive at Nabble.com.
 



Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: generating png and pdf files

2011-04-14 Thread Jeremias Maerki
Hi Joris,
you obviously already have the code that paints against a Graphics2D
object. You use SVGGraphics2D to produce SVG.

For PNG and PDF you could, of course, use Batik's transcoders to convert
the SVG to PNG and PDF:
http://xmlgraphics.apache.org/batik/using/transcoder.html
But that would be inefficient because it requires two steps.

To create a PNG directly, create a BufferedImage and request a
Graphics2D from it:

Graphics2D g2d = (Graphics2D)bufImage.getGraphics();
// Print to the SVG Graphics2D object
graphComponent.getGraphControl().print(g2d);

Then use ImageIO to write the BufferedImage to a PNG file. See here for
ideas:
http://stackoverflow.com/questions/665406/how-to-make-a-color-transparent-in-a-bufferedimage-and-save-as-png

For PDF you can try the org.apache.fop.svg.PDFDocumentGraphics2D from
Apache FOP. Here's a usage example:
http://markmail.org/message/6s6us2hf34h2q3mv
PDFDocumentGraphics2D is also used by the PDFTranscoder for Batik to
create PDF from SVG.

HTH

On 13.04.2011 19:39:50 Joris Kinable wrote:
 Dear,
 
 I have a mxGraphComponent which basically is a
 javax.swing.JScrollPane. Objective is to print this mxGraphComponent
 to a file in the following 3 formats: SVG, PDF, PNG. The images in the
 .SVG and .PDF files should be scalable i.e. vectorized. The following
 code works great for printing the .SVG file:
 
 private void batikTest(mxGraphComponent graphComponent){
   // Get a DOMImplementation
 DOMImplementation domImpl =
 GenericDOMImplementation.getDOMImplementation();
 
 // Create an instance of org.w3c.dom.Document
 Document document = domImpl.createDocument(null, svg, null);
 
 // Create an instance of the SVG Generator
 SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
 
 // Print to the SVG Graphics2D object
 graphComponent.getGraphControl().print(svgGenerator);
 
 boolean useCSS = false;
 
 Writer out;
   try {
   out=new FileWriter(new 
 File(OUTPUTDIR+fileName+_batik.SVG));
   svgGenerator.stream(out, useCSS);
   } catch (Exception e) {
   e.printStackTrace();
   }
   System.out.println(Batik svg printed);
 }
 
 Is there a convenient way to generate the .PDF and .PNG files too
 using this code? I can't really find how to do that within the code.
 There is a description on how to externally convert the generated .SVG
 file to a pdf (http://xmlgraphics.apache.org/batik/tools/rasterizer.html)
  but I would like to do this within the code, without having to call
 an external tool.
 
 Thnx,
 
 Joris



Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: Units in SVG - PDF

2011-02-12 Thread Jeremias Maerki
Tim, you might want to test the PDF transcoder that is bundled with
Apache Batik. Or to get the latest version of the PDF transcoder, just
put the latest Apache FOP in the classpath instead of pdf-transcoder.jar.
That has the benefit that you don't have to care much about the scaling
problem and you get text as text (and not text converted to shapes) and
nice-looking gradients among other things.

On 11.02.2011 00:17:06 Tim Heuer wrote:
 Hi List,
 
 I came across a problem with the SVG rendering onto a PDF:
 
 The units seem to be wrong or I am doing a mistake.
 
 When I let Batik parse my SVG image:
 ?xml version=1.0 encoding=UTF-8?
 svg xmlns=http://www.w3.org/2000/svg; 
 xmlns:xlink=http://www.w3.org/1999/xlink; width=126pt height=25pt 
 viewBox=0 0 126 25 version=1.1
 g id=surface2
 rect x=0 y=0 width=126 height=25 
 style=fill:rgb(100%,100%,100%);fill-opacity:1;stroke:none;/
 path style= 
 stroke:none;fill-rule:evenodd;fill:rgb(81.176471%,85.098039%,69.411765%);fill-opacity:1;
  d=M 5.5 5.5 L 34.5 5.5 L 34.5 19.5 L 5.5 19.5 Z M 5.5 5.5 /
 ...
 /g
 /svg
 
 
 My Java code is as follows:
 
 PdfContentByte dc = context.getDirectContent();
 URI uri = URI.create(iconItem);
 URL url = uri.toURL();
 SVGDocumentFactory factory = new 
 SAXSVGDocumentFactory(XMLResourceDescriptor.getXMLParserClassName());
   UserAgent userAgent = new UserAgentAdapter();
 DocumentLoader loader = new 
 DocumentLoader(userAgent);
 BridgeContext ctx = new BridgeContext(userAgent, 
 loader);
   ctx.setDynamicState(BridgeContext.DYNAMIC);
   SVGDocument svgDoc = 
 factory.createSVGDocument(null, url.openStream());
   GVTBuilder builder = new GVTBuilder();
   GraphicsNode graphics = builder.build(ctx, svgDoc);
   String svgWidthString = 
 svgDoc.getDocumentElement().getAttribute(width);
   String svgHeightString = 
 svgDoc.getDocumentElement().getAttribute(height);
   float svgWidth = 
 Float.valueOf(svgWidthString.substring(0, svgWidthString.length() - 2));
   float svgHeight = 
 Float.valueOf(svgHeightString.substring(0, svgHeightString.length() - 2));
 PdfTemplate map = dc.createTemplate(svgWidth*1.25f, 
 svgHeight*1.25f);
   //PdfTemplate map = dc.createTemplate(svgWidth, 
 svgHeight);
 Graphics2D g2d = map.createGraphics(svgWidth*1.25f, 
 svgHeight*1.25f);
 graphics.paint(g2d);
 g2d.dispose();
 System.out.println(w=+ svgWidth + h=+ svgHeight 
 + maxW=+ maxIconWidth + maxH=+ maxIconHeight);
 //...
 Image image = Image.getInstance(map);
 PdfPCell cell = new PdfPCell(...);
 cell.add(image);
 
 I looked up the SVG specifications and found that pt is 1.25 pixels. However, 
 this renders wrongly on the PDF. The image becomes too big and is cut off. 
 When I enter 1.5f instead of 1.25f above, it seems more correct but still a 
 bit out.
 
 I don't want to hack together a number that will just happen to look right, 
 because it is the wrong approach. Is there some kind of trickiness with the 
 units between SVG and PDF (using iText)?
 
 Help is much appreciated. I am working on the legends' rendering in SVG in 
 the MapFish print module and will submit the source back to the project, so I 
 think they would appreciate your input too.
 
 Kind regards,
 Tim
 
 
 Please consider the environment before printing this email
 Warning: This electronic message together with any attachments is 
 confidential. If you receive it in error: (i) you must not read, use, 
 disclose, copy or retain it; (ii) please contact the sender immediately by 
 reply email and then delete the emails.
 The views expressed in this email may not be those of Landcare Research New 
 Zealand Limited. http://www.landcareresearch.co.nz




Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: SVG 1.2 support and PDF generation

2011-02-02 Thread Jeremias Maerki
Benjamin,
try putting the flowPara into a flowDiv.

PS: please don't cross-post between batik-users and batik-dev. All Batik
devs are also here on batik-users.

On 02.02.2011 13:16:07 Benjamin Diedrichsen wrote:
 Hi all,
 
 I am currently using batik and pdftranscoder.jar to transform svg documents
 into pdf. Recently I tried the new text flowing features of SVG 1.2 and was
 pretty disappointed by the results. It seems that the flowRegion ant
 flowPara elements and so forth are silently ignored. At least the output is
 very different to what I would expect. On
 http://xmlgraphics.apache.org/batik/dev/svg12.html I read the SVG 1.2 should
 be supported in the branch. I compiled the latest trunk and use it to
 transform the SVG but the text just doesn't get rendered and the flowRegion
 is always shown as a black box.
 
 From what I've read in the mailing lists and on the batik webpage, the text
 flowing features are supported or at least should be. So, what am I doing
 wrong here?
 
 Here is a very simple example that I actually took from the w3c page and
 that I am working with.
 
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.2//EN 
 http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd;
 svg xmlns=http://www.w3.org/2000/svg; xmlns:xml=
 http://www.w3.org/XML/1998/namespace;
 width=742.6771734 height=969.4488284 version=1.2 xml:space=preserve
   titleBasic textflow/title
   rect x=0 y=0 width=100% height=100% fill=yellow/
   flowRoot font-size=16
 flowRegion
   path d=M100,50L50,300L250,300L300,50z
 style=background-color:#11 fill=#11/
 /flowRegion
   flowParaTomorrow, and tomorrow, and tomorrow; creeps in this
petty pace from day to day, until the last syllable of recorded time.
 
And all our yesterdays have lighted fools the way to dusty death.
  /flowPara
   /flowRoot
   path d=M90,40L40,270L260,270L210,40z fill=none stroke=black
 stroke-width=5/
 /svg
 
 Anybody manages to transform this to pdf with proper text layout? Any
 comments on the current status of the SVG 1.2 support?
 
 Here is part of my java code:
 
 Reader domReader = DOMUtilities.createXMLDocumentReader(is);
 
 SAXSVGDocumentFactory saxDocFactory = new SAXSVGDocumentFactory(
 org.apache.xerces.parsers.SAXParser);
 SVGDocument svgDocument = saxDocFactory.createSVGDocument(null,
 domReader);
 
 
 PDFTranscoder pdfTranscoder = new PDFTranscoder();
 TranscoderInput tInput = new
 TranscoderInput(svgDocument);
 TranscoderOutput tOutput = new
 TranscoderOutput(tmpBout);
 
 pdfTranscoder.transcode(tInput, tOutput);
 
 Any help and comments will be rewarded with pure gratefulness. Regards,
 Benni




Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: Use of parameters

2011-02-02 Thread Jeremias Maerki
On 02.02.2011 18:50:11 dao wrote:
 hello,
 
 does batik support this: http://www.w3.org/TR/SVGParamPrimer/ ?

No, not yet.

 I don't really get if this is just a proposal, a draft, a part of a comming
 release...

It's a W3C working draft, so it means this is being discussed and can
still change at any time. When it will be integrated in Batik depends on
whether someone finds this interesting enough to implement. The idea
behind this is cool anyway.

 regards
 
 -- 
 Dao Hodac




Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: How can I change the color model of an SVG image from RGB to CMYK and vice versa?

2011-01-17 Thread Jeremias Maerki
I wish that were so quick  easy to do. The Java code is ready and
working but the whole build process is a different story with the new
dependencies. I found a lot of code duplication in the build script and a
lot of hard-coded JAR names in Class-Path manifest entries or security
policy files. I think I have some serious refactoring before me to make
that easier.

In the meantime, you can try working with the all-jar Ant target on
the branch: 
https://svn.apache.org/repos/asf/xmlgraphics/batik/branches/svgcolor12
At least, the all-jar seems to build fine, although starting it with
java -jar doesn't work right now.

On 13.01.2011 22:43:56 Chris Lilley wrote:
 On Monday, December 20, 2010, 9:33:57 AM, Jeremias wrote:
 
 JM On 19.12.2010 18:10:42 Martin Jacobson wrote:
  I'm going to join this thread because I have an application that
  produces SVG maps that are ultimately printed to a vitreous enamel
  panel that forms part of a street sign. The app has to work in RGB
  because SVG only understands RGB, but the graphic design specification
 
 JM /s/only understands RGB/always requires a fallback sRGB value
 
 JM SVG does support non-RGB colors. But currently, Batik doesn't support
 JM passing on non-sRGB colors (they are converted to sRGB). I've added
 JM support for that this summer in development branches [1] which I'm in
 JM the process of getting ready to merge back into the respective trunks.
 
 OOh, please let me know when that trunk merge is available for testing.
 
 
 -- 
  Chris Lilley   Technical Director, Interaction Domain 
  W3C Graphics Activity Lead, Fonts Activity Lead
  Co-Chair, W3C Hypertext CG
  Member, CSS, WebFonts, SVG Working Groups
 
 
 -
 To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
 For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org




Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: How can I change the color model of an SVG image from RGB to CMYK and vice versa?

2010-12-20 Thread Jeremias Maerki
On 19.12.2010 18:10:42 Martin Jacobson wrote:
 I'm going to join this thread because I have an application that
 produces SVG maps that are ultimately printed to a vitreous enamel
 panel that forms part of a street sign. The app has to work in RGB
 because SVG only understands RGB, but the graphic design specification

/s/only understands RGB/always requires a fallback sRGB value

SVG does support non-RGB colors. But currently, Batik doesn't support
passing on non-sRGB colors (they are converted to sRGB). I've added
support for that this summer in development branches [1] which I'm in
the process of getting ready to merge back into the respective trunks.

 defines all colours as precise CMYK values. These CMYK values were
 arrived at by experimentation with the printer, and cannot be
 compromised.
 As you know, most RGB values map to a range of CMYK values, depending
 mostly on the amount of black (K), so there isn't a nice 1 to 1
 relationship between RGB  CMYK. Is there a simple, and foolproof way
 of doing the conversion? Our method at the moment is a horrendous hack
 that I would blush to describe!

No, there is no foolproof way for such a conversion. Color conversions
have the habit of being lossy. In your case, I believe there are two
possible ways:

1. if you can get hold of the ICC output color profile for your printer,
you can specify your carefully determined CMYK values with the
icc-color() function [2] and the color-profile element [3].

2. you can use the new functions specified in the SVG Color 1.2 working
draft to specify device-specific CMYK colors (device-cmyk() function [4]).
I've implemented this in the color branches but this is work in progress
on the side of the specification so this can still change.

But in both cases, you need the code from the color branches to have the
colors make it into the PDF as is.

[1] http://wiki.apache.org/xmlgraphics/ColorHandling
[2] http://www.w3.org/TR/SVG11/types.html#DataTypeICCColor
[3] http://www.w3.org/TR/SVG11/color.html#ColorProfileElement
[4] http://www.w3.org/TR/SVGColor12/#device

 thanks
 Martin
snip/ 


Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: How can I change the color model of an SVG image from RGB to CMYK and vice versa?

2010-12-17 Thread Jeremias Maerki
Olivier,
a question for you to begin with: do you know the difference between
calibrated and uncalibrated/device colors? I'm asking because when
people talk RGB or CMYK they very often mean uncalibrated/device colors.
That's not something that is useful except if you have the whole
printing workflow fully under control. Only in this case can you work
without color management. 

That said, an SVG image must always have sRGB colors (not true for
referenced bitmap images). Any other colors are always added as
alternatives that are taken if supported. Right now, SVG supports only
icc-color(), i.e. ICC-based calibrated colors. That way, it is possible
to define calibrated CMYK colors. AFAIK, SVGGraphics2D only generates
sRGB colors right now. So even if you specify an ICC-based Paint/Color on
the Graphics2D side, the color in SVG will end up being converted to
sRGB through Java's color management.

In the end, I believe that unless your application creates images that
need to be in exact colors (ex. CI/CD colors from a company, spot colors) for
a printing workflow, it doesn't make much sense to think about switching
between color models in the context of SVG. Just use sRGB. The printer
will then convert the sRGB to the printer's specific CMYK color space
through one single conversion (if the calibrated colors get preserved
through the whole workflow).

If the only thing you had in mind was converting some RGB value with a
fixed formula to CMYK (i.e. uncalibrated colors), you're better off just
working with sRGB.

http://en.wikipedia.org/wiki/Color_management

HTH

On 17.12.2010 17:24:34 olivierk wrote:
 
 Hi, our web app let users download dynamically generated images in different
 formats, including SVG. Some of our users download the images for printing,
 thus we would like to allow them to choose between RGB or CMYK. Is there a
 way to specify the color model when creating an SVG image? If not, what is
 the default color model and how can I change it to another? Code snippets
 are welcome :)
 
 Thanks,
 
 Olivier.
 -- 
 View this message in context: 
 http://batik.2283329.n4.nabble.com/How-can-I-change-the-color-model-of-an-SVG-image-from-RGB-to-CMYK-and-vice-versa-tp3092769p3092769.html
 Sent from the Batik - Users mailing list archive at Nabble.com.



Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: Support for Adobe Pro opentype fonts

2009-04-18 Thread Jeremias Maerki
Please note that the situation is different with FOP. FOP has its own
font subsystem. It doesn't rely on what AWT provides (except for the
Java2D/AWT based output formats). Still, I haven't had any of those
professional OpenType fonts in my grasp. I doubt that FOP would be much
better at using these than AWT. Bertrand Delacrétaz worked on improving
that some time ago but he also had to stop early, unfortunately.

On 17.04.2009 21:47:39 Helder Magalhães wrote:
snip/
  So I have to convert all font variants into TTF...
  ... and to file a new feature request to Java developers :-)
 
 Maybe not -- the same post [1] states that Apache FOP should have
 support for these (maybe Jeremias can provide some input here). As the
 post is a few years old, I'm not sure if Batik already integrated that
 functionality and this may be as well be a bug in the OpenType support
 implementation and/or the font(s) may not conform to the OpenType
 specification...

snip/


Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: AW: Special Printing Problem....

2009-04-18 Thread Jeremias Maerki
Hi Michael

On 15.04.2009 17:03:53 Kerschbaum Michael wrote:
snip/
 So then i tried writing a pdf and printing it (With the
 pdfTranscoder)... The Problem is, that i need some more information in
 the Printed document (Visible Layers, Date, who created that document,
 etc...) Don't know how to print that to the PDF File.

The PDF 1.5 optional content groups (which I understand are used to
identify layers in PDF) is not implemented, yet. We currently generate
PDF 1.4. As for document metadata, that could be relatively easy to add.
We already support embedding a full XMP metadata document from XSL-FO
into PDF. Doing the same from SVG wouldn't be a big deal.

But why would you need this with PDF if you don't have this available
when printing directly using Batik?

 How would you solve this problem ? Is there an easy way to get the
 opacity parts of the svg and replace them with the background, so that
 the output would be the same without opacity parts ? Or should I try to
 get the best trade of Resolution against this 60 Seconds ? or should i
 use pdf and think how to get addional information in it ?! Or ...?

If Thomas doesn't have any suggestions to improve the performance with
Batik alone, I only see the way via PDF.

snip/  



Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: SVG rasterized into PDF with CMYK mode

2009-04-01 Thread Jeremias Maerki
FOP's PDF library has some CMYK capabilities but a short experiment
shows that Batik sends only the RGB color values to the PDF transcoder.
But even if CMYK worked for simple cases, things like filters which are
done inside Batik and painted as bitmaps would only work on RGB level at
the moment. So one way or another, Batik will need some attention if
CMYK should be supported.

On 31.03.2009 21:42:27 Jan Tošovský wrote:
 Hello Everybody,
 
 is there any posibility to tell to PDF rasterizer that I need final PDF in
 CMYK mode? If there are specified cmyk colors in my SVG document with exact
 cmyk values, if converted into PDF and opened Adobe Illustrator, PDF is
 considered as RGB document and all stroke colors are redefined. I thing the
 same problem will be during print - I'll get something different than
 specified. I understand there is problem with raster images, but what about
 the vector rest?
 
 Jan
 



Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: Portrait rotation

2009-03-23 Thread Jeremias Maerki
On 14.03.2009 16:32:56 Jan Tošovský wrote:
snip/
  Thing is Batik isn't exactly an image viewer so, without investigating
  properly, I'd say that the Exif orientation metadata [2] might not be
  supported.
 
 I was afraid that it is unsupported. It is pity...

You know, this is open source: you can always add that feature yourself
and submit a patch. That's how projects evolve.

snip/


Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: Browser-based scripting in Batik applets - conclusions

2009-03-09 Thread Jeremias Maerki
This is interesting information. Thanks for sharing that. I'm curious:
what Java version did the applet run on? 6.0.something, I presume?

On 09.03.2009 10:13:18 John C. Turnbull wrote:
 I posted some time ago about my intentions to try using the JavaScript
 engine within a web browser to execute scripts in a Batik applet instead of
 the default Rhino environment.  I can now report that I have managed to get
 this kind of scripting working using a continuous animation script and the
 results are, as expected, unspectacular.
 
  
 
 With Firefox 3.0.7 the scripts run a little faster than they do with Rhino
 but with Chrome they run significantly slower (so much for V8).  With IE 7
 and Safari they run about the same speed as Rhino.  On Opera I haven't been
 able to get the scripting to work and I don't have the time to put any more
 effort into that.  I haven't tried any other browsers.
 
  
 
 So overall there is no compelling reason to use this technology other than
 that it enables smaller applet sizes because of the omission of the Rhino
 JAR.  However, given that internet speeds are increasing at a steady rate
 and that even with the Rhino JAR included the applet still downloads in an
 acceptable time frame, I don't see this as significant.
 
  
 
 I hope you find this information interesting.  This exercise has been
 beneficial in my enhancing understanding of Batik, scripting and applets so
 I don't consider it a waste of resources.
 
  
 
 Cheers,
 
  
 
 John C. Turnbull
 




Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: Reg Batik printtranscoder

2009-03-03 Thread Jeremias Maerki
On 27.02.2009 13:22:42 thomas.deweese wrote:
snip/
 Another option you might consider however depending on the
 complexity of your header/footer needs would be to leverage
 Batik's sister project Apache FOP to do the page layout.
 I'm not sure if they will talk directly to the Java print API's

Yes, we do. :-)

 but they can generate nice PDF files.



Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



ApacheCon Europe 2009: Early Bird Deadline Extended until 13th of February

2009-02-11 Thread Jeremias Maerki
Here's some great news for everyone who's thinking of
traveling to Amsterdam for this year's ApacheCon Europe. The Early Bird
deadline has been extended to Friday, February 13th - and remember,
there is a discount of 150 Euro on registration for anyone staying at
the Mövenpick Hotel. Register at http://www.eu.apachecon.com.

ApacheCon is a week of open source goodness straight from the source of
The Apache Software Foundation:

 - More than 60 1-Hour Sessions on System Administration, Development,
   Data Mining and Search Technologies, Enterprise Web Services, SOA,
   and Cloud Technologies, Open Source Business and Community, and more
 - Over a dozen Training Workshops from industry experts (see below)
 - World-class Keynotes and vendor Expo
 - Lightning Talks and Birds-of-a-Feather sessions
 - New this year: Geeks for Geeks Track, BarCampApache, and Hackathon!

ApacheCon Europe 2009 features 2-day, 1-day, and half-day Training
Workshops on the following topics:

 Data Mining and Search Technologies
 ---
 - Lucene Boot Camp  (Grant Ingersoll)
 - Solr Boot Camp  (Erik Hatcher)


 The Next Generation of Web Data Storage
 ---
 - Building Standalone CouchDB Applications (J. Chris Anderson)
 - High Performance CouchDB (J. Chris Anderson)


 Cloud and Distributed Computing Technologies
 
 - Hadoop Tools and Tricks for Data Processing Pipelines
   (Christophe Bisciglia and Aaron Kimball)


 System Administration
 -
 - Apache HTTP Server - Nuts to Bolts  (Jim Jagielski)
 - Everything Tomcat - Administering, Tuning,
   Troubleshooting and Developing  (Mark Thomas)


 Developing State-of-the-Art Web Applications
 
 - A Day of REST  (J Aaron Farr)
 - Apache CXF - Developing and Deploying Open Source
   SOA Endpoints  (Adrian Trenaman)
 - Ajax on Struts 2: How a Second Generation Web Application
   Framework Meets the Demands of RIA  (Chad Michael Davis)
 - Behavior-Driving Your Apache Wicket Application:
   Making the Most of Webdriver and JDave-Wicket (Timo Rantalaiho)


 Building and Managing Java-based Projects
 -
 - Maven Workshop  (Zeger Hendrikse)


 Professional Media Trainings
 
 - Media  Analyst Training (Sally Khudairi)
 - Intermediate Media  Analyst Training (Sally Khudairi)


We hope to see you on the 23-27 March at the Mövenpick Hotel in
Amsterdam! Visit http://www.eu.apachecon.com for further information
and registration details.

Interested in sponsoring the ApacheCon conferences?  Please contact
Delia Frees at de...@apachecon.com for further information.

-- 
ApacheCon Europe 2009 Team
planners-2009-eu at apachecon.com
http://www.eu.apachecon.com


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



[ANN] Registration for ApacheCon Europe 2009 is now open!

2009-01-28 Thread Jeremias Maerki
ApacheCon EU 2009 registration is now open!
23-27 March -- Mövenpick Hotel, Amsterdam, Netherlands
http://www.eu.apachecon.com/


Registration for ApacheCon Europe 2009 is now open - act before early
bird prices expire 6 February.  Remember to book a room at the Mövenpick
and use the Registration Code: Special package attendees for the
conference registration, and get 150 Euros off your full conference
registration.

Lower Costs - Thanks to new VAT tax laws, our prices this year are 19%
lower than last year in Europe!  We've also negotiated a Mövenpick rate
  of a maximum of 155 Euros per night for attendees in our room block.

Quick Links:

http://xrl.us/aceu09sp  See the schedule
http://xrl.us/aceu09hp  Get your hotel room
http://xrl.us/aceu09rp  Register for the conference

Other important notes:

- Geeks for Geeks is a new mini-track where we can feature advanced
technical content from project committers.  And our Hackathon on Monday
and Tuesday is open to all attendees - be sure to check it off in your
registration.

- The Call for Papers for ApacheCon US 2009, held 2-6 November
2009 in Oakland, CA, is open through 28 February, so get your
submissions in now.  This ApacheCon will feature special events with
some of the ASF's original founders in celebration of the 10th
anniversary of The Apache Software Foundation.

http://www.us.apachecon.com/c/acus2009/

- Interested in sponsoring the ApacheCon conferences?  There are plenty
of sponsor packages available - please contact Delia Frees at
de...@apachecon.com for further information.

==
ApacheCon EU 2008: A week of Open Source at it's best!

Hackathon - open to all! | Geeks for Geeks | Lunchtime Sessions
In-Depth Trainings | Multi-Track Sessions | BOFs | Business Panel
Lightning Talks | Receptions | Fast Feather Track | Expo... and more!

- Shane Curcuru, on behalf of
   Noirin Shirley, Conference Lead,
   and the whole ApacheCon Europe 2009 Team
   http://www.eu.apachecon.com/  23-27 March -- Amsterdam, Netherlands


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: Conversion to custom format

2009-01-28 Thread Jeremias Maerki
In FOP we convert SVG (or rather vector graphics in general) into
various output formats (PDF, PS, GOCA, HP/GL2). For that we simply
write Graphics2D implementations. When you have that, you can write a
Transcoder subclass that uses that Graphics2D implementation to convert
the SVG with the same API that Batik provides. If you don't have to do
anything SVG-specific, that's most likely the easiest route. Examples
for that are PSDocumentGraphics2D in XML Graphics Commons, or various
other Graphics2D implementations inside FOP. HTH

On 28.01.2009 15:47:20 Marek Scholaster wrote:
 Hello,
 I'm new to Batik and would like to know whether Batik can help me with 
 my problem and if so, where to start.
 
 I need to write a conversion program from SVG to my custom format 
 (vector based, only a few shapes, no transformations)
 In addition I need to handle different layers differently (  g 
 id=layer1  )
  
 Basically I need the svg document in a state where all transformations 
 are resolved and there is still information about layer of each shape.
 
 Thank you for any help,
 Marek Scholaster



Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: Conversion to custom format

2009-01-28 Thread Jeremias Maerki
Batik handles the SVG side for you. You just have to handle the changes
of the transformation matrix on the Graphics2D object correctly. Either
you can track what transformations are applied incrementally, or you can
just retrieve the currently valid transformation matrix. Things like the
PathIterator can help you handle those when painting shapes. Either you
just use an identity transform if you apply the transformation matrix in
the context or you can pass in the current transformation matrix any you
get corrected coordinates. Depends on what your own format looks like.

Keep in mind that if you implement a Graphics2D implementation, it
doesn't necessarily have a dependency on Batik. You could use any Java2D
source to create graphics in your format. For example, you could write a
plug-in for the Java Printing System as a wrapper around your Graphics2D
implementation (much like the Transcoder subclass I mentioned). That
would allow any application printing to JPS to create documents in your
format. A big bag of possibilities. ;-)

On 28.01.2009 16:38:51 Marek Scholaster wrote:
 Thanks Jeremias,
 just one more question: transformations are resolved inside Batik or 
 they are left on Graphics2D ?
 
 Jeremias Maerki wrote:
  In FOP we convert SVG (or rather vector graphics in general) into
  various output formats (PDF, PS, GOCA, HP/GL2). For that we simply
  write Graphics2D implementations. When you have that, you can write a
  Transcoder subclass that uses that Graphics2D implementation to convert
  the SVG with the same API that Batik provides. If you don't have to do
  anything SVG-specific, that's most likely the easiest route. Examples
  for that are PSDocumentGraphics2D in XML Graphics Commons, or various
  other Graphics2D implementations inside FOP. HTH
 
  On 28.01.2009 15:47:20 Marek Scholaster wrote:

  Hello,
  I'm new to Batik and would like to know whether Batik can help me with 
  my problem and if so, where to start.
 
  I need to write a conversion program from SVG to my custom format 
  (vector based, only a few shapes, no transformations)
  In addition I need to handle different layers differently (  g 
  id=layer1  )
   
  Basically I need the svg document in a state where all transformations 
  are resolved and there is still information about layer of each shape.
 
  Thank you for any help,
  Marek Scholaster
  
 




Jeremias Maerki


-
To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org



Re: Batik exception when using fop with svg images in threaded environment

2008-12-08 Thread Jeremias Maerki
FYI, I had to post-process the cloned DOM by transfering the document
URI myself. Looking at AbstractDocument.copyInto() which isn't called
when using DOMUtilities.deepCloneDocument(), there might actually be
other values that may need to be copied. But the document URI was the
important one.

http://svn.apache.org/viewvc?rev=724310view=rev

On 07.12.2008 19:06:16 Jeremias Maerki wrote:
 Thanks for the hint. That made things easier. I've committed the
 necessary changes but without the potential performance optimizations we
 discussed.
 
 On 07.12.2008 17:02:34 thomas.deweese wrote:
  Hi Jeremias,
  
  Jeremias Maerki [EMAIL PROTECTED] wrote on 12/07/2008 09:04:57 AM:
  
   Ok, I've created a Bugzilla issue to track this issue in FOP:
   https://issues.apache.org/bugzilla/show_bug.cgi?id=46360
  
Ok, Thanks.
  
   A short test shows that I can't easily clone the document if it has a
   document type. The following is a patch the would fix the exception.
  [...]
   And I don't even know if the patch here is even plausible.
  
 I strongly suspect that it's intentional that the document will not
  create a DocumentType Node as this should be provided when the
  document is created.
  
   But I guess I'll need to work around that outside of Batik as we'd have
   to wait for a Batik release before we can release a new FOP with the fix
   applied.  So I'm planning to do this:
  
I suggest using:
  batik.dom.util.DOMUtilities.deepCloneDocument
  (Document doc, DOMImplementation impl);
  
This has been in Batik for quite a while and has code to
  work around this exact problem.
snip/



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Batik exception when using fop with svg images in threaded environment

2008-12-07 Thread Jeremias Maerki
On 07.12.2008 13:07:43 Peter Coppens wrote:
 OkI'll be more careful in my wordings. In this specific case the
 problems seems to originate from the fact that the Parser object, attached
 to the DOM is not thread safe while it is being used across threads.
 
 Unfortunately I have no clue what is the best way to fix the issue.

Me, neither. That's why I'm asking all these questions.

 Serializing the svg fop rendering on the dom fixed it in this case but that
 is clearly a sledge hammer approach.

Yeah, that's a short-term work-around I'm not comfortable with.

 I don't know how the rest of the stylesheet can influence the result of the
 rendering...so I guess that caching the rendered SVG document iso the dom is
 not an option?  

Do you mean caching the GVT tree? I'm not sure if that's feasible. But
if it is, it might actually a better way of caching a static SVG image
before it is painted. But this might actually be difficult, since we
need to register different bridges for different output formats meaning
that the GVT tree will look differently depending on the output format
and configuration used.

This feels more and more like an occasion to fundamentally revisit how
we handle SVG in FOP. Maybe we actually did the thing wrong the whole
time.

snip/


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Batik exception when using fop with svg images in threaded environment

2008-12-07 Thread Jeremias Maerki
Thanks a lot, Thomas. So the safest way would be to clone the (cached) SVG
document. As an optimization step one could investigate if some sort of
caching the GVT tree is doable (see my other post just a few minutes ago).
I assume the second option would take quite a bit of effort (including
benchmarks beforehand to determine the optimization potential).

On 07.12.2008 13:53:12 thomas.deweese wrote:
 Hi Jeremias,
 
 Jeremias Maerki [EMAIL PROTECTED] wrote on 12/07/2008 06:53:04 AM:
 
  Is that a sure thing that the DOM is not modified? 
 
It is 100% certain that you can't have one document with
 two attached GVT tree's - which I think you would need to do
 with your current approach.  The actual DOM infoset shouldn't
 be modified but internally we attach additional structures to
 handle the CSS  SVG DOMs.  Also some items (particularly in
 the SVG DOM) may be lazily constructed (so the two threads might
 collide when 'reading' those items).
 
  If yes, we'd have to ask the question whether attaching the CSS engine 
  to the DOM is the right thing to do. And is the CSS Engine as such not 
  thread-safe or is only the setting of the CSS engine not thread safe 
 (method
  BridgeContext.initializeDocument(Document))? 
 
Once again no attempt was made to make the CSS Engine thread safe, it
 might be thread safe for some set of operations but I can't give any kind
 of guidelines.  Of course you must attach the CSS Engine otherwise the 
 CSS DOM (which we use to render the document) won't be available.
 
In Batik it is 100% required that people access DOM/CSS/GVT through 
 one thread.
 
  Maybe an idea could be to attach the CSS engine to the thread (thread 
  local) instead of to the DOM if only one thread uses the CSS engine in 
  a single rendering run and the CS engine is not thread-safe. 
  Just brain-storming
 
The only thing that might work would be to attach the CSSEngine once
 and build the GVT tree once and keep that in the cache.  But even with
 that the GVT tree may well not support multiple concurrent renderings
 (although for a static document it should come close).
 
  On 07.12.2008 12:32:43 Peter Coppens wrote:
   As in another post mentioned - I have been debugging the code. The dom 
 is
   not modified. The dom caches a Parser object which is not thread safe.
   
   
From: Jeremias Maerki [EMAIL PROTECTED]
Reply-To: batik-users@xmlgraphics.apache.org
Date: Sun, 07 Dec 2008 12:17:48 +0100
To: batik-users@xmlgraphics.apache.org
Subject: Re: Batik exception when using fop with svg images in 
 threaded
environment

Thanks for your input, Thomas!

On 06.12.2008 20:00:01 thomas.deweese wrote:
Hi Jeremias,

Jeremias Maerki [EMAIL PROTECTED] wrote on 12/05/2008 
 03:55:42 AM:

I can reproduce the issue with this test case. It really only 
 happens in
the multi-threading case (running against Batik Trunk). As soon as 
 you
place break-points before the exception (NumberFormatException) 
 can
happen, it won't. I'm not sure where to start looking for the 
 problem.
Maybe we can do something in FOP to avoid this. Help/hints would 
 be
appreciated.

   I don't know how FOP loads and rasterizes SVG documents.  If 
 there
is a global cache of Documents that have been read so the same 
 Document
Object ends up being used in both threads that would cause this 
 problem.

Hmm, I wonder why we've never had that before (to my knowledge). 
 After
all we have an image cache which caches and reuses the SVG DOM for 
 years.
Even FOP versions before 0.20.5 did that.

I mean I can understand that SVGs with scripts or animation might 
 modify
the DOM but static SVGs with no script, no animation, no CSS parts?

Anyway, FOP does have (0.94 or earlier) an image cache or uses the 
 one
in the image loading framework from XML Graphics Commons (since FOP 
 0.95).
In the case of SVG documents, the DOM is reused with the intention 
 of
improving performance.

   Checking the source it appears that fop.image.ImageFactory does 
 this.

You're looking at old source code (before 0.95). This has been 
 replaced
by the XG Commons image loading framework.
http://xmlgraphics.apache.org/commons/image-loader.html

There seem to be some options for sharing (or not) of images 
 between
contexts but it's not obvious to me how that works.

Images are cached with their original URI as the key. When the same 
 URI
is requested the cached image (with a reference to the SVG DOM) is
returned if it hasn't already been claimed by the garbage collector.
Image subclasses indicate if they are cacheable or not:
https://svn.eu.apache.
  org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache
/xmlgraphics/image/loader/Image.java?view=markup

   Another option would be to deep clone the Document the second 
 time

Re: Squiggle main class not found error

2008-12-07 Thread Jeremias Maerki
Using URLs to specify the JAR files won't work as the Java VM doesn't
accept URLs to build the classpath. You'll have to download the
necessary JARs as a first step and then run the application locally.
Another option might be to pack Squiggle using a JNLP description and
use Java WebStart to invoke the application in which case the download
would be automatic.

On 06.12.2008 05:54:31 Noel Whiting wrote:
 I'm using batik Squiggle to print SVG models using the following Javascript 
 in an .hta file 
 
  var oShell = new ActiveXObject(Shell.Application);
  var commandtoRun;
  var commandParams; 
 
  commandtoRun = http://enet. ../batik-squiggle.jar ;
  commandParams = http://enet./sXXX.svg; ;
 
  oShell.ShellExecute(commandtoRun,commandParams);
 
 It works fine when the batik-squiggle.jar file  the batik lib subdirectory 
 are on a network PC, but when they're loaded to the intranet site (iis) I get 
 a 'Virtual machine launcher - Could not find the main class error'
 
 If anyone can help me with this I'd be most thankful.
 
 Cheers, Noel




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Batik exception when using fop with svg images in threaded environment

2008-12-07 Thread Jeremias Maerki
Ok, I've created a Bugzilla issue to track this issue in FOP:
https://issues.apache.org/bugzilla/show_bug.cgi?id=46360

A short test shows that I can't easily clone the document if it has a
document type. The following is a patch the would fix the exception.

Index: sources/org/apache/batik/dom/AbstractDocument.java
===
--- sources/org/apache/batik/dom/AbstractDocument.java  (revision 724130)
+++ sources/org/apache/batik/dom/AbstractDocument.java  (working copy)
@@ -397,6 +397,14 @@
 result = createDocumentFragment();
 break;
 
+case DOCUMENT_TYPE_NODE:
+DocumentType docType = (DocumentType)importedNode;
+GenericDocumentType gdt = new 
GenericDocumentType(docType.getNodeName(),
+docType.getPublicId(), docType.getSystemId());
+gdt.setOwnerDocument(this);
+result = gdt;
+break;
+
 default:
 throw createDOMException(DOMException.NOT_SUPPORTED_ERR,
  import.node,


But I guess I'll need to work around that outside of Batik as we'd have
to wait for a Batik release before we can release a new FOP with the fix
applied. And I don't even know if the patch here is even plausible. So
I'm planning to do this:

//Cloning SVG DOM as Batik attaches non-thread-safe facilities (like 
the CSS engine)
//to it.
synchronized (doc) {
DocumentType dt = doc.getDoctype();
if (dt != null) {
//Work-around: Batik cannot clone the document type
doc.removeChild(dt);
}
}
Document clonedDoc = (Document)doc.cloneNode(true);

I hope there won't be any other peculiarities that I haven't found, yet.



On 07.12.2008 14:44:53 thomas.deweese wrote:
 Hi Jeremias,
 
 Jeremias Maerki [EMAIL PROTECTED] wrote on 12/07/2008 08:09:48 AM:
 
  Thanks a lot, Thomas. So the safest way would be to clone the (cached) 
 SVG
  document.
 
Correct.  This is what we do when we cache documents - mostly because 
 we
 do deal with dynamic documents.
 
  As an optimization step one could investigate if some sort of
  caching the GVT tree is doable (see my other post just a few minutes 
 ago).
  I assume the second option would take quite a bit of effort (including
  benchmarks beforehand to determine the optimization potential).
 
So the work would be knowing that you can reuse the GVT tree because
 the destination format matches (so the 'added' bridges would match).
 The other potential issue would be the viewBox fitting (the affine for
 that lives in the 'CanvasGraphicsNode').  You would probably want to
 handle that outside of the GVT tree.
 
As far as the boost this would give you, the actual construction
 of the GVT tree is pretty quick, but some of the stuff that is done
 the first time through (calculating BBoxes, text layout, etc) can be
 fairly time consuming.
 
  On 07.12.2008 13:53:12 thomas.deweese wrote:
   Hi Jeremias,
   
   Jeremias Maerki [EMAIL PROTECTED] wrote on 12/07/2008 06:53:04 
 AM:
   
Is that a sure thing that the DOM is not modified? 
   
  It is 100% certain that you can't have one document with
   two attached GVT tree's - which I think you would need to do
   with your current approach.  The actual DOM infoset shouldn't
   be modified but internally we attach additional structures to
   handle the CSS  SVG DOMs.  Also some items (particularly in
   the SVG DOM) may be lazily constructed (so the two threads might
   collide when 'reading' those items).
   
If yes, we'd have to ask the question whether attaching the CSS 
 engine 
to the DOM is the right thing to do. And is the CSS Engine as such 
 not 
thread-safe or is only the setting of the CSS engine not thread safe 
 
   (method
BridgeContext.initializeDocument(Document))? 
   
  Once again no attempt was made to make the CSS Engine thread safe, 
 it
   might be thread safe for some set of operations but I can't give any 
 kind
   of guidelines.  Of course you must attach the CSS Engine otherwise the 
 
   CSS DOM (which we use to render the document) won't be available.
   
  In Batik it is 100% required that people access DOM/CSS/GVT through 
 
   one thread.
   
Maybe an idea could be to attach the CSS engine to the thread 
 (thread 
local) instead of to the DOM if only one thread uses the CSS engine 
 in 
a single rendering run and the CS engine is not thread-safe. 
Just brain-storming
   
  The only thing that might work would be to attach the CSSEngine 
 once
   and build the GVT tree once and keep that in the cache.  But even with
   that the GVT tree may well not support multiple concurrent renderings
   (although for a static document it should come close).
   
On 07.12.2008 12:32:43 Peter Coppens wrote:
 As in another post mentioned - I have been debugging

Re: Batik exception when using fop with svg images in threaded environment

2008-12-07 Thread Jeremias Maerki
Thanks for the hint. That made things easier. I've committed the
necessary changes but without the potential performance optimizations we
discussed.

On 07.12.2008 17:02:34 thomas.deweese wrote:
 Hi Jeremias,
 
 Jeremias Maerki [EMAIL PROTECTED] wrote on 12/07/2008 09:04:57 AM:
 
  Ok, I've created a Bugzilla issue to track this issue in FOP:
  https://issues.apache.org/bugzilla/show_bug.cgi?id=46360
 
   Ok, Thanks.
 
  A short test shows that I can't easily clone the document if it has a
  document type. The following is a patch the would fix the exception.
 [...]
  And I don't even know if the patch here is even plausible.
 
I strongly suspect that it's intentional that the document will not
 create a DocumentType Node as this should be provided when the
 document is created.
 
  But I guess I'll need to work around that outside of Batik as we'd have
  to wait for a Batik release before we can release a new FOP with the fix
  applied.  So I'm planning to do this:
 
   I suggest using:
 batik.dom.util.DOMUtilities.deepCloneDocument
 (Document doc, DOMImplementation impl);
 
   This has been in Batik for quite a while and has code to
 work around this exact problem.
 
  On 07.12.2008 14:44:53 thomas.deweese wrote:
   Hi Jeremias,
   
   Jeremias Maerki [EMAIL PROTECTED] wrote on 12/07/2008 08:09:48 
 AM:
   
Thanks a lot, Thomas. So the safest way would be to clone the 
 (cached) 
   SVG
document.
   
  Correct.  This is what we do when we cache documents - mostly 
 because 
   we
   do deal with dynamic documents.
   
As an optimization step one could investigate if some sort of
caching the GVT tree is doable (see my other post just a few minutes 
 
   ago).
I assume the second option would take quite a bit of effort 
 (including
benchmarks beforehand to determine the optimization potential).
   
  So the work would be knowing that you can reuse the GVT tree 
 because
   the destination format matches (so the 'added' bridges would match).
   The other potential issue would be the viewBox fitting (the affine for
   that lives in the 'CanvasGraphicsNode').  You would probably want to
   handle that outside of the GVT tree.
   
  As far as the boost this would give you, the actual construction
   of the GVT tree is pretty quick, but some of the stuff that is done
   the first time through (calculating BBoxes, text layout, etc) can be
   fairly time consuming.
   
On 07.12.2008 13:53:12 thomas.deweese wrote:
 Hi Jeremias,
 
 Jeremias Maerki [EMAIL PROTECTED] wrote on 12/07/2008 
 06:53:04 
   AM:
 
  Is that a sure thing that the DOM is not modified? 
 
It is 100% certain that you can't have one document with
 two attached GVT tree's - which I think you would need to do
 with your current approach.  The actual DOM infoset shouldn't
 be modified but internally we attach additional structures to
 handle the CSS  SVG DOMs.  Also some items (particularly in
 the SVG DOM) may be lazily constructed (so the two threads might
 collide when 'reading' those items).
 
  If yes, we'd have to ask the question whether attaching the CSS 
   engine 
  to the DOM is the right thing to do. And is the CSS Engine as 
 such 
   not 
  thread-safe or is only the setting of the CSS engine not thread 
 safe 
   
 (method
  BridgeContext.initializeDocument(Document))? 
 
Once again no attempt was made to make the CSS Engine thread 
 safe, 
   it
 might be thread safe for some set of operations but I can't give 
 any 
   kind
 of guidelines.  Of course you must attach the CSS Engine otherwise 
 the 
   
 CSS DOM (which we use to render the document) won't be available.
 
In Batik it is 100% required that people access DOM/CSS/GVT 
 through 
   
 one thread.
 
  Maybe an idea could be to attach the CSS engine to the thread 
   (thread 
  local) instead of to the DOM if only one thread uses the CSS 
 engine 
   in 
  a single rendering run and the CS engine is not thread-safe. 
  Just brain-storming
 
The only thing that might work would be to attach the CSSEngine 
 
   once
 and build the GVT tree once and keep that in the cache.  But even 
 with
 that the GVT tree may well not support multiple concurrent 
 renderings
 (although for a static document it should come close).
 
  On 07.12.2008 12:32:43 Peter Coppens wrote:
   As in another post mentioned - I have been debugging the code. 
 The 
   dom 
 is
   not modified. The dom caches a Parser object which is not 
 thread 
   safe.
   
   
From: Jeremias Maerki [EMAIL PROTECTED]
Reply-To: batik-users@xmlgraphics.apache.org
Date: Sun, 07 Dec 2008 12:17:48 +0100
To: batik-users@xmlgraphics.apache.org
Subject: Re: Batik exception when using fop with svg images 
 in 
 threaded

Re: Batik exception when using fop with svg images in threaded environment

2008-12-05 Thread Jeremias Maerki
I can reproduce the issue with this test case. It really only happens in
the multi-threading case (running against Batik Trunk). As soon as you
place break-points before the exception (NumberFormatException) can
happen, it won't. I'm not sure where to start looking for the problem.
Maybe we can do something in FOP to avoid this. Help/hints would be
appreciated.

Peter, there's one problem in your test case: You reuse the FOUserAgent
for all documents. That's not how it's supposed to be. You have to
create a new FOUserAgent for each processing run. Too bad, that doesn't
already fix the problem. ;-)

On 04.12.2008 23:58:57 Peter Coppens wrote:
 
 We have been able to reproduce with the following files
 
 http://www.nabble.com/file/p2089/TestPijltje.java TestPijltje.java 
 http://www.nabble.com/file/p2089/pols.xml pols.xml 
 http://www.nabble.com/file/p2089/pols.xslt pols.xslt 
 http://www.nabble.com/file/p2089/pijltje.svg pijltje.svg 
 
 TestPijltje.java is the test program. It starts two threads each of which
 will generate a pdf based on the pols.xslt stylesheet, pols.xml en
 pijltje.svg input file.
 
 If changing the code to only start one thread it always works fine. With two
 threads regular exceptions are thrown
 
 Stack trace is always something like 
 
 Dec 4, 2008 11:54:33 PM org.apache.fop.svg.SVGUserAgent displayError
 SEVERE: SVG Errorfile:/Users/pc/Downloads/fop-0.95/pijltje.svg:
 The attribute enable-background represents an invalid CSS value (new 0 0
 47.403 26.361).
 Original message:
 Invalid number.
 org.w3c.dom.DOMException: file:/Users/pc/Downloads/fop-0.95/pijltje.svg:
 The attribute enable-background represents an invalid CSS value (new 0 0
 47.403 26.361).
 Original message:
 Invalid number.
 at org.apache.batik.css.engine.CSSEngine.getCascadedStyleMap(Unknown
 Source)
 at org.apache.batik.css.engine.CSSEngine.getComputedStyle(Unknown
 Source)
 at org.apache.batik.bridge.CSSUtilities.getComputedStyle(Unknown
 Source)
 at org.apache.batik.bridge.CSSUtilities.convertVisibility(Unknown
 Source)
 at
 org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(Unknown
 Source)
 at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
 at
 org.apache.fop.render.pdf.PDFSVGHandler.renderSVGDocument(PDFSVGHandler.java:188)
 
 
 Any help warmly welcomed!
 
 Thanks
 
 Peter
 
 
 -- 
 View this message in context: 
 http://www.nabble.com/Batik-exception-when-using-fop-with-svg-images-in-threaded-environment-tp20809049p2089.html
 Sent from the Batik - Users mailing list archive at Nabble.com.
 
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDF transcoder and font handling

2008-11-19 Thread Jeremias Maerki
Embedded glyphs are currently rendered as shapes. We don't support the
Type 3 fonts that would be necessary to treat this text as text in PDF.

What you're seeing are anti-aliasing side-effects. If you zoom into the
text or disable smooth line art in Acrobat, you'll see that the
problem disappears. This should also not occur if the PDF is printed.

You might want to consider not embedding the font in the SVG as a
work-around.

On 19.11.2008 18:20:57 Lars Eirik Rønning wrote:
 Hi.
 I have generated a pdf from my svg document.
 Some fonts look really nice and crip, but have a look at this pdf and you
 will se that it has some problems..
 The l and i has issues and sometimes k.
 
 Could you please help me out on why this happens.
 The svg contains embedded font information with all the glyphs generated
 from Adobe Illustrator.
 
 Lars




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDF transcoder and font handling

2008-11-19 Thread Jeremias Maerki
It does not affect the printed document, no. They just manifest inside
Acrobat on screen. Open the PDF in a different PDF viewer (like
GhostScript/GhostView) and you won't see the same issue.

On 19.11.2008 18:39:28 Lars Eirik Rønning wrote:
 But what you are saying is that this is a side effect which does not matter
 in a printed document?
 My pdfs are the only thing that matters. SVG is merely the format i use to
 produce them..
 
 Thanks!
 
 On Wed, Nov 19, 2008 at 6:33 PM, Jeremias Maerki [EMAIL PROTECTED]wrote:
 
  Embedded glyphs are currently rendered as shapes. We don't support the
  Type 3 fonts that would be necessary to treat this text as text in PDF.
 
  What you're seeing are anti-aliasing side-effects. If you zoom into the
  text or disable smooth line art in Acrobat, you'll see that the
  problem disappears. This should also not occur if the PDF is printed.
 
  You might want to consider not embedding the font in the SVG as a
  work-around.
 
  On 19.11.2008 18:20:57 Lars Eirik Rønning wrote:
   Hi.
   I have generated a pdf from my svg document.
   Some fonts look really nice and crip, but have a look at this pdf and you
   will se that it has some problems..
   The l and i has issues and sometimes k.
  
   Could you please help me out on why this happens.
   The svg contains embedded font information with all the glyphs generated
   from Adobe Illustrator.
  
   Lars
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SVG text to pdf

2008-11-19 Thread Jeremias Maerki
For SVG usage, you can safely ignore that. It's irrelevant. Even if you
were using XSL-FO, the likelihood of bad baseline placement is now very
low. Basically, I should remove this message altogether since it doesn't
help and just confuses.

The thing about this warning: FOP needs the ascender and descender
values from a font's metrics to do layout. Some fonts contain values
that would lead to completely wrong line spacing. I had to write some
code some time ago that tries to find different, more useful values to
avoid strange layouts. I've never really found out what other
applications do in such situations. Maybe we're still doing something
wrong. But nobody complained.

On 19.11.2008 18:48:31 Lars Eirik Rønning wrote:
 Hi.
 I recently got this warning :  Ascender and descender together are larger
 than the em box. This could lead to a wrong baseline placement in Apache
 FOP.
 Could someone please help to understand what this mean.
 
 My svg elements are done like this:
 
 text style=font-family:arial;font-size=18
 tspan x=0 dy=24first line/tspan
 tspan x=0 dy=24second line/span
 
 /text




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SVG Image Fonts in fop

2008-11-17 Thread Jeremias Maerki
For reference, here's the thread on fop-users:
http://markmail.org/message/wwr5ekuyyzh2nix5

Barry, I don't think we've sent you here. This is a FOP issue (as long
as the PDF transcoding code resides in FOP). Anyway, your thread ended
with your asking if you should install the fonts on the server. I don't
like constantly asking questions with Yes. if you could just have
spent 2 minutes actually doing that and trying out the result. Just to
let you know: With your test files I've been able to get non-stroked
text when I have the necessary fonts installed on both the operating
system and FOP's configuration (FOP 0.95). Actually, I just used
auto-detect/ in the configuration. Good luck.

On 17.11.2008 10:33:08 Barry Whiting wrote:
 Hi 
  
 I wondered if anybody could help at all here please.
  
 I have a SVG image that has been saved into a file and is placed as a
 background image inside a pdf file using fo and the fop engine.  
  
 I have tried embedding the fonts into the pdf but the svg still does not
 retain correct fonts when rendered in the pdf.  I have posted on the fop
 forum but they pointed me in this direction as they let me know that
 batik actually handles the image in fop.
  
 If you could help me try to solve this I would be eternally grateful.
  
 Thanks
 Barry




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Fw: SVG Text rendering

2008-11-17 Thread Jeremias Maerki
I'm forwarding this to batik-users as this doesn't seem to be an issue
with code in FOP. Even when viewed in Squiggle, the attached file ends
up blank (1.7 and trunk).

I noticed that I get the desired output if I wrap each textPath element
in its own text element. I'm not sure if this is a Batik problem or not.


Forwarded by Jeremias Maerki [EMAIL PROTECTED]
--- Original Message ---
 From:Martin Jacobson [EMAIL PROTECTED]
 To:  [EMAIL PROTECTED]
 Date:Mon, 17 Nov 2008 09:34:48 +
 Subject: Re: SVG Text rendering



On 15 Nov 2008, at 08:16, Jeremias Maerki wrote:

 obviously, the pdf doesn't respect the font spec in the style sheet.
 Furthermore, its treatment of text on a path is no better than  
 before;
 viz three textPaths are rendered, out of around 100.

 Ok, in that case we're at a point where I'll ask you to send me a test
 file that I can run. In my tests, text on a path was painted as text.
 But there are still situations (for example with filter operations)
 where this is not possible and Batik produces the text internally  
 using
 bitmaps. If I can take a look at your test files, I can tell you  
 exactly
 it doesn't work in any special case.


OK, here is the command I used...

Martin:Batik martin$ java -jar batik-rasterizer.jar -m application/pdf  
-d ~/Desktop/batik-test.pdf ~/Desktop/batik-test.svg
About to transcode 1 SVG file(s)

Converting batik-test.svg to /Users/martin/Desktop/batik- 
test.pdf ... ... success
Martin:Batik martin$



I attach the test file: a set of roads in London's West End. Viewing  
this in Safari or Firefox gives you an idea of what I expect. The pdf  
I get from batik shows a complete blank.

I hope this helps - thanks for your time!

Martin


- Original Message Ends 


Jeremias Maerki
inline: batik-test.svg-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: SVG Image Fonts in fop

2008-11-17 Thread Jeremias Maerki
On 17.11.2008 11:43:19 Barry Whiting wrote:
 Hi Jeremias
 
 Sorry if I've caused offence there was none meant.

Barry, you didn't cause offence. I just don't like rethorical questions.
I'm sorry if I came across a little grumpy (which I am sometimes).

 We have tried installing the fonts on the server and I have added the
 auto-detect/ but the fonts are still not used correctly in the svg I'm
 afraid.  I've even tried using
 directoryfile:///data/webroot/www.londontown.com/HotelPrintMap/fonts/
 directory before the auto detect tag to give a base for the config.

Hmm, I think we need to approach this from a different angle. The
difficulty here might be the selection of font-family names. Batik
primarily uses the AWT fonts. For PDF output we try to find a match for
the font that was actually used (the AWT font could have been silently
substituted). So even if you have ArialMT in your SVG and the font is
reported by AWT as Arial MT, you might not Arial MT at all. For each
font, there can be different font names: font family name, PostScript
name and potentially others. As an experiment, it can make sense to
do the following: Open the SVG file in the Batik Squiggle Browser. That
takes the PDF output code out of the picture for the experiment. Replace
the font-families in the SVG by something else: just Arial, for
example. Or some exotic font to find out if Batik actually picks that
font and under what name. You can also look into the font file itself to
identify the font names it's reporting. When you got hold of the right
font-family names, I'd go back to PDF output. Maybe this helps. Good
luck.

 Thank you for all your help Jeremias again I'm sorry if I caused
 offence.
 
 Barry
 
 -Original Message-
 From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
 Sent: 17 November 2008 09:59
 To: batik-users@xmlgraphics.apache.org
 Subject: Re: SVG Image Fonts in fop
 
 For reference, here's the thread on fop-users:
 http://markmail.org/message/wwr5ekuyyzh2nix5
 
 Barry, I don't think we've sent you here. This is a FOP issue (as long
 as the PDF transcoding code resides in FOP). Anyway, your thread ended
 with your asking if you should install the fonts on the server. I don't
 like constantly asking questions with Yes. if you could just have
 spent 2 minutes actually doing that and trying out the result. Just to
 let you know: With your test files I've been able to get non-stroked
 text when I have the necessary fonts installed on both the operating
 system and FOP's configuration (FOP 0.95). Actually, I just used
 auto-detect/ in the configuration. Good luck.
 
 On 17.11.2008 10:33:08 Barry Whiting wrote:
  Hi 
   
  I wondered if anybody could help at all here please.
   
  I have a SVG image that has been saved into a file and is placed as a
  background image inside a pdf file using fo and the fop engine.  
   
  I have tried embedding the fonts into the pdf but the svg still does
 not
  retain correct fonts when rendered in the pdf.  I have posted on the
 fop
  forum but they pointed me in this direction as they let me know that
  batik actually handles the image in fop.
   
  If you could help me try to solve this I would be eternally grateful.
   
  Thanks
  Barry
 
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Batik and memory consumption

2008-11-13 Thread Jeremias Maerki
On 13.11.2008 18:32:32 Lars Eirik Rønning wrote:
 Hi.I noticed that when i used fop 0.95 it prints resolving file : jpg
 When i embed as base64 it prints the base64 string out.
 Why do you print this string?

Is that the exact logging message? I haven't found the string resolving
file anywhere in the codebase. Anyway, we do have some logging
statements inside FOP and XML Graphics Commons but they only appear if
the necessary log levels are activated. At any rate, those can be
disabled by adjusting the logging configuration.

 Also what are the major differences between fop0.20 which requires lots of
 ram to output the pdf, whereas 0.95 does this in a split second;)

I assume it's the addition of a specialized class (an image bridge) to
embed JPEG images in PDF without decompressing them. Furthermore, I've
invested a lot in avoiding unnecessary buffering and format conversions.

 Lars
 
 On Tue, Nov 4, 2008 at 10:06 PM, Jeremias Maerki [EMAIL PROTECTED]wrote:
 
  On 04.11.2008 21:39:33 Lars Eirik Rønning wrote:
   I will do that once i get back to the office.
   In terms of memory consumption how many mb do you think i need to
  allocate
   the process which handles large images such as 12mega pixels?
 
  If there's no color profile and you're not doing any SVG filtering and
  you're producing PDF, not more than a few kilobytes (some metadata plus
  some I/O buffers). I've just successfully run a test where I put a JPEG
  (7634x6745 px) in an SVG file and converted it to a PDF using FOP 0.95
  and -Xmx16M.
 
   In my code i allocate 350mb , but this still seems to crash.
  
  
   On Tue, Nov 4, 2008 at 9:28 PM, Jeremias Maerki [EMAIL PROTECTED]
  wrote:
  
Not really. Can you send me a test case so I can run it here?
   
On 04.11.2008 21:21:09 Lars Eirik Rønning wrote:
 Hi.
 When i try to run fop-0.95 with batik it seems to have problems with
 handling images.
 When trying to handle the image it prints something which looks like
  a
 base64encoded string and after this gives up.

 I do not have this issue when runniing batik1.7 with the included
 pdftranscoder.jar. unless it runs out of memory.
 Memory issue does not seem to be the problem this time though.

 Any ideas?
 Lars.

 On Tue, Nov 4, 2008 at 4:15 PM, Jeremias Maerki
  [EMAIL PROTECTED]
wrote:

 
  On 04.11.2008 16:03:13 Lars Eirik Rønning wrote:
   I get this when trying to run with fop0.95 in my
  project:Exception in
  thread
   main java.lang.NoClassDefFoundError:
   org/apache/avalon/framework/configuration/DefaultConfiguration
 
  That means you don't have Avalon Framework in your classpath.
 
   at
  
  org.apache.fop.svg.PDFTranscoder.transcode(PDFTranscoder.java:172)
   at
  
 
   
  org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
   at
  
 
   
  org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
  
   I use maven,  but this does not seem to work..
 
  That something doesn't work when Maven is used is no news to me.
  That's
  why I don't use Maven.
 
   On Tue, Nov 4, 2008 at 1:52 PM, Lars Eirik Rønning 
[EMAIL PROTECTED]
  wrote:
  
We wish to use maven.Is there any easy way to find the maven
  0.95
with
  all
its dependencies?
   
Thanks again.
   
   
On Tue, Nov 4, 2008 at 1:45 PM, Lars Eirik Rønning 
  [EMAIL PROTECTED]wrote:
   
Hi. all i do is to have my svg document include the image.When
  i
run
pdftranscoder its easting lots of ram.
   
the version i am using at the moment is the one which is
  shipped
with
batik..
Basically i use the pdftranscoder.jar file.
   
I was unable to get it working when running with fop.jar
Hope you are able to help me further.
   
Batik1.7 is the binary distro i am using.
   
ps.i will try what you suggested with running fop0.95
   
   
On Tue, Nov 4, 2008 at 1:31 PM, Jeremias Maerki
  [EMAIL PROTECTED]wrote:
   
Would you mind checking if you have a similar memory
  consumption
if
  you
install FOP 0.95 and run:
fop -imagein myimage.svg -pdf myimage.jpg
??? I'm asking since you might be running on older code that
might
  not
efficiently process JPEG images.
   
I guess it also depends what you're doing with the JPEG
  image. If
it
  is
run through filter operations the JPEG image has to be
  decoded in
  memory.
If not it should theoretically not load the JPEG file into
  memory
but
efficiently pass it into the PDF undecoded. However, if it
  has a
  color
profile, that could use up some memory

Re: Batik and memory consumption

2008-11-13 Thread Jeremias Maerki
Of course, base64 requires more memory. The whole file is encoded in the
URL and due to the encoding the file uses even more bytes (roughly 1.25
times) than the raw original file. The whole URL is stored as a single
java.lang.String in memory and gets passed around. base64 is nice for
smaller files that can be embedded. It doesn't make much sense for
larger images IMO.

On 13.11.2008 21:32:39 Lars Eirik Rønning wrote:
 ok, thanks.Does embedding base64 require more memory than if referencing
 only a file path?
 Thanks , we are in the middle of a project and utilize fop a lot.. It great!
snip/



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Permformance issues with headless running on server

2008-11-11 Thread Jeremias Maerki
I have no experience with FreeBSD whatsoever. But might I suggest
investigating if you can use a different JVM and check if the results
improve? This problem sounds a lot like the JVM is not up to handling
Batik/FOP. For example, GCJ/GNU Classpath have a few issues with
Batik/FOP.

On 12.11.2008 07:32:37 Lars Eirik Rønning wrote:
 Anyone have experience with running batik and pdftranscoding on freebsd?
 We are currently having major issues when trying to run the same process as
 on windows..
 WIndows consumes 300mb, freebsd one does not manage when giving it 1.5 gb..
 
 The issue here is relasted to images.
 
 We have tried to run the fop0.95 version on freebsd, but we keep getting
 something which looks like base64encodd string and then the process
 terminates..
 
 Is there any thing we can do to get this thing running on a headless
 server.. I would assume that only passing the jpeg stream would not require
 an enormous amount of memory..
 
 THanks guys.



HTH
Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Announce] Call For Papers opens for ApacheCon US 2009

2008-11-08 Thread Jeremias Maerki
If you have only 30 seconds to read this;

Join us in celebrating the ASF's 10th Anniversary at ApacheCon!

The Call for Papers is now open for ApacheCon US 2009, taking place 2-6
November in Oakland, California. Proposals are being accepted at
http://us.apachecon.com/c/acus2009/cfp/ and can be revised at anytime until
the submissions closing deadline of 28 February 2009.

In addition, sponsorship opportunities for both ApacheCon EU 2009/Amsterdam
and ApacheCon US 2009/Oakland are available. Please contact Delia Frees at
[EMAIL PROTECTED] for further information.

Please, read on...

***

ApacheCon Celebrates the ASF's 10th Anniversary in Oakland, California,
2-6 November 2009

Call for Papers Opens for ApacheCon US 2009

The Apache Software Foundation (ASF) invites submissions to its official
user and developer conference, taking place 2-6 November 2009 at the Oakland
Convention Center and Marriott Hotel. ApacheCon serves as a forum for
showcasing the ASF's latest projects, members, and community initiatives.
Offering unparalleled educational opportunities, ApacheCon's presentations,
hands-on trainings, and sessions address key technology, development,
business/community, and licensing issues in Open Source.

The wide range of activities offered at ApacheCon promotes the exchange of
ideas amongst ASF Members, committers, innovators, developers, vendors, and
users interested in the future of Open Source technology. The conference
program includes peer-reviewed sessions, trainings/workshops, and select
invited keynote presentations and speakers.

Conference Themes and Topics

Building on ten years of success, ApacheCon returns to the Bay Area for the
10th anniversary of the Apache Software Foundation. Comprising some of the
most active and recognized developers in the Open Source community,
ApacheCon provides an influential platform for dialogue between Open Source
developers and users, traversing a wide range of ideas, expertise, and
personalities.

ApacheCon welcomes submissions across many fields, geographic locations, and
areas of development. The breadth of the Apache community lends itself to
conference content that is somewhat loosely-structured, with common themes
of interest addressing groundbreaking technologies and emerging trends, best
practices (from development to deployment), case studies and lessons learned
(tips, tools, and tricks). In addition, ApacheCon will continue to offer its
highly popular, two-day intensive trainings; certifications of completion
will be distributed to those who fulfill all the training requirements.

Topics appropriate for submission are manifold, and may include but are not
restricted to: Apache HTTP server (installation, configuration, migration,
and more); ASF-wide projects (including Lucene, Hadoop, Jackrabbit, and
Maven); Scripting languages and dynamic content (such as Java, Perl, Python,
Ruby, XSL, and PHP); Security and e-commerce (performance tuning, load
balancing and high availability); New technologies (including broader
initiatives such as Web Services and Web 2.0); ASF-Incubated projects (such
as Sling, UIMA, and Shindig); and Business/Community issues (Open Source
driven business models, open development, enterprise adoption, and more).

Submission Guidelines

Submissions must include; – Session title - Speaker name - Speaker biography
- Session description - Format and duration - Audience expertise level

Full details are available online on the CFP page at [WWW]
http://us.apachecon.com/c/acus2009/cfp/

Types of Presentations; - Trainings/Workshops - General Sessions - Case
Studies/Industry Profiles - Corporate Showcases  Demonstrations - Fast
Feather (short) sessions - Birds of a Feather discussions - Invited
Keynotes/Panels/Speakers

Pre-Conference Trainings/Workshops

Held on the first two days of the conference (2-3 November 2009), ApacheCon
trainings are available at a registration fee beyond the regular conference
fee. Proposals may be submitted for half-day (3 hours), full-day (6 hours),
or two-day (12 hours) training sessions. These proposed tutorials should be
aimed at providing in-depth, hands-on development experience or related
continuing education. Training submissions are welcome at beginner,
intermediate, and expert levels.

General Sessions include presentations on practical development
applications, insight into high-interest projects, best practices and key
advances, overcoming implementation challenges, and industry innovations.
Especially welcome are submissions that extend participants' understanding
the role of ASF projects and their influence on the Open Source community at
large. General Sessions are scheduled for 50 minutes and are accessible to
all conference delegates.

Case Study/Industry Profile

Practitioners are invited to submit presentations that focus on how
implementing particular ASF technologies led to improved products/solutions,
service offerings, changes in work practices, among other successes.

Re: Batik and memory consumption

2008-11-04 Thread Jeremias Maerki
Would you mind checking if you have a similar memory consumption if you
install FOP 0.95 and run:
fop -imagein myimage.svg -pdf myimage.jpg
??? I'm asking since you might be running on older code that might not
efficiently process JPEG images.

I guess it also depends what you're doing with the JPEG image. If it is
run through filter operations the JPEG image has to be decoded in memory.
If not it should theoretically not load the JPEG file into memory but
efficiently pass it into the PDF undecoded. However, if it has a color
profile, that could use up some memory.

On 04.11.2008 13:19:26 Lars Eirik Rønning wrote:
 Hi.When i try to render a pdf from batik using jpg images of high quality
 the memory consumption is extremely high.
 I tested this now with a 12mp image (4000*3000).
 In order to have this output the pdf correctly with the pdftranscoder it
 needs almost 600mb.
 
 Any way  of improving this?
 
 Thanks guys, Batik rocks.




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ApacheCon live video streaming available; keynotes and Apache 101 are free

2008-11-04 Thread Jeremias Maerki
Can't make ApacheCon this week in New Orleans?  You can still watch all 
the keynotes, Apache 101 sessions, and system administration track in 
live video streams:

   http://streaming.linux-magazin.de/en/program_apacheconus08.htm?ann

Keynotes and the Apache 101 lunchtime sessions are free; the full 
sysadmin track, including httpd performance, security, and server stack 
administration talks are available for a fee.

Keynotes include:
- David Recordon, Six Apart  (Wednesday 09:30)
   Learning from Apache to create Open Specifications

- Shahani Markus Weerawarana, Ph.D.  (Thursday 11:30)
   Standing on the Shoulders of Giants

- Sam Ramji, Microsoft  (Friday 11:30)
   struct.new(future, :open, :microsoft)


   Reminder: New Orleans is CST or UTC/GMT -6 hours.


Advance notice: ApacheCon EU 2009 returns to Amsterdam, 23-27 March.  We 
had a great response to our CFP and look forward to announcing the 
schedule in the next month.

Regards
-- 
Lars Eilebrecht  -  V.P., Conference Planning
[EMAIL PROTECTED]  -  http://www.us.apachecon.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Batik and memory consumption

2008-11-04 Thread Jeremias Maerki
Not really. Can you send me a test case so I can run it here?

On 04.11.2008 21:21:09 Lars Eirik Rønning wrote:
 Hi.
 When i try to run fop-0.95 with batik it seems to have problems with
 handling images.
 When trying to handle the image it prints something which looks like a
 base64encoded string and after this gives up.
 
 I do not have this issue when runniing batik1.7 with the included
 pdftranscoder.jar. unless it runs out of memory.
 Memory issue does not seem to be the problem this time though.
 
 Any ideas?
 Lars.
 
 On Tue, Nov 4, 2008 at 4:15 PM, Jeremias Maerki [EMAIL PROTECTED]wrote:
 
 
  On 04.11.2008 16:03:13 Lars Eirik Rønning wrote:
   I get this when trying to run with fop0.95 in my project:Exception in
  thread
   main java.lang.NoClassDefFoundError:
   org/apache/avalon/framework/configuration/DefaultConfiguration
 
  That means you don't have Avalon Framework in your classpath.
 
   at
   org.apache.fop.svg.PDFTranscoder.transcode(PDFTranscoder.java:172)
   at
  
  org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
   at
  
  org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
  
   I use maven,  but this does not seem to work..
 
  That something doesn't work when Maven is used is no news to me. That's
  why I don't use Maven.
 
   On Tue, Nov 4, 2008 at 1:52 PM, Lars Eirik Rønning [EMAIL PROTECTED]
  wrote:
  
We wish to use maven.Is there any easy way to find the maven 0.95 with
  all
its dependencies?
   
Thanks again.
   
   
On Tue, Nov 4, 2008 at 1:45 PM, Lars Eirik Rønning 
  [EMAIL PROTECTED]wrote:
   
Hi. all i do is to have my svg document include the image.When i run
pdftranscoder its easting lots of ram.
   
the version i am using at the moment is the one which is shipped with
batik..
Basically i use the pdftranscoder.jar file.
   
I was unable to get it working when running with fop.jar
Hope you are able to help me further.
   
Batik1.7 is the binary distro i am using.
   
ps.i will try what you suggested with running fop0.95
   
   
On Tue, Nov 4, 2008 at 1:31 PM, Jeremias Maerki
  [EMAIL PROTECTED]wrote:
   
Would you mind checking if you have a similar memory consumption if
  you
install FOP 0.95 and run:
fop -imagein myimage.svg -pdf myimage.jpg
??? I'm asking since you might be running on older code that might
  not
efficiently process JPEG images.
   
I guess it also depends what you're doing with the JPEG image. If it
  is
run through filter operations the JPEG image has to be decoded in
  memory.
If not it should theoretically not load the JPEG file into memory but
efficiently pass it into the PDF undecoded. However, if it has a
  color
profile, that could use up some memory.
   
On 04.11.2008 13:19:26 Lars Eirik Rønning wrote:
 Hi.When i try to render a pdf from batik using jpg images of high
quality
 the memory consumption is extremely high.
 I tested this now with a 12mp image (4000*3000).
 In order to have this output the pdf correctly with the
  pdftranscoder
it
 needs almost 600mb.

 Any way  of improving this?

 Thanks guys, Batik rocks.
   
   
   
   
Jeremias Maerki
   
   
-
To unsubscribe, e-mail:
  [EMAIL PROTECTED]
For additional commands, e-mail:
  [EMAIL PROTECTED]
   
   
   
   
 
 
 
 
  Jeremias Maerki
 
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Batik and memory consumption

2008-11-04 Thread Jeremias Maerki

On 04.11.2008 16:03:13 Lars Eirik Rønning wrote:
 I get this when trying to run with fop0.95 in my project:Exception in thread
 main java.lang.NoClassDefFoundError:
 org/apache/avalon/framework/configuration/DefaultConfiguration

That means you don't have Avalon Framework in your classpath.

 at
 org.apache.fop.svg.PDFTranscoder.transcode(PDFTranscoder.java:172)
 at
 org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
 at
 org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156)
 
 I use maven,  but this does not seem to work..

That something doesn't work when Maven is used is no news to me. That's
why I don't use Maven.

 On Tue, Nov 4, 2008 at 1:52 PM, Lars Eirik Rønning [EMAIL PROTECTED]wrote:
 
  We wish to use maven.Is there any easy way to find the maven 0.95 with all
  its dependencies?
 
  Thanks again.
 
 
  On Tue, Nov 4, 2008 at 1:45 PM, Lars Eirik Rønning [EMAIL PROTECTED]wrote:
 
  Hi. all i do is to have my svg document include the image.When i run
  pdftranscoder its easting lots of ram.
 
  the version i am using at the moment is the one which is shipped with
  batik..
  Basically i use the pdftranscoder.jar file.
 
  I was unable to get it working when running with fop.jar
  Hope you are able to help me further.
 
  Batik1.7 is the binary distro i am using.
 
  ps.i will try what you suggested with running fop0.95
 
 
  On Tue, Nov 4, 2008 at 1:31 PM, Jeremias Maerki [EMAIL PROTECTED]wrote:
 
  Would you mind checking if you have a similar memory consumption if you
  install FOP 0.95 and run:
  fop -imagein myimage.svg -pdf myimage.jpg
  ??? I'm asking since you might be running on older code that might not
  efficiently process JPEG images.
 
  I guess it also depends what you're doing with the JPEG image. If it is
  run through filter operations the JPEG image has to be decoded in memory.
  If not it should theoretically not load the JPEG file into memory but
  efficiently pass it into the PDF undecoded. However, if it has a color
  profile, that could use up some memory.
 
  On 04.11.2008 13:19:26 Lars Eirik Rønning wrote:
   Hi.When i try to render a pdf from batik using jpg images of high
  quality
   the memory consumption is extremely high.
   I tested this now with a 12mp image (4000*3000).
   In order to have this output the pdf correctly with the pdftranscoder
  it
   needs almost 600mb.
  
   Any way  of improving this?
  
   Thanks guys, Batik rocks.
 
 
 
 
  Jeremias Maerki
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Let Me Unsubscribe!!!

2008-09-26 Thread Jeremias Maerki
I've unsubscribed you, now that I know which mail address we are talking
about.

On 26.09.2008 09:31:08 Balderscape wrote:
 
 Hi Joel,
 
 I did not mean to offend or misclassify. I meant spam in the sense that this
 email that I am receiving against my will. It was not spam for the last few
 months
 when I did want it, but now that I don't and also as I am unable to stop it
 via the prescribed method, I believe that it has become unsolicited and thus
 spam.
 
 I also use the word spam in a sense of bitter retailation at the apache mx
 bot as
 it calls mail from me to unsubscribe spam.
 
 
 btw, the mail address for the unsubscribe that I am trying to do is:
 
 [EMAIL PROTECTED]
 
 Maybe if anyone else on the list replied to this address it would
 unsubscribe me.
 
 Anyone want to give it a bash?
 
 
 Joel Uckelman wrote:
  
  Thus spake Balderscape:
  
  How ironic is this. I get 10 emails a day of Batik spam (as I no longer
  want
  them in this inbox) and my mail to unsubscribe is classed as spam.
  
  I hope that a list admin is able to help you unsubscribe.
  
  BUT: Please don't ever call spam mail from a list to which you
  subscribed.
  That's a misuse of the word and blurs a distinction for which we have no
  other words.
  
  -- 
  J.
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
 -- 
 View this message in context: 
 http://www.nabble.com/Let-Me-Unsubscribe%21%21%21-tp19683532p19683760.html
 Sent from the Batik - Users mailing list archive at Nabble.com.
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Font support

2008-08-14 Thread Jeremias Maerki
Oh, right. It's funny: when I searched for CEF I found posts by myself
from a few years back. Well, I know my brain isn't perfect. ;-) Anyway,
CEF is not properly described by Adobe. I haven't been able to find a
specification. The best hint you can find is this:
http://support.adobe.com/devsup/devsup.nsf/docs/50568.htm

So if anyone wanted to add support for this font format, that person is
up for some reverse-engineering or asking around in the FreeType
project:
http://markmail.org/message/f5wjx5ymbwvbsooi

On 14.08.2008 15:39:42 Lars Eirik Rønning wrote:
 It may  be stupid, but in illlustrator its referred to as Adobe CEF fonts..
 Gues its still not supported.
 
 On Thu, Aug 14, 2008 at 3:01 PM, Jeremias Maerki [EMAIL PROTECTED]wrote:
 
  I assume you mean CFF, not CEF. And yes, TrueType/OpenType fonts
  with CFF glyphs (Compact Font Format) are not supported for PDF output,
  yet. SVG fonts are the work-around. Better would be a patch against FOP
  to add CFF support. ;-) Shouldn't be too difficult to implement but so
  far nobody's itch has been big enough.
 
  On 14.08.2008 14:54:00 Lars Eirik Rønning wrote:
   Hi.
   I am exporting my illustrator file to svg. I prefer to embed my fonts,
  but
   it seems that adobe CEF type fonts are not supported when generating pdf
   from batik?
   Is this correct?
   Should i just settle for using svg fonts?
  
   Any help is greatly appreciated.
  
   Lars
 
 
 
 
  Jeremias Maerki
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: WG:

2008-08-05 Thread Jeremias Maerki
Have you tried using https instead of http with your SVN client? It's a
common work-around. HTH

On 05.08.2008 16:22:36 Kerschbaum Michael wrote:
snip/
 Where can i get the Original Source Code of Batik 1.7 ... I can't use svn.. 
 Because our firewall blocks that ?!
snip/



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[ANN] Apache XML Graphics Commons 1.3.1 Released

2008-06-12 Thread Jeremias Maerki
The Apache XML Graphics team is pleased to announce a new release of
Apache XML Graphics Commons.

Apache XML Graphics Commons is a library that consists of several
reusable components used by Apache Batik [1] and Apache FOP [2]. Many of
these components can easily be used separately outside the domains of
SVG and XSL-FO.

This release is mostly a bugfix release for the image loading framework that
has been introduced in version 1.3.

For a detailed list of changes, see
http://xmlgraphics.apache.org/commons/changes.html

Source and binary distributions can be downloaded from the
corresponding directories in an Apache Software Foundation mirror at:
http://www.apache.org/dyn/closer.cgi/xmlgraphics/commons. See also
the download page: http://xmlgraphics.apache.org/commons/download.html


Jeremias Maerki,
on behalf of the Apache XML Graphics PMC

[1] http://xmlgraphics.apache.org/batik/
[2] http://xmlgraphics.apache.org/fop/


pgpTYS7QKsIn7.pgp
Description: PGP signature


Re: SVG highres image to pdf

2008-06-12 Thread Jeremias Maerki
Thanks, Thomas, for your explanations. I guess I'll have to find a quiet
hour to do a few more tests. What you say makes sense. At any rate, I
was primarily looking into the case where you have real-world lengths
(i.e. not pixels) given for the graphic size and a proper viewBox. I'll
report back ASAP.

On 12.06.2008 18:41:12 thomas.deweese wrote:
 Hi Jeremias,
 
 Jeremias Maerki [EMAIL PROTECTED] wrote on 06/11/2008 08:01:11 AM:
 
  Well, PDF as such doesn't have a resolution as we're primarily talking
  about a vector graphics format. But of course, as soon as we're talking
  about a bitmap (or effects resulting in bitmap generated by Batik) a
  resolution becomes important. In FOP we distiguish two resolutions:
  - source resolution: Mapping of 1px to a length when interpreting pixel
  sizes on the input side (ex. border=solid 1px in XSL-FO).
  - target resolution: The same, but on the output side (meaning the
  resolution of the bitmaps that are produced)
  
  Batik doesn't have that distinction AFAIK. Thomas and I once talked
  about this. The result was a special setting in the PDFTranscoder:
  org.apache.fop.svg.PDFTranscoder.KEY_DEVICE_RESOLUTION
  (accepts the resolution in dpi, datatype Float)
 
Right Batik doesn't have this distinction.  It's a distinction
 that becomes important when you are embedding raster objects into
 a vector format (like PDF).  We might need/want this for
 the SVGGraphics2D but on the rendering side this is already taken
 care of by the Graphics2D interface (the Graphics2D should by default
 have 1 unit == 1pt, however you can investigate the actual user space
 to device transform to know what the mapping from pt-pixels is for
 the device the Graphics2D is associated with - and Batik does this
 for many things most notably filters).
 
  With this hint, Batik is tricked into rendering the bitmaps in a higher
  resolution.
 
Well more correctly with this hint Batik is told the destination
 resolution through the Graphics2D interface is different from the
 default 1 pix = 1pt.  There is no tricking involved, this is exactly
 the way the Graphics2D API was designed to work.
 
  In PDF there's a compensating transformation matrix that
  makes sure the size of the output is correct. When working with SVG in a
  FO context, FOP's target resolution is automatically used. For Batik,
  there's currently no connection between the -dpi flag on the rasterizer.
 
Well the -dpi flag adjusts the mapping between real world units,
 like 'in' 'pt', 'cm', and pixels ('px').  For a properly constructed
 SVG file this is sufficient to adjust the resolution of the output
 for raster formats.
 
  BTW, some time ago, I submitted a patch for fixing the output resolution
  in the BitmapTranscoder:
  http://issues.apache.org/bugzilla/show_bug.cgi?id=44276
  Thomas recently fixed something in the same are but my patch is still
  open. I'm not sure if the effect is the same or what the status is.
 
I fixed the metadata in the output.  Your patch seems to treat
 '-dpi' as a global scaling parameter which really isn't correct.
 
Let me try to illustrate how '-dpi' works.  Given the following
 outermost svg tag:
 svg width=8in height=10in viewBox=0 0 800 1000
 
If you provide '-dpi 300' you will get an image that is 
 2400x3000 pixels who's content comes from the rectangle 0,0 800x1000
 of the infinite canvas.  If you don't have the viewBox then you
 will get a 2400x3000 pixel output that comes from the rectangle
 0,0 2400x3000 of the infinite canvas.
 
Further if the outermost svg tag is:
 svg width=800 height=1000 viewBox=0 0 800 1000
 
Then the '-dpi 300' command line option will do nothing (as 
 far as this analysis is concerned).  This is because width=800
 says I want an 800 pixel output regardless of the real world unit 
 to pixel mapping.
 
If you wanted a 2400x3000 pixel output from that document then
 you should specify -width 2400 -height=3000 on the command line.
 
Now it's worth noting that you simply can't do what you want if
 you have the following root svg element:
 svg width=800 height=1000
 
Because without the viewBox specification the region of the canvas
 that is to be used should match 1:1 with the output image,
 where 1px == 1 user space unit. 
 
Now of course we can provide non-conformant modes in Batik that 
 the user can request, and it may be useful to add a 'scale' option 
 that effectively provides a viewBox transform that corresponds to 
 0,0 WidthxHeight and then scales the width and height, but really 
 the correct answer is for people to specify width and height with 
 real world units (otherwise what does dpi mean?) _and_ provide a 
 correct viewBox.  Unfortunately many people do neither.
 
Given the above I don't think the proposed patch which (if I
 understand it correctly) will overload the  meaning of 'dpi' is a 
 good solution.  Do you agree with me after my rather long winded 
 response

Re: SVG highres image to pdf

2008-06-11 Thread Jeremias Maerki
Well, PDF as such doesn't have a resolution as we're primarily talking
about a vector graphics format. But of course, as soon as we're talking
about a bitmap (or effects resulting in bitmap generated by Batik) a
resolution becomes important. In FOP we distiguish two resolutions:
- source resolution: Mapping of 1px to a length when interpreting pixel
sizes on the input side (ex. border=solid 1px in XSL-FO).
- target resolution: The same, but on the output side (meaning the
resolution of the bitmaps that are produced)

Batik doesn't have that distinction AFAIK. Thomas and I once talked
about this. The result was a special setting in the PDFTranscoder:
org.apache.fop.svg.PDFTranscoder.KEY_DEVICE_RESOLUTION
(accepts the resolution in dpi, datatype Float)

With this hint, Batik is tricked into rendering the bitmaps in a higher
resolution. In PDF there's a compensating transformation matrix that
makes sure the size of the output is correct. When working with SVG in a
FO context, FOP's target resolution is automatically used. For Batik,
there's currently no connection between the -dpi flag on the rasterizer.
This whole resolution thing is still a bit unclear to me inside the
Batik context.

BTW, some time ago, I submitted a patch for fixing the output resolution
in the BitmapTranscoder:
http://issues.apache.org/bugzilla/show_bug.cgi?id=44276
Thomas recently fixed something in the same are but my patch is still
open. I'm not sure if the effect is the same or what the status is.
Thomas?

On 09.06.2008 19:01:41 Lars Eirik Rønning wrote:
 Hi.
 I realize this may be an apache fop topic, but because i do use batik as my
 pdf generator i hope you will help me..
 
 When i try to add a resized image into my svg the problem seems to be that
 the quality is not good enough when rendering the pdf
 
 When i create my pdf using the batik-rasterizer i have understood that the
 image will be created with dpi 72.
 Does this mean that i need to embed my high res image and then use the scale
 operator to have it output at a greater resolution?
 
 The -dpi flag when using the batik-rasterizer does not work well when
 generating pdf as i have understood that pdf's do not have any notion of the
 resolution at all..
 
 I hope you will be able to help me out.
 It does not suffice to have a decent rendering of the image when printing
 from my pdf..




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: No ImagePreloader found when attempting to reference external font

2008-06-05 Thread Jeremias Maerki
Sorry for the delay. I seemed to have missed this.

My suspicion is that the No ImagePreloader found is only a follow-up
error of an error thrown when parsing the SVG. Are there no other error
messages before the above error in the log? Lea, would you send me your
SVG font file you referenced in your testfile below so I don't have to
spend too much time trying to set up the same testcase? I'm not too
familiar with SVG fonts. I will then try to reproduce the problem ASAP
so I can provide better feedback. Otherwise, please try to set this up
for debugging and try to figure out by
org.apache.fop.image.loader.batik.PreloaderSVG fails to recognize your
SVG as a valid SVG file.

On 02.06.2008 18:04:40 Lea Thurman wrote:
 
 Hi,
 
 I am using batik 1.7 to render an SVG document. I then create a FOP document
 and reference the generated SVG which is then converted into PDF using FOP
 0.95beta.  The FOP document is below (but I suspect not the issue):
 
 ?xml version=1.0 encoding=utf-8?
 fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
 xmlns:fox=http://xmlgraphics.apache.org/fop/extensions;
   fo:layout-master-set
 fo:simple-page-master master-name=A4-portrait
 page-height=29.7cm page-width=21.0cm margin=2cm
   fo:region-body/
 /fo:simple-page-master
   /fo:layout-master-set
   fox:external-document id=img1 src=/Users/temp/project/page1.svg/
 /fo:root
 
 Everything has been working well until I attempted to reference an external
 font in the SVG file.
 
 I get a 'No ImagePreloader found error when I reference the SVG document
 below. The error seems to be as a result of the following SVG element which
 is referencing an external font file. I know the external font file is good
 since this can be converted successfully into PDF using the testcard
 characters. The SVG file is below:
 
 ?xml version=1.0 standalone=yes?
 svg width=400px height=300px version=1.1
 xmlns='http://www.w3.org/2000/svg'  
  defs
  font-face font-family=Swiss721NarrowSWA
font-face-src
  font-face-uri
 xlink:href=file:///Users/temp/project/myfont.svg#Font1/
/font-face-src 
  /font-face
  /defs
 g style=font-family: Swiss721NarrowSWA; font-size:18;fill:black 
   text x=20 y=120@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_/text 
 /g
 /svg
 
 Everything works as expected if I embed the font into the SVG document
 rather than referencing it.
 
 I am not sure if it is something I have done with Batik or it is a FOP error
 so I decided to post here first. Apologies if this is clearly a FOP problem
 however FOP is able to handle to conversion with an embedded font so maybe I
 have referenced the font incorrectly in SVG.
 
 Any help would be much appreciated.
 
 Regards
 Lea.
 -- 
 View this message in context: 
 http://www.nabble.com/%22No-ImagePreloader-found%22-when-attempting-to-reference-external-font-tp17604859p17604859.html
 Sent from the Batik - Users mailing list archive at Nabble.com.
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Batik/Svg for web

2008-06-05 Thread Jeremias Maerki
Though I'm not aware of any implementations of the combination (Firefox?),
SVG + XForms could be an interesting combination for building
applications. If someone builds that Batik browser plug-in we recently
talked about on batik-dev and an XForms integration for Batik, this
would become interesting. Just dreaming... ;-)

See also:
http://www.w3.org/TR/2004/WD-SVG12-20040226/#xforms
http://www.ibm.com/developerworks/xml/library/x-svgxf1.html

On 04.06.2008 19:24:14 adambomb wrote:
 
 Hi All,
 I have to develop a web based app where I should be able to generate dynamic
 graphical content based on the user's input. I am using JSP pages  on the
 front  end. I found SVG to be the best thing available. After experimenting
 in inline SVG I found out that it lacks many features like user interaction,
 zoomability, javascript onclick features etc. And inline was easy to put in
 a jsp page. But I want a more robust and full featured output. But I am not
 able to implement the pure SVG. Could some body help me providing me all the
 steps required to make things work? Also I have heard about BATIK which is
 Apache's implementation of SVG, but I am not sure it can be used for web
 based apps or not.
 If somebody knows please enlighten me about the step by step procedure for
 doing that.
 thanks
 -- 
 View this message in context: 
 http://www.nabble.com/Batik-Svg-for-web-tp17652069p17652069.html
 Sent from the Batik - Users mailing list archive at Nabble.com.
 


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Batik/Svg for web

2008-06-05 Thread Jeremias Maerki
I don't know. Volunteers are always welcome. Coordination through the
batik-dev mailing list.

On 05.06.2008 10:49:47 Jake Beard wrote:
 Is anything happening with that plug-in? It seemed like such a good
 idea, but I haven't heard any recent discussion about it...
 
 Jake
 
 On Thu, Jun 5, 2008 at 10:49 AM, Jeremias Maerki [EMAIL PROTECTED] wrote:
  Though I'm not aware of any implementations of the combination (Firefox?),
  SVG + XForms could be an interesting combination for building
  applications. If someone builds that Batik browser plug-in we recently
  talked about on batik-dev and an XForms integration for Batik, this
  would become interesting. Just dreaming... ;-)
 
  See also:
  http://www.w3.org/TR/2004/WD-SVG12-20040226/#xforms
  http://www.ibm.com/developerworks/xml/library/x-svgxf1.html
 
  On 04.06.2008 19:24:14 adambomb wrote:
 
  Hi All,
  I have to develop a web based app where I should be able to generate 
  dynamic
  graphical content based on the user's input. I am using JSP pages  on the
  front  end. I found SVG to be the best thing available. After experimenting
  in inline SVG I found out that it lacks many features like user 
  interaction,
  zoomability, javascript onclick features etc. And inline was easy to put in
  a jsp page. But I want a more robust and full featured output. But I am not
  able to implement the pure SVG. Could some body help me providing me all 
  the
  steps required to make things work? Also I have heard about BATIK which is
  Apache's implementation of SVG, but I am not sure it can be used for web
  based apps or not.
  If somebody knows please enlighten me about the step by step procedure for
  doing that.
  thanks
  --
  View this message in context: 
  http://www.nabble.com/Batik-Svg-for-web-tp17652069p17652069.html
  Sent from the Batik - Users mailing list archive at Nabble.com.
 
 
 
  Jeremias Maerki
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDF Size When Referencing External Fonts

2008-06-05 Thread Jeremias Maerki
On 05.06.2008 11:24:12 Lea Thurman wrote:
 
 Jeremais, 
 
 Thanks. It works when running against FOP 0.95-beta(Batik 1.7). I was
 running against FOP-0.94(batik 1.6) originally. (I put 0.95 in error in the
 original post). Sorry.
 
 I am hijacking the thread a little but I am surprised by the size of the
 resulting PDF. Its seems that each font I reference or embed akes up about
 300K per page in the resulting PDF file. A 2 page PDF with 2 referenced
 fonts generates a 1.1MB PDF, without fonts it is 84K.
 
 Does this seem normal to you? I suspect that because I am using FOP to to
 render a number of SVG documents generated by batik and each SVG document
 has the same referenced fonts then the PDF transcoder is duplicating the
 fonts for each page.

Not duplicating the fonts. Rather rendering all text as shapes. We don't
have support for Type 3 fonts, yet, which could be used for SVG fonts.
So the PDF size is completely expected.

 Does this sound correct? It seems regardless of whether I reference or embed
 the font in the SVG multiple fonts of the same type are embedded in the PDF.

In both cases they are SVG fonts, the way you do it. If you just remove
the font-face elements from the SVGs I expect improvements of PDF sizes.

 I am going to see what happens if I specify the fonts in FOP and see if the
 file size is reduced.

That's exactly what you should do instead of using SVG fonts. If you use
FOP 0.95beta special font configuration should actually be unnecessary 
(except for an auto-detect/ in the FOP configuration if you
transform FO+SVG rather than SVG). This way, the fonts get embedded
natively which should reduce PDF size and add copy/paste support for all
but the most complex SVG text.

 Failing this we are going to try and remove FOP from the equation and amend
 batik to support multiple pages via the nextPage() method.

Difficult as the PDF output support for Batik is still part of FOP. ;-)
But I know what you mean. I think both approaches should work. Only the
configuration is different because two different APIs are used.

Good luck!

 As always any pointers would be much appreciated. 
 
 Regards
 Lea.
 
 
 Jeremias Maerki-2 wrote:
  
  Sorry for the delay. I seemed to have missed this.
  
  My suspicion is that the No ImagePreloader found is only a follow-up
  error of an error thrown when parsing the SVG. Are there no other error
  messages before the above error in the log? Lea, would you send me your
  SVG font file you referenced in your testfile below so I don't have to
  spend too much time trying to set up the same testcase? I'm not too
  familiar with SVG fonts. I will then try to reproduce the problem ASAP
  so I can provide better feedback. Otherwise, please try to set this up
  for debugging and try to figure out by
  org.apache.fop.image.loader.batik.PreloaderSVG fails to recognize your
  SVG as a valid SVG file.
  
  On 02.06.2008 18:04:40 Lea Thurman wrote:
  
  Hi,
  
  I am using batik 1.7 to render an SVG document. I then create a FOP
  document
  and reference the generated SVG which is then converted into PDF using
  FOP
  0.95beta.  The FOP document is below (but I suspect not the issue):
  
  ?xml version=1.0 encoding=utf-8?
  fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
  xmlns:fox=http://xmlgraphics.apache.org/fop/extensions;
fo:layout-master-set
  fo:simple-page-master master-name=A4-portrait
  page-height=29.7cm page-width=21.0cm margin=2cm
fo:region-body/
  /fo:simple-page-master
/fo:layout-master-set
fox:external-document id=img1
  src=/Users/temp/project/page1.svg/
  /fo:root
  
  Everything has been working well until I attempted to reference an
  external
  font in the SVG file.
  
  I get a 'No ImagePreloader found error when I reference the SVG document
  below. The error seems to be as a result of the following SVG element
  which
  is referencing an external font file. I know the external font file is
  good
  since this can be converted successfully into PDF using the testcard
  characters. The SVG file is below:
  
  ?xml version=1.0 standalone=yes?
  svg width=400px height=300px version=1.1
  xmlns='http://www.w3.org/2000/svg'  
   defs
   font-face font-family=Swiss721NarrowSWA
 font-face-src
   font-face-uri
  xlink:href=file:///Users/temp/project/myfont.svg#Font1/
 /font-face-src 
   /font-face
   /defs
  g style=font-family: Swiss721NarrowSWA; font-size:18;fill:black 
text x=20 y=120@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_/text 
  /g
  /svg
  
  Everything works as expected if I embed the font into the SVG document
  rather than referencing it.
  
  I am not sure if it is something I have done with Batik or it is a FOP
  error
  so I decided to post here first. Apologies if this is clearly a FOP
  problem
  however FOP is able to handle to conversion with an embedded font so
  maybe I
  have referenced the font incorrectly in SVG.
  
  Any help would be much appreciated

Re: Fop 0.95beta - svg tif images

2008-04-10 Thread Jeremias Maerki
=-159.24
   
 y=-441.960004 width=318.48
   
 height=883.92001 fill=none stroke-width=0pt /
   /svg:g
   /svg:g
   /svg:svg
   /fo:instream-foreign-object
   /fo:block
   /fo:block-container
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Batik and SVG into layered PDF

2008-04-08 Thread Jeremias Maerki
Wonderful! Here we go:

The most important thing to note here is that PDF output is still done
by code in Apache FOP. That will remain so until I finally find/take the
time to move the font and PDF libraries from FOP to XML Grapics Commons
so we can move the PDF Transcoder over to Batik (long-term goal). So you
will need to work on both codebases. FOP's PDF library is in the package
org.apache.fop.pdf and the PDF transcoder is in org.apache.fop.svg.

The first thing is to get a copy of the PDF 1.5 specification so you can
look up all the details on Optional Content. The
org.apache.fop.pdf.PDFDocument class has then to be extended so you can
specify that you want to create a PDF 1.5 file. Please note that we have
to be able to retain the PDF 1.4 functionality as PDF/A-1 requires PDF
1.4. So if PDFDocument is configured for PDF 1.4, the optional content
feature may not be used. Then, some PDF classes will probably have to be
written to generate the necessary PDF objects for Optional Content.
Finally, you need to dive into the Batik source code to find out exactly
how to identify the various layers. I'm not exactly an expert in that
area and some input from the Batik devs is probably necessary/welcome.
I assume we'd have to provide a special PDFGElementBridge for the PDF
transcoder so you can react on the layer changes. The bridge can be
registered in the org.apache.fop.svg.PDFBridgeContext class.

I hope that gets you started and that it doesn't scare you away. If you
need anything else, please yell. I'll try to help as much as I can.

On 08.04.2008 12:42:25 Honza Miksatko wrote:
 
 Jeremias,
 
 
 Thanks for you answer - yes, I meant Optional Content in PDF 1.5.
 
 
 Actually contributing to Batik and implementing this feature is also an 
 option to go. So guys, how can I help you implement this feature? ;) Could 
 you point me to classes that I should understand and where the implementation 
 would be?
 
 
 Thanks,
 Jan
 
 
  On 07.04.2008 22:02:43 Honza Miksatko wrote:
 
 
  Hi all,
 
 
 
 
  I need to convert SVG with layers (implemented as g groups) into PDF
  with layers. Batik unfortunately produces a PDF _without_ layers. Is
  this feature of PDF supported by the rasterizer?
 
 
  No. I'm not sure but I assume you mean the Optional Content feature
  introduced with PDF 1.5 (chapter 4.10), right? At the moment, we're
  creating PDF 1.4 only. In PDF 1.4, there's no notion of layers.
 
 
  If not, do you know by chance a tool that supports it?
 
 
  Hmm, wrong question. The right question would be: How can I help you
  guys to implement this missing feature? ;-)
 
 
 
 
 
 
 
 
  Thanks,
  Jan
 
 
 
 
 
 
  Jeremias Maerki
 
 
 


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JPEGTranscoder: Bad quality - JPEG is displaced

2008-04-03 Thread Jeremias Maerki
On 03.04.2008 15:09:11 Hans Stoessel wrote:
snip/
 Bye the way: The resulting JPEG has a resolution dpi of 96 in IrfanView!

...which is fixed by https://issues.apache.org/bugzilla/show_bug.cgi?id=44276

snip/




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JPEGTranscoder: Bad quality - JPEG is displaced

2008-03-31 Thread Jeremias Maerki
Hans,

can you please post an example that shows the problem? I don't know of
any displacement problem in either the JPEG or PDF transcoder. Thanks!

Concerning JPEG quality: You can use a hint to specify JPEG quality.

org.apache.batik.transcoder.image.JPEGTranscoder.KEY_QUALITY (Float)
See also:
http://xmlgraphics.apache.org/batik/javadoc/org/apache/batik/transcoder/image/JPEGTranscoder.html
The default is 0.75.

On 28.03.2008 13:48:47 Hans Stoessel wrote:
 Hi
 
 I transcode a SVG into a JPEG using the JPEGTranscoder. I set the quality to 
 1.0 (maximum) and the resolution to 300 dpi.
 
 I have 2 problems:
 
 
 Quality
 ---
 The qualitiy of the JPEG is bad, especially the texts (fonts). What can I 
 do?
 
 
 JGEP is truncated
 --
 In my SVG I have a black frame around the SVG. When I transcode it to a 
 JPEG, the frame, and the whole SVG, is displaced. I mean the content from 
 the SVG is moved to the top and to the left. I can see a white space on 
 bottom and right where the frame should be.
 
 What could be wrong?
 Is there a workaround?
 
 By the way: I have the same problem when I trabscode the SVG with the 
 PDFTranscoder from FOP. Is something in my SVG wrong?
 
 
 Thanks for the help.
 
 Hans
 
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: IE and generated images

2008-03-17 Thread Jeremias Maerki
Eric,

why don't you just use the PDFTranscoder that is bundled with Batik?

On 10.03.2008 16:48:09 Eric Hamacher wrote:
 Hello All:
 
  
 
 The images I write to the ServletOutputStream in my web app will not
 print once in IE.  Therefore, I want to send a PDF to the browser.  I
 can't see how to integrate Batik with iText.  Anybody ever do this?
 
  
 
 Regards,
 
 Eric Hamacher




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: optimizing the performance of svgrasterizer

2008-03-17 Thread Jeremias Maerki
I don't know if there's any built-in switch to optimize here, but have
you experimented with the JVM settings? Like -server and/or
-XX:+UseParallelGC. Just a thought.

On 17.03.2008 11:27:03 Matthias Grumet wrote:
 hello,
 
 we are using batik's svgrasterizer for a game, but are experiencing
 performance issues, when rasterizing SVGs.
 
 we believe that the function
 org.apache.batik.gvt.renderer.StaticRenderer.repaint(Shape)
 creates quite a lot of temporary objects which triggers garbage
 collection a lot which results in occasional stuttering of the game.
 
 so i was wondering, if there are any options or configurations to
 batik in order to have the svgrasterizer perform better in terms of
 garbage collection and CPU time.
 
 we want it to create as little garbage as possible and as little CPU
 time as possible.
 
 thank you,
 matthias
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[ANN] Apache XML Graphics Commons 1.3 Released

2008-03-10 Thread Jeremias Maerki
The Apache XML Graphics team is pleased to announce a new release of
Apache XML Graphics Commons.

Apache XML Graphics Commons is a library that consists of several
reusable components used by Apache Batik [1] and Apache FOP [2]. Many of
these components can easily be used separately outside the domains of
SVG and XSL-FO.

The most important addition in this release is an image loading
framework which supports all sorts of different image formats (bitmap
and vector) and is highly extensible.

Besides that, there were a larger number of smaller additions and
bugfixes.

Support for Java 1.3 has been dropped. Java 1.4 or later is required now.

For a detailed list of changes, see
http://xmlgraphics.apache.org/commons/changes.html

Source and binary distributions can be downloaded from the
corresponding directories in an Apache Software Foundation mirror at:
http://www.apache.org/dyn/closer.cgi/xmlgraphics/commons. See also
the download page: http://xmlgraphics.apache.org/commons/download.html


Jeremias Maerki,
on behalf of the Apache XML Graphics PMC

[1] http://xmlgraphics.apache.org/batik/
[2] http://xmlgraphics.apache.org/fop/


pgpwttlZ0ZHg3.pgp
Description: PGP signature


Re: org.apache.batik.transcoder.TranscoderException: null

2008-03-06 Thread Jeremias Maerki
Indeed, this work-around shouldn't be necessary. I assume it's just that
the batik-codec.jar is not in the classpath.

On 06.03.2008 15:36:08 Helder Magalhães wrote:
  Success!  I now have an image written to my OutputStream!  I just
   included JPEGTranscoder and JPEGImageWriter in my own code.  Thank you
   very much everybody!
 
 Great! :-)
 
 Nevertheless, IMHO it's still important to understand if the behavior
 you experienced was due to misuse of Batik API (could the experts
 enlighten here?) or if you just worked around an existing issue
 (erroneously missing classes) - if so, best would be to report and
 make sure it's fixed in a later release and that others benefit from
 this! ;-)
 
 Regards,
 
   Helder Magalhães
 


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Call for Papers Opens for ApacheCon US 2008

2008-03-02 Thread Jeremias Maerki
From the ApacheCon Planning Team:

Call for Papers Opens for ApacheCon US 2008

!REMINDER: this will be a short CFP, ending on 3 April, so please be 
sure to get your CFP submissions in soon!

The Apache Software Foundation (ASF) invites submissions to its official
users' conference, ApacheCon US 2008, held 3 November through 7 
November, 2008 at the Sheraton New Orleans.  ApacheCon serves as a forum 
for showcasing the ASF's latest developments, including its projects, 
membership, and communities.  ApacheCon offers unparalleled educational 
opportunities, with dedicated presentations, hands-on trainings, and 
sessions that address core technology, development, business/marketing,
and licensing issues in Open Source.

The conference program includes competitively selected presentations, 
trainings/workshops, and a small number of invited speakers. All 
sessions undergo a peer review process by the ApacheCon Conference 
Planning team.

With the great success of ApacheCon US 2007, we are excited to move to 
New Orleans in 2008.  We're proud to announce that we are going to 
intensify and deepen the pre-conference trainings by offering 2-day 
trainings alongside full- and half-day trainings, and each training 
session will have certifications of completion for those who fulfill all 
the requirements of the training.

The ASF comprises some of the most active and recognized developers in 
the Open Source community.  By bringing together the pioneers, 
developers, and users of flagship Open Source technologies, ApacheCon 
provides an influential platform for dialogue, between the speaker and 
the audience, between project contributors and the community at large, 
traversing a wide range of ideas, expertise, and personalities.

ApacheCon welcomes submissions from like-minded delegates across many 
fields, geographic locations, and areas of development.  Please note you 
do not need to be committer or project contributor at the ASF to submit 
a proposal!  The unique nature of the Apache community lends itself to 
creating a conference content that is not only the best of Open Source 
but cutting edge as well.

Conference Themes and Topics

* Apache HTTP server topics: installation, configuration, migration
* ASF-wide projects such as, Jakarta, Tomcat, Maven, Geronimo,
  Harmony, Lucene, SpamAssassin, Portals, and Web Services
* Scripting languages and dynamic content such as Java, Perl, Python,
  Ruby, XSL, and PHP
* Security and e-commerce
* Performance tuning, load balancing and high availability
* New technologies and initiatives such as Web Services and Web 2.0
* ASF-Incubated projects such as Abdera, CXF, and Qpid
* Case studies and industry profiles demonstrating the use of Apache
  software
* Open source community and business models, legal and marketing
  issues

NOTE: Marketing-oriented submissions aimed at promoting specific
organizations or products will not be accepted.


Submission Guidelines

Submissions must include title; speaker's name with affiliation and
email address; format (Training vs. General Session) and duration
(1-hour general session, or half-, full-day, or two-day training);
expertise level (beginner to advanced); a full description including 
abstract and objectives (200 words or less);  intended audience and 
maximum number of participants, with background knowledge expected of 
the participants (Trainings only); and speaker bio (100 words or less). 
  Full presentation and training materials will be due at a later
date, as noted below.

Types of Submissions: Trainings, General Sessions, Case Studies and 
Industry Profiles.

Speakers whose proposals are accepted have registration fees waived,
reasonable travel and part of their lodging expenses paid.  Only one
speaker will be covered per accepted proposal.


Important Dates

Proposal submission deadline:  3  April, 2008 *Before* ApacheCon Europe!
Notification of acceptance:25 April, 2008
Materials for Web site:3  October, 2008
Materials for Trainings:   17 October, 2008
Conference Date:   Monday to Friday, 3-7 November 2008
Trainings: Monday and Tuesday, 3-4 November 2008
General Sessions:  Wednesday to Friday, 5-7 November 2008


To submit your completed proposal, please follow the directions to logon 
here to the existing ApacheCon CFP system:
   http://www.us.apachecon.com/us2008/

Use your existing ApacheCon CFP login, or create a new one as needed. 
Then under ApacheCon US 2008 Status and Options, click the Fill out a 
CFP form link.

If you are not yet subscribed to the ApacheCon announcement mailing
list, send an email message to [EMAIL PROTECTED]


About ApacheCon US 2008

ApacheCon is co-produced by the Apache Software Foundation and Stone
Circle Productions. The ApacheCon Planning team comprises ASF Members
from all over the world working on a wholly-volunteer basis.
For more information, visit 

Re: Message deleted ?

2008-02-28 Thread Jeremias Maerki
It has been deleted in Nabble which we don't have any control over. I
have no idea why it has disappeared there. You'd have to ask Nabble
support. In all other archives it's still there, for example:
http://markmail.org/message/7w7ub7j5j44dcl6f

But your question hasn't been answered, yet.

On 28.02.2008 14:08:15 Morkulth wrote:
 
 Hello, i posted a message like this last week, but it seems it has been
 deleted... is there any reason for that?
 
 I have not been informed by any means.
 
 My question was only Batik related, so i was wondering if there are ny
 special rules about what to ask...
 
 TY, and Kind regards.
 
 Filipe
 -- 
 View this message in context: 
 http://www.nabble.com/Message-deleted---tp15736005p15736005.html
 Sent from the Batik - Users mailing list archive at Nabble.com.




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Produce multiple PDF pages (was: Re: The URI can't be opened error: when generating PDF with embedded image)

2008-02-19 Thread Jeremias Maerki
The PDFTranscoder currently doesn't offer anything to produce multiple
PDF pages. However, the underlying PDFDocumentGraphics2D class does (but
it might not help you). Would you just want to convert a series of SVG
files to a single PDF?

If that's the case, I can give you an alternative: FOP Trunk (i.e.
unreleased code from our SVN repo) can do exactly that using a
properietary extension to XSL-FO. You'd call FOP, not Batik, but Batik
is still used to process the SVG graphics. The FO file to glue all this
together would look like this:

fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
xmlns:fox=http://xmlgraphics.apache.org/fop/extensions;
  fo:layout-master-set
fo:simple-page-master master-name=dummy page-width=5in 
page-height=5in
  fo:region-body/
/fo:simple-page-master
  /fo:layout-master-set
  fox:external-document id=img1 src=mysvgimage1.svg/
  fox:external-document id=img2 src=mysvgimage2.svg/
  fox:external-document id=img3 src=mysvgimage3.svg/
/fo:root

Maybe that helps.

On 18.02.2008 20:39:00 Lea Thurman wrote:
snip/
 Now all I need to do is get the PDF to produce pages? I know I am  
 hijacking the thread the any pointers there given your other post?
snip/


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: The URI can't be opened error: when generating PDF with embedded image

2008-02-15 Thread Jeremias Maerki
Uhm, here it doesn't even work in Squiggle. AFAIK, Batik doesn't
recognize BMP images at all, only JPEG, PNG and TIFF. What if you
convert the BMP image to a PNG?

On 14.02.2008 21:39:34 Lea Thurman wrote:
 
 Hi,
 
 I am new to batik so please be gentle.
 
 I am getting the following error from the PDFTranscoder when I attempt to
 convert an SVG (attached) with a single embedded bitmap.
 
 The URI bmpfile.bmp on element image can't be opened because:
 The URI can't be opened: Unable to make sense of URL for connection
 
 The SVG is displayed correctly when I view it via squiggle.
 
 http://www.nabble.com/file/p15488838/bmpfile.svg bmpfile.svg 
 
 This maybe a silly question but does the PDFTranscoder support the image
 tag? Assuming it does is it simple the fact that it cannot find the bitmap
 file?
 
 Any help is much appreciated.
 Lea Thurman.
 -- 
 View this message in context: 
 http://www.nabble.com/The-URI-can%27t-be-opened-error%3A-when-generating-PDF-with-embedded-image-tp15488838p15488838.html
 Sent from the Batik - Users mailing list archive at Nabble.com.
 


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Fonts available to ImageTranscoder

2008-02-11 Thread Jeremias Maerki
If your server runs a Unix it could very well be that there's no Arial
font available.

If I'm not wrong, yes, your listFonts() method should show the fonts
available to Batik. Except that it doesn't list any SVG fonts embedded
in the document.

On 11.02.2008 14:34:11 Dylan Browne wrote:
 Hi all,
 
  
 
 I have a question regarding the fonts that are available to the
 ImageTranscoder classes.
 
  
 
 Would it be correct to assume that the list of fonts returned from the
 following snippet of code correctly and completely identify the fonts
 that are available to a, for example, PNGTranscoder.
 
  
 
   private void listFonts() {
 
 // get the local graphics environment
 
 GraphicsEnvironment graphicsEvn =
 GraphicsEnvironment.getLocalGraphicsEnvironment();
 
 // get all the available fonts
 
 String availFonts[] =
 graphicsEvn.getAvailableFontFamilyNames();
 
 System.out.println(The following fonts are available for
 use:);
 
 for (int i = 0; i  availFonts.length; i++) {
 
   System.out.println(availFonts[i]);
 
 }
 
   }
 
  
 
 I have encountered a situation in which occasionally a PNG derived from
 SVG is skewing the alignment of the text (it seems to ignore the
 basline-shift attribute). An examination of the fonts available using
 the above code indicates that my chosen font, Arial, is not available.
 The actual font incorporated in the PNG is definitely not Arial, and
 seems to be some basic system font.
 
  
 
 The initial SVG itself is rendered fine in the browser, but I assume
 that the fonts there are being retrieved from the client. The PNG
 transcode is carried out on the server, where the above code seems to
 suggest that Arial is not available. Could this be the cause of the
 problem?
 
  
 
 Thanks very much in advance for any advice,
 
  
 
 Dylan 
 
  
 




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JApplet .jar compression?

2008-02-11 Thread Jeremias Maerki
Ok, but you're talking about the app server. The applet runs on the
client. You can still deploy a Java 1.5/6 applet via a servlet if you
can make sure the client has a Java 1.5 or 6 plug-in installed. My
0.05CHF.

On 11.02.2008 16:27:35 Marc-Wayne M. Formales wrote:
 Mark
  
 Thanks, but unfortunately BEA Weblogic 8.1 does not support Java 1.5 or 
 above.  :(Regards, Marc
 
 
 Date: Sun, 10 Feb 2008 22:05:09 -0800From: [EMAIL PROTECTED]: 
 batik-users@xmlgraphics.apache.org; [EMAIL PROTECTED]: Re: JApplet .jar 
 compression?If you could upgrade to 1.5 or 6 then you'd be able to take 
 advantage of Pack200 compression.Regards,Mark
 On Feb 8, 2008 3:45 PM, Marc-Wayne M. Formales [EMAIL PROTECTED] wrote:
 
 Hi, I'm running my applet through some performance testing and noticing that 
 the download times over the network are quite long.  The jar file is already 
 compressed via Java and is around 3MB.  Do you guys know of some techniques I 
 could use to compress the jar even further and/or improve applet download 
 times?  Thanks. p.s. Production environment is BEA Weblogic 8.1/Java 
 1.4.2_11.Regards, Marc-- Mark Fortnerblog: http://www.jroller.com/phidias 




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to embed JPG image in SVG for FOP pdf generation?

2008-01-30 Thread Jeremias Maerki
Please just use the Transcoder API [1] and instead of JPEGTranscoder,
you use org.apache.fop.pdf.PDFTranscoder. You need to make sure that the
pdf-transcoder.jar is in the classpath of your application.

[1] http://xmlgraphics.apache.org/batik/using/transcoder.html

On 31.01.2008 03:30:18 lou tribal wrote:
 Hello,
 I hope someone will be able to save my life.
 I am using FOP to generate a pdf document which must contains an image. 
 This image does not come from a file but from a generated JPEG image (receive 
 some color indexed black and white image as a byte array that is then 
 converted as JPEG).
 I am searching the way I can include that image in the generated PDF.
 To achieve that I need to use an SVG image with embeded JPEG image using the 
 xlink:href=data syntax.
 Does anybody knows how I can go from my JPEG image bytes as a String encoded 
 in base64 to an embeded svg in a pdf docuement?
 I am successful at generating the SVG xml fragment from Java (when I save the 
 fragment to a file and open it with a svg viewer I can see the image) but I 
 cannot find how I can pass it to my XSL-FO file for PDF generation.
 Hope someone will help me with some code example.
 Thank you.
 
 lt;



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Increasing sizes of rasterized images

2008-01-08 Thread Jeremias Maerki
I see. When I tried something I stumbled over the same thing I noticed
once before: Increasing the resolution for any ImageTranscoder
descendent does not have any effect on the number of pixels of the image
generated, although the resolution is correctly saved in the generated
PNG file. The attached patch made against Batik Trunk, however, should
fix this problem. But it's not well tested and could have unwanted
side-effects.

On the rasterizer, you can use the -dpi parameter to set a different
resolution. If you use the Transcoder API, that would be the
SVGAbstractTranscoder.KEY_PIXEL_UNIT_TO_MILLIMETER key.

Increasing the resolution will increase the number of pixels but not the
image's natural size. But browsers generally ignore the resolution
setting so this should actually help you. Well, at least I hope so.

On 07.01.2008 17:11:36 Martin Polley wrote:
 Hi Jeremias,
 
 I guess my original post was a little lacking in clarity :)
 
 I produce two kinds of documentation deliverable from the same source files
 (and using the same SVGs) -- PDF and XHTML. In the PDFs, the SVGs are indeed
 passed through, so they are embedded as vector images, with zoomability,
 etc.
 
 But for XHTML, I need the SVGs to be rasterized as PNGs. (Most readers in my
 company only have IE without an SVG plugin.) This is where my problem lies,
 as currently, the text in the PNGs is too small. If I make the SVG image
 bigger, it will not fit onto the page in the PDF version.
 
 Any ideas?
 
 Thanks,
 
 -- 
 Martin Polley
 Technical Communicator
 +972 52 3864280
 http://capcloud.com/
 
 
 On Jan 7, 2008 5:43 PM, Jeremias Maerki [EMAIL PROTECTED] wrote:
 
  How are the PDFs generated? If they are generated by Apache FOP you
  should try if you cannot just pass through the SVG in which case they
  are embedded as vector images. That way you can zoom in all the way you
  want without making the images any bigger. Just a thought.
 
  On 06.01.2008 11:09:14 Martin Polley wrote:
   Hi there,
  
   I have a set of images that I am rasterizing using Batik. (The SVG
   images are referenced by DITA XML documents that are processed using
   the DITA Open Toolkit with a plugin that calls Batik to rasterize the
   SVGs (using the Rasterizer Ant task).)
  
   My problem is that several images are large flowcharts. When I
   rasterize them at their current size, the text is too small to read. I
   could simply increase the size of the SVG images, but the same XML
   sources (and SVG files) are also used to create a PDF version of the
   document. If I make the images any bigger, they will not fit on the
   PDF page. (In PDF, it does not matter that they are small--readers can
   just zoom in.)
  
   Is there anything I can do (in terms of Batik parameters) to increase
   the size of my images?
  
   I don't mind increasing the size of all my images by the same amount
   (though this is not ideal). The only thing I have tried that changes
   the size of the rasterized images is to explicitly specify width, but
   then all my images (even the smallest ones) come out at the same
   width. I have tried changing the DPI parameter, but this has no effect
   on the size of the rasterized images.
  
   The only other approach I can think of would be to apply an XSLT
   transform to the SVGs before they get rasterized, but I think this is
   a little beyond my meager XSLT skills.
  
   Thanks in advance,
  
   --
   Martin Polley
   Technical Communicator
   +972 52 3864280
   http://capcloud.com/
  



Jeremias Maerki


image-transcoder-resolution-patch.diff
Description: Binary data
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: I Give Up. Does Anyone Code for Cash?

2008-01-07 Thread Jeremias Maerki
IMO, this was a legitimate attempt and definitely not frowned upon.
Maybe you were just a bit unfortunate as this happened around New Year
with many people having the heads elsewhere. Offering money to get a
particular job done is one of the things you can do to support an open
source projects if you can't write a patch yourself for whatever reason
(time, skills etc.).

On 04.01.2008 21:39:28 Venalicium wrote:
 
 Since I haven't gotten a reply to my original message or to my coding for
 cash offer, I'm guessing this is frowned upon in the list.
 
 I've posted the request to a more appropriate place, eLance:
 http://www.elance.com/c/rfp/main/jobInfo.pl?jobid=13163292catId=12554
 
 There is a PDF document with the program requirements/flow there.
 
 Thank you for your time and patience.
 -- 
 View this message in context: 
 http://www.nabble.com/I-Give-Up.--Does-Anyone-Code-for-Cash--tp14586277p14624511.html
 Sent from the Batik - Users mailing list archive at Nabble.com.


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Increasing sizes of rasterized images

2008-01-07 Thread Jeremias Maerki
How are the PDFs generated? If they are generated by Apache FOP you
should try if you cannot just pass through the SVG in which case they
are embedded as vector images. That way you can zoom in all the way you
want without making the images any bigger. Just a thought.

On 06.01.2008 11:09:14 Martin Polley wrote:
 Hi there,
 
 I have a set of images that I am rasterizing using Batik. (The SVG
 images are referenced by DITA XML documents that are processed using
 the DITA Open Toolkit with a plugin that calls Batik to rasterize the
 SVGs (using the Rasterizer Ant task).)
 
 My problem is that several images are large flowcharts. When I
 rasterize them at their current size, the text is too small to read. I
 could simply increase the size of the SVG images, but the same XML
 sources (and SVG files) are also used to create a PDF version of the
 document. If I make the images any bigger, they will not fit on the
 PDF page. (In PDF, it does not matter that they are small--readers can
 just zoom in.)
 
 Is there anything I can do (in terms of Batik parameters) to increase
 the size of my images?
 
 I don't mind increasing the size of all my images by the same amount
 (though this is not ideal). The only thing I have tried that changes
 the size of the rasterized images is to explicitly specify width, but
 then all my images (even the smallest ones) come out at the same
 width. I have tried changing the DPI parameter, but this has no effect
 on the size of the rasterized images.
 
 The only other approach I can think of would be to apply an XSLT
 transform to the SVGs before they get rasterized, but I think this is
 a little beyond my meager XSLT skills.
 
 Thanks in advance,
 
 -- 
 Martin Polley
 Technical Communicator
 +972 52 3864280
 http://capcloud.com/
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PDFTranscoder and german umlaut

2007-12-18 Thread Jeremias Maerki
Are you 100% sure that the String you supply has been constructed
correctly? People often run into problems such as these if the Strings are
constructed from byte arrays or InputStreams with the wrong encoding
specified. In my experience, in about 70% of the cases I've seen, people
who have their XML in a java.lang.String have done something
strange/wrong with encodings earlier.

On 18.12.2007 08:49:07 Mork0075 wrote:
 I've tried to change the encoding but this doesnt work.
 
 Now i create a temp file from the svg and instead of providing an
 StringReader
 
 new TranscoderInput(new
 StringReader(svgMsg));
 
 i provide the URI for the file
 
 new TranscoderInput(file.toURI.toString());
 
 This works fine. Any ideas why this is the case?
 
 
 
 Robert Lummert schrieb:
  Hello Mark,
 
  I use umlauts myself and have no problem transcoding to pdf with very
  much the same code as yours. Which xml-encoding do you use in the svg?
  I use
   ?xml version=1.0 encoding=ISO-8859-15?
  and simply write out the umlauts in the svg.
  The result is correct in svg as well as in transcoded pdf.
 
  Cheers,
 
   Robert
 
 
  Mork Ork wrote:

  Hello,
 
  i try to transform a SVG string into a PDF. But now where i have to use
  german umlauts like Ä,Ö,Ü theres a problem:
 
  My SVG is in UTF-8 and looks like this:
 
  id=tspan6095(2) Abladestelle - Lagerort -
  Verwendungsschlüssel/tspan/text
 
  If i transcode it into PDF its not properly encoded, there are some
  hieroglyph instead of the umlauts.
 
  This is my code:
 
  public static String convert(String svgMsg, String labelId) {
 
  File pdf = new File(labelId + .pdf);
  OutputStream outputStream;
  try {
  outputStream = new FileOutputStream(pdf);
  PDFTranscoder transcoder = new PDFTranscoder();
  TranscoderInput input = new TranscoderInput(new
  StringReader(svgMsg));
  TranscoderOutput output = new TranscoderOutput(outputStream);
  transcoder.transcode(input, output);
  outputStream.flush();
  outputStream.close();
 
  Can anyone tell me how to deal with the umlaut?
 
  Thanks a lot
 
  


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Layer structure and IDs not maintained when transcoding SVG to PDF

2007-12-13 Thread Jeremias Maerki
Jay,

I know the bigger part of the PDF spec and I can't see a mechanism to
preserve those layers. Maybe some grouping could be done by marking
content but most probably AI doesn't support any such thing. You'd have
to do it backwards: check with Adobe if AI can somehow restore layers
from a PDF and then see how this could be produced.

Or even better, get Adobe to fix their SVG import. But that's a really
difficult thing to do.

On 12.12.2007 22:41:25 jalder wrote:
 
 Hello everyone, I am having trouble converting a SVG map of the world to PDF
 and maintaining the original layer structure and layer IDs in the SVG. I did
 some digging on the forums and didn't see anything, so I hope this hasn't
 been addressed before. Our goal is to be able to convert SVG maps into a PDF
 so that they can be imported into Adobe Illustrator. AI can import the SVG
 directly, but some items are geographically shifted in the wrong place.
 Since AI doesn't import our SVG maps properly we turned to PDF, which does
 import correctly. I am using the Batik 1.6 transcoding package and it worked
 like a charm. The catch is the layer structure and layer ids in the original
 SVG are not persevered in the PDF. For example, we have a layer for text
 labels on the map which then has sub layers for street labels, city labels,
 county label, etc. When I import the PDF into AI the layer structure is
 completely flattened.
 
 Is this a known limitation of Batik? Does the PDF format even support nested
 layers in the first place?
 
 Thanks
 
 Jay
 -- 
 View this message in context: 
 http://www.nabble.com/Layer-structure-and-IDs-not-maintained-when-transcoding-SVG-to-PDF-tp14304549p14304549.html
 Sent from the Batik - Users mailing list archive at Nabble.com.




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: batik-rasterizer.jar (cant convert jpg from svg)

2007-11-27 Thread Jeremias Maerki
Sorry, realized too late, that it is a Sun JVM. But in that case, it's
quite strange, because the JPEG codec is still present in 1.6.0_03. But
since it's a Linux system, maybe some other JVM could still be present,
too. Maybe the wrong one got started and this wasn't noticed.

Jeremias Maerki



On 27.11.2007 11:15:37 Jeremias Maerki wrote:
 It's pretty obvious it's no Sun JVM. I think the question should be:
 which Batik version are you running? That's because the 1.7beta1 does
 have special image writer implementations which uses ImageIO (since Java
 1.4) instead of Sun's JPEG codec. But maybe the mechanism for choosing
 the right ImageWriter doesn't work properly, yet. If you're on Batik 1.6,
 please check if it works with Batik 1.7beta1. If it doesn't we'll have
 to fix a bug.
 
 Jeremias Maerki
 
 
 
 On 27.11.2007 01:11:22 Cameron McCormack wrote:
  Hi.
  
  juuser:
   Now when I use batik-rasterizer, I CAN convert svg to png.
   BUT when I try to convert svg to jpg, I get nasty error:
   
   Converting file.svg to /home/raf/file.jpg ... Exception in thread main
   java.lang.NoClassDefFoundError: com.sun.image.codec.jpeg.JPEGCodec
  …
   What could cause this error ? 
  
  The transcoder is trying to use Sun’s JPEG codec classes, which are not
  present.  What JRE are you running Batik on?
  
  -- 
  Cameron McCormack, http://mcc.id.au/
  xmpp:[EMAIL PROTECTED]  ▪  ICQ 26955922  ▪  MSN [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Slow document creation

2007-10-19 Thread Jeremias Maerki
If it's really just the first time, you see the effect of class-loading,
just-in-time (JIT) compiling and class initialization. That's a Java
thing and there's not much you can do about it

Jeremias Maerki



On 18.10.2007 20:50:00 Frederich, Eric P21322 wrote:
 Hey guys,
 
 I've got some simple graphics that a Java program is generating.
 Right now it is generating Java2D commands and I can see the graphics in
 a Swing window.
 I eventually want the graphics to be saved out in an SVG format so I
 found batik.
 I started using an SVGGraphics2D object to do this and it works fine
 except that it seems to take a long time the first time through.
 I don't know if this is Eclipse, or Java or what...
 I put some println's in my code to see what part was hanging it up and
 it seems to be the following line...
 SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
 
 When I run the code below I see here1-4 appear real fast but then it
 takes about 5 seconds before it moves on to here5.
 /* begin example code */
 System.out.println(here1);
 DOMImplementation domImpl =
 GenericDOMImplementation.getDOMImplementation();
 System.out.println(here2);
 // Create an instance of org.w3c.dom.Document.
 String svgNS = http://www.w3.org/2000/svg;;
 System.out.println(here3);
 Document document = domImpl.createDocument(svgNS, svg, null);
 System.out.println(here4);
 // Create an instance of the SVG Generator.
 SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
 System.out.println(here5);
 /* end example code */
 
 Any ideas why it is so slow?
 Is it going out over the network?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[POLL:RESULTS] User poll on Java version requirements

2007-10-15 Thread Jeremias Maerki
Dear Apache XML Graphics Batik/FOP/Commons users,

the user poll is now closed and the results are available on the
following Wiki page:

http://wiki.apache.org/xmlgraphics/UserPollOct2007

Thanks a lot to all who took the time to fill out the survey. Based on
the results we can say that it's safe to drop support for Java 1.3 on
future versions. If we're going to skip directly to Java 1.5 needs some
more discussion among the project team. The results here are not as
clear. The discussion and decision making will happen on
[EMAIL PROTECTED] if anyone (non-committers welcome, too!)
is interested.

Thanks,
Jeremias Maerki



On 08.10.2007 09:48:11 Jeremias Maerki wrote:
 Dear Apache XML Graphics Batik/FOP/Commons users,
 
 as you probably know, all products of the Apache XML Graphics project are
 still compatible with Java 1.3. We are currently discussing about
 dropping support for Java 1.3 and instead make Java 1.4 the minimum Java
 version required to run new releases. There was some talk about going
 directly for Java 1.5, too. The main reason: Maintaining support for
 Java 1.3 has become increasingly cumbersome which can become a problem
 in a mostly volunteer-based environment.
 
 Now, in order to minimize the number of people we upset with such a
 change, we would like to know what our users work with and what you
 think about this change. We've set up an online survey which we kindly
 ask you to fill out. It should not take much longer than 5 minutes.
 
 Please click here to start the survey:
 http://www.eSurveysPro.com/Survey.aspx?id=e3155c33-540e-471d-a23e-f6c1f73c8bd2
 (the survey ends on Sunday, October 14, 2007)
 
 Please note: Even if we change the minimum Java versions for new
 releases, the previous releases with Java 1.3 support will remain
 available for download.
 
 Thanks a lot!
 Jeremias Maerki
 (for the Apache XML Graphics devs)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[POLL] User poll on Java version requirements

2007-10-08 Thread Jeremias Maerki
Dear Apache XML Graphics Batik/FOP/Commons users,

as you probably know, all products of the Apache XML Graphics project are
still compatible with Java 1.3. We are currently discussing about
dropping support for Java 1.3 and instead make Java 1.4 the minimum Java
version required to run new releases. There was some talk about going
directly for Java 1.5, too. The main reason: Maintaining support for
Java 1.3 has become increasingly cumbersome which can become a problem
in a mostly volunteer-based environment.

Now, in order to minimize the number of people we upset with such a
change, we would like to know what our users work with and what you
think about this change. We've set up an online survey which we kindly
ask you to fill out. It should not take much longer than 5 minutes.

Please click here to start the survey:
http://www.eSurveysPro.com/Survey.aspx?id=e3155c33-540e-471d-a23e-f6c1f73c8bd2
(the survey ends on Sunday, October 14, 2007)

Please note: Even if we change the minimum Java versions for new
releases, the previous releases with Java 1.3 support will remain
available for download.

Thanks a lot!
Jeremias Maerki
(for the Apache XML Graphics devs)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Call for Papers Opens for OS Summit Asia 2007

2007-06-27 Thread Jeremias Maerki
Call for Papers Opens for OS Summit Asia 2007

The call for papers is now open for OS Summit Asia, to be held
November 26-30 at the Cyberport in Hong Kong.  This joint conference
between the Apache Software Foundation and the Eclipse Foundation will
be consist of two days of tutorials (Nov 26-27) and three days of
regular conference sessions (Nov 28-30).

The paper submission deadline is Friday, 13 July, 2007, Midnight PDT.

You may log in to the ApacheCon submission site to submit your
proposals.  Further details about the conference, submissions, and
fees can be found at:

  http://www.ossummit.com/cfp.html

Topics appropriate for submission include, but are not restricted to,
the following:

 * ASF-wide projects such as Apache HTTP server, Tomcat, Struts,
   Geronimo, mod_perl and XML Web Services
 
 * Eclipse-wide projects such as BI and Reporting Tools (BIRT), Web
   Tools Platform (WTP), Eclipse Modeling Framework (EMF), Data Tools
   Platform (DTP), Equinox and the Rich Client Platform (RCP)

 * Programming languages such as Java, Perl, Python, Ruby and PHP

 * Web development technologies and techniques including security,
   performance tuning, e-commerce and J2EE

 * New technologies and trends such as Web Services and Web 2.0

 * Open source community and business models, legal and marketing
   issues
 
 * Open source projects and activities in Asia, local efforts and case
   studies

Thanks and we hope to hear from you, and see you in Hong Kong!

-- 
The OSSummit Planners
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: pdf issues

2007-05-23 Thread Jeremias Maerki

On 14.05.2007 11:47:00 thomas.deweese wrote:
snip/
  2. I would like to have multiple pages transformed into a single pdf,
  but don't know, how.
 
The simplest way to do this would be to construct a FO document
 that references your SVG documents.  The simplest way to do that
 is to write the documents to disk as temp files that the FO document
 refs.
 
I think it would also be possible to do this in a variant of 
 the PDFTranscoder but I don't know the details.

Yes, the class PDFDocumentGraphics2D (which PDFTranscoder uses) has a
public method called nextPage(). So if the PDFTranscoder would be
modified to somehow call that method, it could be done. But I haven't
checked if that would fit into the Transcoder framework.


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Call for Papers Opens for ApacheCon US 2007

2007-04-18 Thread Jeremias Maerki
On behalf of the ApacheCon Planners...

Please note that the deadline is coming up fast.



Call for Papers Opens for ApacheCon US 2007

The Call for Papers is now open for ApacheCon US, to be held November  
12-16 at the Peachtree Westin, Atlanta. The conference will consist  
of two day of tutorials (November 12-13) and three days of regular  
conference sessions (November 14-16).

Please log in to the website at http://apachecon.com/html/login.html  
to submit your proposal. Further details about fees and are  
avaialable on the CFP form.

Topics appropriate for submission to this conference are manifold,  
and may include but are not restricted to:

* ASF projects
* ASF-Incubated projects
* Scripting languages and dynamic content such as Java, Perl, Python,  
Ruby, XSL, and PHP
* New technologies and broader initiatives such as Web Services and  
Web 2.0
* Security and e-commerce, performance tuning, load balancing, and  
high availability
* Business and community issues surrounding the ASF and Open Source

The paper submission deadline is Monday, 28 April 2007, Midnight GMT.

Thanks, and we hope to hear from you, and to see you in Atlanta.
--
The ApacheCon Planners
[EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: grayscale PDF from PDFTranscoder

2007-02-09 Thread Jeremias Maerki
No, there's currently no such feature.

On 08.02.2007 18:13:09 Patrick Egan wrote:
  Is there any way to force the PDFTranscoder to output a flattenedgrayscale 
 PDF ? 
 Somewhere I seem to have picked up the notion that the default outputfor the 
 PDFTranscoder is grayscale unless there are rgb images orcoloured text.
 The SVG doc has just black text and grayscale PNGs, ( some which 
 aretransparent ).
 Thanks,
 Patrick



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Distribution and Licensing

2007-01-22 Thread Jeremias Maerki
Disclaimer: IANAL The answer are provided without any guarantee of
accuracy.

On 22.01.2007 07:08:04 Praveen Nayak wrote:
 Hi,

   I want to use the Batik viewer as a part of my application, and the
   license file that shipped along with Batik managed to confuse me.

   There are a few gaps in my understanding of the license. It will be
   nice if anyone can fill them up for me.

   1. Should the Batik license be added at the place the JAR files
   (batik-all.jar etc) are placed or where the license of the
   application is placed?

That's more or less up to you. It should be in a place where people can
easily identify which license applies to which artifact.

The next Batik release will even contain the license in the META-INF of
each JAR. That will make it easier.

   2. Can the license file name be changed (from the current name -
   license) if it clashes with other file name?

Yes, of course. We do the same for third-party JARs in the lib directory.

   3. I have made a small modification to one of the files that is a
   part of Batik. Is the requirement only that I should update the
   source .java file comments to add info that I changed it, package
   it into a jar and ship that jar, or should I mention this change somewhere
   else as well.

If you ship a binary, the change is not visible, so it makes sense to
note that in either the NOTICE file or a separate README.

   4. The end of the license file has the line:
   Copyright [] [name of the copyright owner] and instructions to modify 
 it.

   Where must this be modified? In this same license file or somewhere else?

That only applies if you build your own ALv2 licensed project. At the
ASF, we use a slightly different license header now in our source files.
If you modify a source file from Batik, you can add the above line with
your own copyright (which then applies to the part you changed). But
that is not strictly mandatory.

However, if you modified Batik in a way that Batik would profit from it,
please consider sending a patch to improve it so you don't have to track
all changes in the future.

   I am sorry if my questions appear naive, but this is the first time
   I am using an open source project.

Don't worry. These are all no-nonsense questions.


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems converting to PDF

2007-01-12 Thread Jeremias Maerki
(Please ask questions on batik-users next time. Thank you!)

Such small deviations usually indicate that you've ticked the setting in
Acrobat's print dialog that scales the page.

See also: http://xmlgraphics.apache.org/fop/faq.html#pdf-print-contortion

On 12.01.2007 09:48:56 Fernando Miguez Alvarez - Cinntes wrote:
 Hello, I would like to know which relative units uses the Rasterizer
 package in order to convert svg to pdf. 
 
 Converting the svg to pdf I realize that the dimensions are reduced in a
 small percentage.
 
  
 
 For example, if I have the next code in a SVG file:
 
 ?xml version=1.0 encoding=utf-8?
 
 svg version=1.1 width=297mm height=210mm id=InformeCDA
 xmlns=http://www.w3.org/2000/svg;
 xmlns:xlink=http://www.w3.org/1999/xlink;
 
   rect width=60mm height=25mm x=75mm y=75mm stroke=black
 stroke-width=2 id=V1 /
 
 /svg
 
  
 
 When I convert the SVG to PDF and I print the PDF, the rectangle width
 is 58 mm and should be 60mm. 
 
 I need the measurement to be exact when the page is printed.
 
  
 
 Can anybody help me?
 
  
 
 Thanks.
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Call for Papers Opens for ApacheCon Europe 2007

2006-12-18 Thread Jeremias Maerki
Better late than too late If you have a good idea to talk about
(involving Batik and/or FOP), please don't hesitate to submit a proposal!

Possible ideas: Batik and GIS, FOP and DocBook, etc. etc. You don't need
to be a committer to submit a proposal.

--- Original Message ---

Call for Papers Opens for ApacheCon Europe 2007

The Call for Papers is now open for ApacheCon Europe, to be held May  
1-4  at the newly-opened Movenpick Hotel, Amsterdam. The conference  
will consist of one day of tutorials (May 1) and three days of  
regular conference sessions (May 2-4).

Proposals can be submitted at http://www.apachecon.com/ . Log in and  
follow the instructions.

Topics appropriate for submission to this conference are manifold,  
and may include but are not restricted to:

* ASF projects
* ASF-Incubated projects
* Scripting languages and dynamic content such as Java, Perl, Python,  
Ruby, XSL, and PHP
* New technologies and broader initiatives such as Web Services and  
Web 2.0
* Security and e-commerce, performance tuning, load balancing, and  
high availability
* Business and community issues surrounding the ASF and Open Source

The paper submission deadline is Friday, 12 January 2007, Midnight GMT.

Thanks, and we hope to hear from you, and to see you in Amsterdam

--
The ApacheCon Planners
http://www.apachecon.com/

- Original Message Ends 

See you in Amsterdam,
Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: eps transcoder headless exception

2006-09-27 Thread Jeremias Maerki

On 27.09.2006 12:02:19 ruben malchow wrote:
 
 
 hello,
 
 when using the epstranscoder in headless mode with a transparent svg 
 element, this exception is thrown:
 
 [...]
 2006.09.27 11:34:30 - TranscodeUtils.. - ERROR
 java.awt.HeadlessException (null)
 2006.09.27 11:34:30 - TranscodeUtils.. - ERROR
 java.awt.HeadlessException
 2006.09.27 11:34:30 - TranscodeUtils.. - ERRORat 
 sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:66)
 2006.09.27 11:34:30 - TranscodeUtils.. - ERRORat 
 org.apache.xmlgraphics.java2d.ps.PSGraphics2D.getDeviceConfiguration(PSGraphics2D.java:759)
 2006.09.27 11:34:30 - TranscodeUtils.. - ERRORat 
 org.apache.batik.ext.awt.image.GraphicsUtil.getDestination(GraphicsUtil.java:511)
 2006.09.27 11:34:30 - TranscodeUtils.. - ERRORat 
 org.apache.batik.ext.awt.image.GraphicsUtil.getDestinationColorModel(GraphicsUtil.java:525)
 [...]

This needs to be handled in one of the three ways outlined under:
http://xmlgraphics.apache.org/fop/latest/graphics.html#batik

Since you're using Java 1.4.2, using -Djava.awt.headless=true is
obviously the first choice.

 my code that's calling the epstranscoder is this:
 
 System.err.println(saving eps ... );
 try {
 EPSTranscoder t = new EPSTranscoder();
 TranscoderInput input = new TranscoderInput(doc);
 TranscoderOutput output = new TranscoderOutput(os);
 t.transcode(input, output);
 } catch (Exception e) {
 logger.error(e);
 }
 
 
 now, if i run this in normal mode (i.e., not headless), the error is 
 not thrown, but the transparencies and strokes are not drawn correctly, 
 either. the elements are always fully opaque, and the strokes are 
 cropped to the actual path of the element, with parts of the stroke 
 extending to the outside not being rendered.

That's to be expected. Those features are not implemented, yet. :-)

 i am including an exampleof this behaviour (not including the stroke 
 thing for now). these were rendered using jdk1.4.2 and the most recent 
 svn revision as of 20 minutes ago. is this something i should file a bug 
 report for?

It's not a bug, it's a missing feature. You could volunteer to help
improve this part. That would be way cool!

Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: another bug ... ?

2006-09-27 Thread Jeremias Maerki
There are limits to what the PDFTranscoder can handle using native
PDF commands today. If they cannot be handled in native commands, Batik
renders parts (sometimes all) of the image as a bitmap. Again, someone
would have to investigate where things can be improved. Resources are
scarce nowadays so volunteers are welcome to help out.

On 27.09.2006 12:36:07 ruben malchow wrote:
 
 hello list,
 
 another bug(?) in the fop part, i presume: when things such as
 non-standard (i.e. solid) strokes or transparent fills are rendered, it
 is rendered as a bitmap in the pdf - meaning it's no longer an vector
 image ... is this behaviour ... uh .. to be expected?
 
 i am attaching another example.
 
 (the example zip was too large, so here's the url:)
 
 http://disco.alternetive.org/pdftranscoder_transparency.zip



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: building the whole thing ...

2006-09-27 Thread Jeremias Maerki
I have a project in Eclipse per subproject, with the dependencies as
needed (Batik depends on FOP, FOP depends on Commons). I simply add the
src/resources directory to the source directories in Eclipse and all the
META-INF stuff works. With this setup I can change all the things I want
and when I'm done I rebuild Commons and put the JAR in FOP's lib
directory. Then I can build FOP using the Ant build and finally I can
move the transcoder JAR over to Batik. Building FOP in Eclipse, it is
important to run ant codegen to generated some additional source files
(see build/gensrc).

See also (maybe a little outdated):
http://wiki.apache.org/xmlgraphics-fop/FOPIDESetupGuide

HTH

On 27.09.2006 19:39:11 ruben malchow wrote:
 
 hello list,
 
 so ... i am looking into trying to find out what i can do about the 
 epstranscoder thing myself, pressing f4 all day. now after looking 
 around a bit, i want to start fiddling around with it. i got the three 
 svn trees
 
batik
fop
xmlgraphics-common
 
 what's your setup for this? i mean, building it using the build.xml in 
 the trees works fine, but if i'm changing single files, i don't want to 
 rebuild the whole thing, on the other hand, if i build it all to a 
 single directory as .class files, things like the ImageWriterRegistry 
 don't get initialized properly. i guess it needs to be packaged in a jar 
 file with a proper META-INF directory ...
 
 how do you guys do this, preferably in eclipse?



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: eps export problem

2006-09-15 Thread Jeremias Maerki
I'm going to look into PostScript stuff anyway during the next days, so
I'll take a look at that.

On 14.09.2006 21:08:11 ruben malchow wrote:
 
 hello list,
 
 i am having a bit of a problem with the EPSExporter. first the code:
 
public static void saveEPS(SVGDocument doc, OutputStream os) {
  System.err.println(saving eps ... );
  try {
EPSTranscoder t = new EPSTranscoder();
TranscoderInput input = new TranscoderInput(doc);
TranscoderOutput output = new TranscoderOutput(os);
t.transcode(input, output);
  } catch (Exception e) {
e.printStackTrace();
  }
}
 
 
 now, i use PDFTranscoder the same way. and, well, see for yourself.
 
 there is quite a difference between what inkscape and pdftranscoder 
 think and what the epstranscoder thinks.
 
 all freshly checked out 10 minutes ago, and it's the same. a bug? 
 something i should be discussing with the fop people?
 
 .rm
 
 
 
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Adobe reader version and printing batik rasterizer converted pdf ?

2006-06-08 Thread Jeremias Maerki
Sorry, I didn't catch that detail. In that case you should take a look
at your printer drivers and possibly replace them, if only to see if it
changes anything. Experimenting with the driver settings may also help.

On 08.06.2006 09:37:25 benamou wrote:
 It does render perfectly.
 The problem is when printing to a printer. Some elements are missing (and it 
 seems to occur quite randomly) !
 
 - Original Message - 
 From: Jeremias Maerki [EMAIL PROTECTED]
 To: batik-users@xmlgraphics.apache.org
 Sent: Thursday, June 08, 2006 9:31 AM
 Subject: Re: Adobe reader version and printing batik rasterizer converted 
 pdf ?
 
 
  The PDF version generated is 1.4 so Acrobat Reader 5 and later should be
  able to read it and display it correctly. In theory anyway.
 
  On 08.06.2006 09:22:18 benamou wrote:
  Hi,
  I use batik rasterizer to convert rather complex SVG layouts to PDF.
 
  The PDF renders OK in ADOBE reader but on some versions (before 7.03)
  printing
  results in incomplete layout (some elements are missing).
  Has anyone encountered something like this ... my first reaction
  was to blame Adobe reader  ...


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Batik site and logo

2006-05-09 Thread Jeremias Maerki
I prefer the second one although the art of Batik is something very
colorful, normally. I love the way that the second logo hints at the
actual Batik art but if it could be made more colorful, maybe while
maintaining the ASF feather's original colors, that would make it real
cool. Too bad I'm not much of an artist.

On 09.05.2006 02:50:04 Cameron McCormack wrote:
 Cameron McCormack:
  More importantly, however, is that I think it's time for a new logo!
 
 AndyFitz has knocked up a couple of basic designs for a logo.  The
 first, the word BATIK with a feather as the I:
 
   http://mcc.id.au/temp/2006/logo1.svg
 
 I tried also using the purple/red/yellow Apache feather, but it doesn't
 look as clean.
 
 And a second one, a patch that is meant to look like some (stylised)
 Batik with a feather, and the word BATIK below it:
 
   http://mcc.id.au/temp/2006/logo2.svg
 
 Personally I prefer the latter design, Andy prefers the first.  Any
 opinions?  These aren't finished logos, just designs; they can be
 tweaked to get them looking nicer, later.


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PRINT PERFORMANCE: from url or from memory ?

2006-05-09 Thread Jeremias Maerki
Are you saying that you generate SVG from Java2D graphics only so you
can print the SVG afterwards? If yes, you're making a big unnecessary
detour. Java's printing environment is built exactly to process Java2D
graphics directly. You can print what you paint against a Graphics2D
instance directly to a printer. I'm confused.

On 09.05.2006 14:47:49 JavaTeam wrote:
 
 
 thomas.deweese wrote:
  
  Hi Mario,
  
  JavaTeam [EMAIL PROTECTED] wrote on 05/09/2006 06:42:54 AM:
  
  I have never been so frustrated as now when I have so problems with 
  printing
  in java. First I must to say that I choose SVG and batik when I red
  somewhere that printing java 2D graphics is solved with the batik 
  packages.
  
 I've already said that I'm not sure why anyone would come to this 
  conclusion...
  
  Could you please read this mail:
  http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-users/200303.mbox/[EMAIL
   PROTECTED]
  
  and 
  
  about postscript with which I draw a parallel:
  
  http://mindprod.com/jgloss/printing.html
  
  
  
  
  So I was wondering if someone have an experiience with the  printing 
  from a
  Document file, which is not saved on a disk. I need a code example, 
  because
  google don't give a lot about the batik.
  
 The TranscoderInput object that you pass to the PrintTranscoder can 
  accept
  a Document, and the SVGGraphics2D has a method 'getRoot' which will give 
  you
  the root element of an SVGDocument (you will need to append it to the 
  SVGDocument,
  with 'appendChild', you gave to the SVGGraphics2D in the first place) so 
  you can 
  easily avoid streaming the document to disk.
  
  I ask that because I draw parallel again with the postscript: look at:
  
  http://mindprod.com/jgloss/printing.html
  
  
  So what are you suggest for printing java 2D Graphics, if not SVG ?


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Batik site and logo

2006-04-27 Thread Jeremias Maerki
Please note that it is probably less work to migrate to Forrest than you
think. Forrest can, AFAIK, read and process the source XML files used by
stylebook. Clay Leeds or I could help you set up the basics for Forrest.
Still, updating the actual content will take some work from the Batik
community. :-)

On 27.04.2006 14:18:24 Cameron McCormack wrote:
 I think that, despite Francis' blunt assertions on svg-dev, the Batik
 site does need a bit of an overhaul.  Several pages of it have out of
 date information, some is missing (the supported elements/attributes
 page), and it's looking a bit tired.  I don't know if I'd want to go to
 the trouble of moving to a whole Forrest setup, but I wouldn't mind
 having a shot at a different skin to use with the current site build.
 
 More importantly, however, is that I think it's time for a new logo!
 FOP's current logo is quite beautiful, and it'd be great to have
 something as nice as that to go along with a new site design.
 Unfortunately I'm hardly artistic, though sometimes I can knock up
 OK-ish looking things in SVG.
 
 I found a mail from six years ago in the archive[1] from Thomas about
 ideas for a new logo.  Did this go anywhere?
 
 [1] 
 http://mail-archives.apache.org/mod_mbox/xmlgraphics-batik-dev/200011.mbox/[EMAIL
  PROTECTED]


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem with stroke-dasharray while converting svg to pdf with batik-rasterizer

2006-04-18 Thread Jeremias Maerki
I don't think so. It's probably a little more complicated:
We haven't migrated the PDF and PS transcoders that were developed in
FOP over to Batik, yet. If you want theses changes you'll have to get
the sources for FOP Trunk from Subversion. You can skip XML Graphics
Commons for now because you're probably not interested in the fix for
PS/EPS output, only PDF. You'll need to build FOP from the sources and
take fop-transcoder-allinone.jar and use that JAR file instead of the
pdf-transcoder.jar in Batik's lib directory.

On 18.04.2006 14:43:45 benamou wrote:
 OK thanks
 does that means that it should work in batik nightly builds ?
 JD
 
 - Original Message - 
 From: Jeremias Maerki [EMAIL PROTECTED]
 To: batik-users@xmlgraphics.apache.org
 Sent: Tuesday, April 18, 2006 2:39 PM
 Subject: Re: problem with stroke-dasharray while converting svg to pdf with 
 batik-rasterizer
 
 
  Thanks for reporting this. I've fixed it in both PDFGraphics2D (FOP
  Trunk) and PSGraphics2D (XML Graphics Commons Trunk). The latter had a
  similar but somewhat different bug.
 
  Changes in SVN:
  http://svn.apache.org/viewcvs?rev=394928view=rev
  http://svn.apache.org/viewcvs?rev=394927view=rev
 
  On 18.04.2006 10:08:36 benamou wrote:
  Sorry here is a test case :
 
  svg xmlns=http://www.w3.org/2000/svg; version=1.1 width=210mm 
  height=297mm viewBox=0 0 210 297rect x=20 y=20 width=10 
  height=10 fill=none stroke=black stroke-width=0.25 
  stroke-dasharray=0.25//svg
 
  the svg has the correct number of dashes
 
  the pdf obtained with
 
  java -jar batik-rasterizer -d test.pdf -m application/pdf test.svg
 
  shows only 5 per side.
- Original Message - 
From: benamou
To: batik-users@xmlgraphics.apache.org
Sent: Tuesday, April 18, 2006 9:57 AM
Subject: problem with stroke-dasharray while converting svg to pdf with 
  batik-rasterizer
 
 
 
Hi,
 
it seems any decimal value of
stroke-dasharray
 
default to 1 when converting svg to pdf.
 
I am using JRE1.5 on windows XP and Server 2003
 
Thanks
 
JD
 
 
 
  Jeremias Maerki
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem with stroke-dasharray while converting svg to pdf with batik-rasterizer

2006-04-18 Thread Jeremias Maerki
I'd have to push it in. Right now it's only in trunk. The branch for
0.92 is already made. The fix for PS/EPS cannot go into 0.92 anymore
since Commons 1.0 is already released.

On 18.04.2006 15:05:40 thomas.deweese wrote:
 Hi Jeremias,
 
Will this fix be in your 0.92 release?
 
If so I was planning on importing the updated pdf-transcoder.jar once 
 the
 release was made...
 
 Jeremias Maerki [EMAIL PROTECTED] wrote on 04/18/2006 08:50:23 AM:
 
  I don't think so. It's probably a little more complicated:
  We haven't migrated the PDF and PS transcoders that were developed in
  FOP over to Batik, yet. If you want theses changes you'll have to get
  the sources for FOP Trunk from Subversion. You can skip XML Graphics
  Commons for now because you're probably not interested in the fix for
  PS/EPS output, only PDF. You'll need to build FOP from the sources and
  take fop-transcoder-allinone.jar and use that JAR file instead of the
  pdf-transcoder.jar in Batik's lib directory.
  
  On 18.04.2006 14:43:45 benamou wrote:
   OK thanks
   does that means that it should work in batik nightly builds ?
   JD
   
   - Original Message - 
   From: Jeremias Maerki [EMAIL PROTECTED]
   To: batik-users@xmlgraphics.apache.org
   Sent: Tuesday, April 18, 2006 2:39 PM
   Subject: Re: problem with stroke-dasharray while converting svg to pdf 
 with 
   batik-rasterizer
   
   
Thanks for reporting this. I've fixed it in both PDFGraphics2D (FOP
Trunk) and PSGraphics2D (XML Graphics Commons Trunk). The latter had 
 a
similar but somewhat different bug.
   
Changes in SVN:
http://svn.apache.org/viewcvs?rev=394928view=rev
http://svn.apache.org/viewcvs?rev=394927view=rev
   
On 18.04.2006 10:08:36 benamou wrote:
Sorry here is a test case :
   
svg xmlns=http://www.w3.org/2000/svg; version=1.1 width=210mm 
 
height=297mm viewBox=0 0 210 297rect x=20 y=20 width=10 
 
height=10 fill=none stroke=black stroke-width=0.25 
stroke-dasharray=0.25//svg
   
the svg has the correct number of dashes
   
the pdf obtained with
   
java -jar batik-rasterizer -d test.pdf -m application/pdf test.svg
   
shows only 5 per side.
  - Original Message - 
  From: benamou
  To: batik-users@xmlgraphics.apache.org
  Sent: Tuesday, April 18, 2006 9:57 AM
  Subject: problem with stroke-dasharray while converting svg to 
 pdf with 
batik-rasterizer
   
   
   
  Hi,
   
  it seems any decimal value of
  stroke-dasharray
   
  default to 1 when converting svg to pdf.
   
  I am using JRE1.5 on windows XP and Server 2003
   
  Thanks
   
  JD


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem with stroke-dasharray while converting svg to pdf with batik-rasterizer

2006-04-18 Thread Jeremias Maerki
Three to four months for FOP at the moment.

On 18.04.2006 15:26:23 Jean-David Benamou wrote:
 Can you give me a rough idea of the frequency of
 such upgrades ?
 
 Thanks
 JD
 
 
 
 Jeremias Maerki wrote:
 
 I'd have to push it in. Right now it's only in trunk. The branch for
 0.92 is already made. The fix for PS/EPS cannot go into 0.92 anymore
 since Commons 1.0 is already released.


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



ApacheCon EU 2006

2006-02-17 Thread Jeremias Maerki
I've just seen the news that the ApacheCon EU 2006 will be held in
Dublin, Ireland, June 26-30.

A few minutes ago, I sent a note out to the FOP users mailing list
asking for good topics/ideas on a session on Apache FOP. Maybe we can do
the same here, although there are probably better candidates than me to
talk about Batik. But it can't hurt to know what Batik users would like
to hear at a session on Apache Batik. Maybe one of the Batik committers
or even one of the Batik power users will stand up and write down a
session proposal for the upcoming call for papers.

I think it would be good if Batik and FOP (or even the XML Graphics
project as a union) were properly represented at ApacheCon. Any ideas
are welcome.

Jeremias Maerki
(wearing his XML Graphics PMC chair hat)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug ( I think)

2006-02-09 Thread Jeremias Maerki

On 09.02.2006 11:31:56 Paul Carr wrote:
 Thanks guys,
  I took a look at the source for PrintTranscoder,
 and as far as I can see it doesn't query the print drivers for imageable
 area. If you could point out the bit that does this Jeremias I'd be very
 grateful.

I don't understand. As far as I can see below, you managed to find the
lines where the imageable area is accessed by the PrintTranscoder. I
meant the calls to pageFormat. Querying the printer driver for the
imageable area is done somewhere deep in the JDK. I guess I was not
precise enough.

  I'm not using the print() method on PrintTranscoder, I've defined my
 own , the only method that gets called on PrintTranscoder when printing
 is the print(Graphics,PageFormat,int) method and this is where I'm
 getting confused. In my main class I create a PrintTranscoder 
 PrinterJob, get the pageFormat from the printerJob, set the paper to be
 a full A4 sheet, and set the imageable area to the full size of the
 page.
  
 PrinterJob printerJob = PrinterJob.getPrinterJob();
 PageFormat pageFormat = printerJob.defaultPage();
 Paper pp=pageFormat.getPaper();
 pp.setSize(8.25*72,11.69*72);
 pp.setImageableArea(0,0,8.25*72,11.69*72);
 pageFormat.setPaper(pp);
 PrintTranscoder prm = new PrintTranscoder();
 TranscoderInput ti = new
 TranscoderInput(svgCanvas.getSVGDocument());
 prm.transcode(ti, null);
  
 I then call setPrintable on the PrinterJob with the new pageFormat (
 the one that should start at 0,0) and call print()
  
 printerJob.setPrintable(prm,pageFormat);
 try
 {
  printerJob.print(); 
 }
  
 I stuck a breakpoint at the start of the above method, and the start of
 the printTranscoders print(graphics,pageFormat,index) method, and
 stepped through the code. I stopped on the printerJob.print() line above
 and looked at the pageFormat..imageableArea = (0,0,594,841). I then
 stepped over it and the debugger stopped at the breakpoint at the start
 of the printTranscoders print(g,pf,i) method..looked at the
 pageFormat passed in there..imageableArea =
 (12,12,571,817).different pageFormat !!!
 ??

In that case, I'd start setting breakpoints in java.awt.print (ex:
Paper.setImageableArea()) and investigate the stack traces. No further
ideas at this time, I'm afraid.

 I've never seen this behaviour beforewhenever I've called
 printerJob.setPrintable(printable,PAGEFORMAT), that is the pageFormat
 that gets passed to the printables print(g,pf,i) method.
  
 I managed to get it printing as desired by changing PrintTranscoder to
 do 
  
 g.translate(0,0);
  
 instead of using the pageFormat :-
  
 //g.translate(pageFormat.getImageableX(),
 //pageFormat.getImageableY());
  
 but I'd obviously rather not have to do that ..  anyone got a good
 understanding of PrinterJobs / Printables who can tell me why the heck
 my pageFormat is changing en route  If it is querying the printer
 drivers for an imageable area, that might explain things, but I can't
 see where it's doing that, and how that gets called when you do
 PrinterJob.print()
  
 I need to get this sorted while there are still trees left on this
 planet (My wastepaper bin is getting very heavy ;-)

Well, in Switzerland forests are getting larger. That's probably because
I use a PDF printer driver and GhostScript for these kinds of tests. :-)

snip/


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Trying to transcode SVG to EPS

2006-02-02 Thread Jeremias Maerki
Having Batik 1.6, pdf-transcoder.jar and FOP 0.20.5 together in the same
classpath begs for trouble. On the other side, I would have expected a
different error message if there was really something going wrong with
these very incompatible packages.

Do other transcoders work? Run the whole thing again without FOP in the
classpath. Consider upgrading to the latest FOP release. If nothing
helps, please post the full stack trace.

On a side-note: Finally someone who uses the EPSTranscoder. *g*

On 02.02.2006 19:30:00 Martin Morawetz wrote:
 Hello,
 
 Trying to transcode an SVG to an EPS file using
 following code:
 
 public boolean transform(CharArrayWriter charArrayWriter , Writer writer)
   {
   EPSTranscoder trans = new EPSTranscoder();
   TranscoderInput input = new
   TranscoderInput(charArrayWriter.toString());
   TranscoderOutput output = new TranscoderOutput(writer);
   try
   {
   trans.transcode(input, output);
   writer.flush();
   }
   catch(TranscoderException e)
   {
   return false;
   }
   catch(IOException e)
   {
   return false;
   }
 
   return true;
   }
 
 produces following exception:
 
 [class org.apache.batik.transcoder.TranscoderException]: null
 Enclosed Exception:
 Unable to make sense of URL for connection
at 
 org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:126)
at 
 com.company.svggenerator.transform.EpsTransformer.transform(EpsTransformer.java:267)
:
:
 
 I use batik 1.6 and a current pdf-transcoder.jar from the batik 1.6 zipfile.
 I also have fop 0.20.5 in the classpath.
 
 
 Any ideas?



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Trying to transcode SVG to EPS

2006-02-02 Thread Jeremias Maerki
D'oh! Looks like we forgot to update a file. If you scroll down just a
little you'll see FOP 0.91 beta from 23 Dec 2005.

See also: http://xmlgraphics.apache.org/fop/relnotes.html

On 02.02.2006 21:41:05 Tracey Zellmann wrote:
 What do you believe is the latest release of FOP?
 
 per http://mirrors.combose.com/apache/xmlgraphics/fop/
 
  The latest release distribution of FOP is version 0.20.5.
 
 - Original Message - 
 From: Jeremias Maerki [EMAIL PROTECTED]
 To: batik-users@xmlgraphics.apache.org
 Sent: Thursday, February 02, 2006 2:08 PM
 Subject: Re: Trying to transcode SVG to EPS
 
 
  Having Batik 1.6, pdf-transcoder.jar and FOP 0.20.5 together in the same
  classpath begs for trouble. On the other side, I would have expected a
  different error message if there was really something going wrong with
  these very incompatible packages.
 
  Do other transcoders work? Run the whole thing again without FOP in the
  classpath. Consider upgrading to the latest FOP release. If nothing
  helps, please post the full stack trace.
 
  On a side-note: Finally someone who uses the EPSTranscoder. *g*
 
  On 02.02.2006 19:30:00 Martin Morawetz wrote:
  Hello,
 
  Trying to transcode an SVG to an EPS file using
  following code:
 
  public boolean transform(CharArrayWriter charArrayWriter , Writer writer)
  {
  EPSTranscoder trans = new EPSTranscoder();
  TranscoderInput input = new
  TranscoderInput(charArrayWriter.toString());
  TranscoderOutput output = new TranscoderOutput(writer);
  try
  {
  trans.transcode(input, output);
  writer.flush();
  }
  catch(TranscoderException e)
  {
  return false;
  }
  catch(IOException e)
  {
  return false;
  }
 
  return true;
  }
 
  produces following exception:
 
  [class org.apache.batik.transcoder.TranscoderException]: null
  Enclosed Exception:
  Unable to make sense of URL for connection
 at
  org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:126)
 at
  com.company.svggenerator.transform.EpsTransformer.transform(EpsTransformer.java:267)
 :
 :
 
  I use batik 1.6 and a current pdf-transcoder.jar from the batik 1.6 
  zipfile.
  I also have fop 0.20.5 in the classpath.
 
 
  Any ideas?
 
 
 
  Jeremias Maerki



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   >