RE: svgz to jpeg ?

2003-06-29 Thread Conal Tuohy
I think you'll have to write your own GZipGenerator or possibly a
GZipSource?

You are right that the gzipped svg document is not a ZIP archive (it doesn't
include a table of contents or anything - it's just a single BLOB). On the
bright side, gzip is trivial to use in Java, so writing your own shouldn't
be hard.

CHeers

Con

> -Original Message-
> From: rob [mailto:[EMAIL PROTECTED]
> Sent: Monday, 30 June 2003 09:35
> To: [EMAIL PROTECTED]
> Subject: Re: svgz to jpeg ?
>
>
> On 28 Jun 2003 at 14:51, Upayavira wrote:
>
> >Ah. So your file on disc is compressed svg. Okay, so you
> need to uncompress
> it into
> >XML and pass that into the SVG2JPG serializer. There's two
> ways to do that,
> either
> >with a zip generator (I think there's an example of one in
> the Langham &
> Ziegler
> >Cocoon book), or using the Jar protocol (see
> >http://wiki.cocoondev.org/Wiki.jsp?page=JarProtocolExample).
> >
> >Both should extract your zipped SVG ready for converting to JPG.
>
> Thanks again for you reply.
>
> I've tried using the jar protocol, but it does not accept the
> 'svgz' file as
> a
> valid zip archive. I guess this is because there is no
> physical file to
> extract
> i.e jar:http//localhost/xyz.svg!???
>
> Even Winzip will not open it.
>
> I haven't tried the zip generator yet because I haven't found any
> documentation,
> and someone has borrowed my Cocoon book !!
>
> Regards,
>
> Rob.
>
>
> -
> 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]



Re: svgz to jpeg ?

2003-06-29 Thread rob
On 28 Jun 2003 at 14:51, Upayavira wrote:

>Ah. So your file on disc is compressed svg. Okay, so you need to uncompress
it into
>XML and pass that into the SVG2JPG serializer. There's two ways to do that,
either
>with a zip generator (I think there's an example of one in the Langham &
Ziegler
>Cocoon book), or using the Jar protocol (see
>http://wiki.cocoondev.org/Wiki.jsp?page=JarProtocolExample).
>
>Both should extract your zipped SVG ready for converting to JPG.

Thanks again for you reply.

I've tried using the jar protocol, but it does not accept the 'svgz' file as
a
valid zip archive. I guess this is because there is no physical file to
extract
i.e jar:http//localhost/xyz.svg!???

Even Winzip will not open it.

I haven't tried the zip generator yet because I haven't found any
documentation,
and someone has borrowed my Cocoon book !!

Regards,

Rob.


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



Re: svgz to jpeg ?

2003-06-28 Thread Upayavira
On 28 Jun 2003 at 8:39, rob wrote:

> Thanks for you reply,
> 
> but how do I generate the source ?
> 
> The file generator only seems to accept uncompressed
> svg. When I use a compressed svg as the source I get the
> following error message :

Ah. So your file on disc is compressed svg. Okay, so you need to uncompress it into 
XML and pass that into the SVG2JPG serializer. There's two ways to do that, either 
with a zip generator (I think there's an example of one in the Langham & Ziegler 
Cocoon book), or using the Jar protocol (see 
http://wiki.cocoondev.org/Wiki.jsp?page=JarProtocolExample).

Both should extract your zipped SVG ready for converting to JPG.

Hope that helps.

Regards, Upayavira


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



Re: svgz to jpeg ?

2003-06-28 Thread rob



Thanks for you reply,
 
but how do I generate the source ?
 
The file generator only seems to accept 
uncompressed
svg. When I use a compressed svg as the source I 
get the
following error message :
 
Original Exception: org.xml.sax.SAXParseException: 
Content is not allowed in prolog.	at 
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown 
Source)	at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown 
Source)	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown 
Source)	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown 
Source)	at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown 
Source)	at 
org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown 
Source)	at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)	at 
org.apache.xerces.impl.XMLVersionDetector.scanDocument(Unknown 
Source)	at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown 
Source)	at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown 
Source)	at org.apache.xerces.parsers.XMLParser.parse(Unknown 
Source)	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
Source)	at 
org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:318)	at 
org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:337)	at 
org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:198)	at 
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:140)	at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:277)	at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:489)	at 
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:150)	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)	at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)	at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)	at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:162)	at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:325)	at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)	at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133)	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)	at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)	at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)	at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:162)	at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:325)	at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)	at 
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133)	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)	at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)	at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)	at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:162)	at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:325)	at 
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:307)	at 
org.apache.cocoon.Cocoon.process(Cocoon.java:628)	at 
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1139)	at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)	at 
org.apache.catalina.core.Applic

Re: svgz to jpeg ?

2003-06-27 Thread Upayavira
Just use the svg2jpg serializer. That's it.

Regards, Upayavira

On 27 Jun 2003 at 22:26, rob wrote:

> Hi,
> 
> does anyone know if it is possible to serialize a
> compressed svg file (svgz) to jpeg ?
> 
> Thanks,
> 
> Rob Gregory.
> 



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



SVGZ to JPEG

2003-06-27 Thread rob



Hi,
 
does anyone know if it is possible to serialize 
a
compressed svg file (svgz) to jpeg ?
 
Thanks,
 
Rob Gregory.


svgz to jpeg ?

2003-06-27 Thread rob




Hi,
 
does anyone know if it is possible to serialize 
a
compressed svg file (svgz) to jpeg ?
 
Thanks,
 
Rob 
Gregory.