Return-Path: Delivered-To: apmail-xmlgraphics-batik-users-archive@www.apache.org Received: (qmail 15620 invoked from network); 11 Apr 2006 10:13:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Apr 2006 10:13:11 -0000 Received: (qmail 2968 invoked by uid 500); 11 Apr 2006 10:13:03 -0000 Delivered-To: apmail-xmlgraphics-batik-users-archive@xmlgraphics.apache.org Received: (qmail 2949 invoked by uid 500); 11 Apr 2006 10:13:03 -0000 Mailing-List: contact batik-users-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: batik-users@xmlgraphics.apache.org Delivered-To: mailing list batik-users@xmlgraphics.apache.org Received: (qmail 2938 invoked by uid 99); 11 Apr 2006 10:13:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Apr 2006 03:13:03 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [85.13.251.140] (HELO colo13.ukhost4u.com) (85.13.251.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Apr 2006 03:13:02 -0700 Received: from 200048.gotadsl.co.uk ([84.12.137.153] helo=dbrowne) by colo13.ukhost4u.com with esmtpa (Exim 4.52) id 1FTFrN-0008JE-8d for batik-users@xmlgraphics.apache.org; Tue, 11 Apr 2006 11:12:33 +0100 From: "Dylan Browne" To: Subject: CSS ignored when exporting to JPG Date: Tue, 11 Apr 2006 11:12:35 +0100 Message-ID: <003501c65d50$74d04190$160aa8c0@dbrowne> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Thread-Index: AcZcwNJlyUH88ndvQ/SnvdYdkepTYQAjodIQ In-Reply-To: X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - colo13.ukhost4u.com X-AntiAbuse: Original Domain - xmlgraphics.apache.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - mango-solutions.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, I have a problem when attempting to rasterize an SVG document created using the Batik DOM classes. It looks like the rasterize process is not picking up the stylesheet I am importing. I include my stylesheet like this (this works fine in so far as rendering SVG in the browser goes): ProcessingInstruction pi = null; // import the stylesheet pi = doc.createProcessingInstruction("xml-stylesheet", Config.CSS); doc.insertBefore(pi, doc.getDocumentElement()); When I am creating my JPG, I use the following code. This does generate the jpg, but any elements which are styled are not picked up so I end up with a largely black image with a few shapes visible: public void streamSVGIntoImageFormat(SVGDocument doc) { try { // create a JPEG transcoder JPEGTranscoder t = new JPEGTranscoder(); // set the transcoding hints t.addTranscodingHint(JPEGTranscoder.KEY_QUALITY, new Float(.8)); // create the transcoder input TranscoderInput input = new TranscoderInput(doc); // create the transcoder output OutputStream ostream = new FileOutputStream("c:\\out.jpg"); TranscoderOutput output = new TranscoderOutput(ostream); // save the image t.transcode(input, output); // flush and close the stream then exit ostream.flush(); ostream.close(); } catch (Exception e) { e.printStackTrace(); } } Does this look like an issue with how I import my stylesheet, or an issue with how I am calling the Transcoder code? Thanks in advance for any help, Kind regards, Dylan --------------------------------------------------------------------- To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org