Hi Minimoi, <[EMAIL PROTECTED]> wrote on 09/19/2008 09:13:51 AM:
> I figured out a few day ago how I can generate PDF files from my SVG > Doc and I thought it was OK. > > I use a SVG Canvas in my application and some Elements of my svgDoc > have a special cursor on mouseOver. [...] > This seems to work as when my mouse is over an element in the > canvas, its cursor becomes a hand. > > I also need to export my svg as a pdf. Here is what I do : > > PDFTranscoder transcoder = new PDFTranscoder(); > TranscoderInput input = new TranscoderInput(doc); > When my export is done, the output file is a great pdf in a A3 > format, as I need. > > But when I try to mouve over an element in the SVG Canvas, the > cursor doesn't change anymore. > When removing the trancsode line, I keep this effect. I was > wondering if the transcoder.transcode(input, output) call wasq modifying > my input document ? A document can only be associated with one renderer at a time. So when you generate the PDF it breaks the links with the canvas. I would suggest that you either clone the document before generating the PDF, or that you reset the document on the canvas after the PDF is created. I think the clone is better.
