Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

svg-developers · SVG Developers

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 8775
  • Category: Data Formats
  • Founded: Aug 16, 1999
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 37387 - 37417 of 66117   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#37387 From: "Gergely Hajdu" <ghajdu@...>
Date: Mon Dec 1, 2003 8:46 am
Subject: RE: Find Item in XML
hajdu72
Send Email Send Email
 
Hi,

I would suggest you to use Digester :

http://www.javaworld.com/javaworld/jw-10-2002/jw-1025-opensourceprofile.html

This is a very good introduction. By reading this, I could use it quite
quickly.

Regards
/Gergely
   -----Original Message-----
   From: bobhunter7 [mailto:bhunter@...]
   Sent: Saturday, November 29, 2003 4:41 AM
   To: svg-developers@yahoogroups.com
   Subject: [svg-developers] Find Item in XML


   I have an application that loads an xml document and displays the
   text from the xml document in the svg document.  But, I think I'm
   using an innefficient method for locating the desired record in the
   xml document.

   The xml document looks likes this:
   <InfoList>
         <obj id="0">
               <info>Info to display</info>
         </obj>

         <obj id="1">
               <info>More info here</info>
         </obj>

         <obj id="2">
               <info>Still more</info>
         </obj>
   </InfoList>

   In reality, there may be hundreds of entries in the document.

   So, if I need to find the one passed to the function as n, here's
   what I do:

   xmlDoc.load(xmlFile)   // Loads the xml document
   all = xmlDoc.getElementsByTagName("info"); //get all info elements
   pick = all.item(n);  //pick's the nth one in the list
   pick.text is the text from the element that I put in the display.

   This works, but only because I've ordered the elements by number (id
   = '3') and pick the nth one in the list.  What I'd prefer to do is
   to use more meaningful ids and do

        xmlDoc.getElementById(meaningfulID)

   But, this is apprently not acceptable to the ASV 3 (returns an error
   that this function doesn't exist).

   So, I got clever and did a xpath-like query:

        pick = xmlDoc.selectNodes("//obj[@id=meaningfulID]/info")

   This returns results, but I'm not able get the text out of it.  I've
   tried pick.text, pick.firstChild.text, pick.nodeValue, etc.

   Surely there is an easy javascript way to do the equivalent of
   getElementById in an xml file!

   Anyone have an idea?

   Thanks,

   Bob



         Yahoo! Groups Sponsor
               ADVERTISEMENT




   -----
   To unsubscribe send a message to:
svg-developers-unsubscribe@yahoogroups.com
   -or-
   visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
   ----

   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


[Non-text portions of this message have been removed]

#37388 From: "brsbrs2" <brs@...>
Date: Mon Dec 1, 2003 8:49 am
Subject: SVG in PDF - Print
brsbrs2
Send Email Send Email
 
Displaying SVG in the PDF Viewer works fine, but print seems not to
work. Has anyone succeeded to print SVG using the PDF Viewer.

Yours,
Brian Sørensen

#37389 From: "Chris Peto" <CPeto@...>
Date: Mon Dec 1, 2003 8:51 am
Subject: RE: Find Item in XML
ressol2002
Send Email Send Email
 
Hi,

Is this xml doc and svg doc?  If so,  then you need to get the
getSVGDocument() and then use svgDoc.getElementById(meaningfulID)
.

Mit freundlichen Gru?en/Regards
Chris Peto
Freelance System Development
------------------------------------
Resource Solutions
Germany
Mobile: +49 (0) 173 308 7843
Tel:+49(0) 6103 80 21 98
Web: http://www.resource-solutions.de
SVG editor: http://www.resource-solutions.de/svgeditor.html
mailto:CPeto@...
------------------------------------
Member of: SPARK - SVG Programmers' Application Resource Kit
SVG site:  http://www.schemasoft.org/svg/main.svg
HTML site: http://www.schemasoft.org/





   -----Original Message-----
   From: Gergely Hajdu [mailto:ghajdu@...]
   Sent: Montag, 1. Dezember 2003 09:46
   To: svg-developers@yahoogroups.com
   Subject: RE: [svg-developers] Find Item in XML


   Hi,

   I would suggest you to use Digester :


http://www.javaworld.com/javaworld/jw-10-2002/jw-1025-opensourceprofile.html

   This is a very good introduction. By reading this, I could use it quite
   quickly.

   Regards
   /Gergely
     -----Original Message-----
     From: bobhunter7 [mailto:bhunter@...]
     Sent: Saturday, November 29, 2003 4:41 AM
     To: svg-developers@yahoogroups.com
     Subject: [svg-developers] Find Item in XML


     I have an application that loads an xml document and displays the
     text from the xml document in the svg document.  But, I think I'm
     using an innefficient method for locating the desired record in the
     xml document.

     The xml document looks likes this:
     <InfoList>
           <obj id="0">
                 <info>Info to display</info>
           </obj>

           <obj id="1">
                 <info>More info here</info>
           </obj>

           <obj id="2">
                 <info>Still more</info>
           </obj>
     </InfoList>

     In reality, there may be hundreds of entries in the document.

     So, if I need to find the one passed to the function as n, here's
     what I do:

     xmlDoc.load(xmlFile)   // Loads the xml document
     all = xmlDoc.getElementsByTagName("info"); //get all info elements
     pick = all.item(n);  //pick's the nth one in the list
     pick.text is the text from the element that I put in the display.

     This works, but only because I've ordered the elements by number (id
     = '3') and pick the nth one in the list.  What I'd prefer to do is
     to use more meaningful ids and do

          xmlDoc.getElementById(meaningfulID)

     But, this is apprently not acceptable to the ASV 3 (returns an error
     that this function doesn't exist).

     So, I got clever and did a xpath-like query:

          pick = xmlDoc.selectNodes("//obj[@id=meaningfulID]/info")

     This returns results, but I'm not able get the text out of it.  I've
     tried pick.text, pick.firstChild.text, pick.nodeValue, etc.

     Surely there is an easy javascript way to do the equivalent of
     getElementById in an xml file!

     Anyone have an idea?

     Thanks,

     Bob



           Yahoo! Groups Sponsor
                 ADVERTISEMENT




     -----
     To unsubscribe send a message to:
   svg-developers-unsubscribe@yahoogroups.com
     -or-
     visit http://groups.yahoo.com/group/svg-developers and click "edit my
   membership"
     ----

     Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


   [Non-text portions of this message have been removed]


         Yahoo! Groups Sponsor
               ADVERTISEMENT




   -----
   To unsubscribe send a message to:
svg-developers-unsubscribe@yahoogroups.com
   -or-
   visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
   ----

   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


[Non-text portions of this message have been removed]

#37391 From: "zhjicheng" <zhjicheng@...>
Date: Mon Dec 1, 2003 9:33 am
Subject: Clipboard was cleared when user left clicks on the canvas.
zhjicheng
Send Email Send Email
 
Hi SVG Gurus,

I found system clipboard will be cleared when I left clicks on the
canvas.  I think that should be a bug of Batik.  Would you please
check that?

Thanks,
Frank

#37392 From: L <L@...>
Date: Mon Dec 1, 2003 12:01 pm
Subject: SVG crosswordplayer first release!!
lkoonts
Send Email Send Email
 
SVG crosswordplayer first release!!
crosswordplayer 1.0b2
http://www.koonts.com/crossword

L.

#37393 From: "Geraint Jones" <geraint@...>
Date: Mon Dec 1, 2003 12:47 pm
Subject: RE: Save as .jpg in .NET
llithfaen66
Send Email Send Email
 
Hi,

You should check out the SharpVectorGraphics library (SVG#) from
www.sharpvectorgraphics.org <http://www.sharpvectorgraphics.org/> . This
has a rendering class that lets you render an SVG file to a bitmap which
you can then save as a JPEG.

In VB.net, if strSVG is the URL of your SVG file:

     Dim svgRenderer As GdiRenderer = New GdiRenderer
         Dim svgDoc As SvgDocument = New SvgDocument(New SvgWindow(1, 1,
svgRenderer))
         svgDoc.XmlResolver = New LocalDtdXmlUrlResolver
         svgDoc.Load(strSVG)
         Dim svgRoot As SvgSvgElement
         svgRoot = svgDoc.RootElement

         Dim intWidth as Integer = svgRoot.Width.AnimVal.Value
         Dim intHeight as Integer = svgRoot.Height.AnimVal.Value

         Try
             Dim svgWin As SvgWindow = New SvgWindow(intWidth, intHeight,
svgRenderer)
             svgWin.Document = svgDoc

             Dim svgRenderDoc As SvgDocument = svgWin.Document
             Dim objImg As Bitmap = svgRenderer.Render(svgRenderDoc)
             objImg.Save(strFile, ImageFormat.Jpeg)
             objImg.Dispose()
         Catch ex As Exception
             Response.Write(ex.ToString)
         End Try

Geraint Jones

Primal Pictures Ltd

159-165 Great Portland Street
London W1W 5PA

Tel: 020 7307 6492
Fax: 020 7636 7776

http://www.anatomy.tv <http://www.anatomy.tv>
http://www.primalpictures.com <http://www.primalpictures.com>

-----Original Message-----
From: Bill Tindal [mailto:bill@...]
Sent: 01 December 2003 02:35
To: svg-developers@yahoogroups.com
Subject: [svg-developers] Save as .jpg in .NET

Hi,

Anyone have a quick code sample handy that demonstrates saving an .SVG
document as a .JPG image? Or any other format?

cheers,
Bill Tindal        <outbind://68/pixel.gif>
Senior Developer      3H Group Pty. Ltd
<outbind://68/pixel.gif>
<outbind://68/pixel.gif>
<outbind://68/pixel.gif>

Sydney, Australia
PHONE: +61 (0)2 9386 4911
FAX: +61 (0)2 9386 4922
MOBILE: +61 (0)4 13319777

EMAIL: bill@...
MSN: dbloh7@...



[Non-text portions of this message have been removed]




Yahoo! Groups Sponsor
ADVERTISEMENT
click here
<http://rd.yahoo.com/SIG=12cec8p7j/M=267637.4116732.5333197.1261774/D=eg
roupweb/S=1706030389:HM/EXP=1070332547/A=1853618/R=0/*http:/www.netflix.
com/Default?mqso=60178338&partid=4116732>

<http://us.adserver.yahoo.com/l?M=267637.4116732.5333197.1261774/D=egrou
pmail/S=:HM/A=1853618/rand=680523904>

-----
To unsubscribe send a message to:
svg-developers-unsubscribe@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .


[Non-text portions of this message have been removed]

#37394 From: Rick Bullotta <Rick.Bullotta@...>
Date: Mon Dec 1, 2003 1:14 pm
Subject: RE: Save as .jpg in .NET
rickbullotta
Send Email Send Email
 
While the SVG support in SharpVectorGraphics isn't yet as deep as Batik, the
performance is about 10-20X faster for rendering.

---- svg-developers@yahoogroups.com wrote:
> Hi,
>
> You should check out the SharpVectorGraphics library (SVG#) from
> www.sharpvectorgraphics.org <http://www.sharpvectorgraphics.org/> . This
> has a rendering class that lets you render an SVG file to a bitmap which
> you can then save as a JPEG.
>
> In VB.net, if strSVG is the URL of your SVG file:
>
>     Dim svgRenderer As GdiRenderer = New GdiRenderer
>         Dim svgDoc As SvgDocument = New SvgDocument(New SvgWindow(1, 1,
> svgRenderer))
>         svgDoc.XmlResolver = New LocalDtdXmlUrlResolver
>         svgDoc.Load(strSVG)
>         Dim svgRoot As SvgSvgElement
>         svgRoot = svgDoc.RootElement
>
>         Dim intWidth as Integer = svgRoot.Width.AnimVal.Value
>         Dim intHeight as Integer = svgRoot.Height.AnimVal.Value
>
>         Try
>             Dim svgWin As SvgWindow = New SvgWindow(intWidth, intHeight,
> svgRenderer)
>             svgWin.Document = svgDoc
>
>             Dim svgRenderDoc As SvgDocument = svgWin.Document
>             Dim objImg As Bitmap = svgRenderer.Render(svgRenderDoc)
>             objImg.Save(strFile, ImageFormat.Jpeg)
>             objImg.Dispose()
>         Catch ex As Exception
>             Response.Write(ex.ToString)
>         End Try
>
> Geraint Jones
>
> Primal Pictures Ltd
>
> 159-165 Great Portland Street
> London W1W 5PA
>
> Tel: 020 7307 6492
> Fax: 020 7636 7776
>
> http://www.anatomy.tv <http://www.anatomy.tv>
> http://www.primalpictures.com <http://www.primalpictures.com>
>
> -----Original Message-----
> From: Bill Tindal [mailto:bill@...]
> Sent: 01 December 2003 02:35
> To: svg-developers@yahoogroups.com
> Subject: [svg-developers] Save as .jpg in .NET
>
> Hi,
>
> Anyone have a quick code sample handy that demonstrates saving an .SVG
> document as a .JPG image? Or any other format?
>
> cheers,
> Bill Tindal        <outbind://68/pixel.gif>
> Senior Developer      3H Group Pty. Ltd
> <outbind://68/pixel.gif>
> <outbind://68/pixel.gif>
> <outbind://68/pixel.gif>
>
> Sydney, Australia
> PHONE: +61 (0)2 9386 4911
> FAX: +61 (0)2 9386 4922
> MOBILE: +61 (0)4 13319777
>
> EMAIL: bill@...
> MSN: dbloh7@...
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
> click here
> <http://rd.yahoo.com/SIG=12cec8p7j/M=267637.4116732.5333197.1261774/D=eg
> roupweb/S=1706030389:HM/EXP=1070332547/A=1853618/R=0/*http:/www.netflix.
> com/Default?mqso=60178338&partid=4116732>
>
> <http://us.adserver.yahoo.com/l?M=267637.4116732.5333197.1261774/D=egrou
> pmail/S=:HM/A=1853618/rand=680523904>
>
> -----
> To unsubscribe send a message to:
> svg-developers-unsubscribe@yahoogroups.com
> -or-
> visit http://groups.yahoo.com/group/svg-developers and click "edit my
> membership"
> ----
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/> .
>
>
> [Non-text portions of this message have been removed]
>
>
>
> -----
> To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
> -or-
> visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
> ----
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>

#37395 From: "FLOREZ LOSANTOS, Sergio hugo" <sergio.hugo.florez@...>
Date: Mon Dec 1, 2003 2:39 pm
Subject: svg html communication problem
shfsvg
Send Email Send Email
 
Hi all,

How could I execute the hello() function from the 'mg_streets.htm' page I
open from the index.svg. I can reach the 'magister' svg document but I don't
know how execute any function included in any .js archive without including
the js script in the htm document.

I don't know how to reach the variable mapview from the 'mg_streets.htm'
page neither.

Thanks in advance.


-------------------- index.svg -----------------------

<svg id="magister"
       x="0"
       y="0"
       width="100%"
       height="100%"
       onload="initMap(evt)"
       >
<defs>
   <circle id='point' cx='0' cy='0' r='0.01%' fill='blue'/>

   <script language="JavaScript">
     var mapview = null;
     var currentTool = 'MapTool';
     var previousTool = 'MapTool';

     function hello(){ alert('hello'); }
   </script>
   <script xlink:href="layer_manager.js" language="JavaScript"/>

   <symbol id="mnuArrow">
     <path d="M0,0l8.2,4.3l-8.2,4.5z"/>
   </symbol>
</defs>
....
<g id="tool_layer">
       <a href="#"
onclick="javascript:open('mg_streets.htm','layerwindow','width=900,height=45
0');">
         <image x="81.2" y="89" width="43" height="29"
xlink:href="images/7EC0E4F7.jpg"/>
       </a>
       <title>Streets</title>
     </g>
....

#37396 From: "Bob Hunter" <bhunter@...>
Date: Mon Dec 1, 2003 2:59 pm
Subject: RE: Find Item in XML
bobhunter7
Send Email Send Email
 
Actually, this was a XML doc loaded by external javascript.  Data from the
xml document is shown in the svg by way of the  external javascript.  The
problem was not how to show in the svg, but how to find the data in the xml
document without having to loop through all the nodes looking for a node
with an id that matches the desired one.

Bob

-----Original Message-----
From: Chris Peto [mailto:CPeto@...]
Sent: Monday, December 01, 2003 3:51 AM
To: svg-developers@yahoogroups.com
Subject: RE: [svg-developers] Find Item in XML

Hi,

Is this xml doc and svg doc?  If so,  then you need to get the
getSVGDocument() and then use svgDoc.getElementById(meaningfulID)
.

Mit freundlichen Gru?en/Regards
Chris Peto
Freelance System Development
------------------------------------
Resource Solutions
Germany
Mobile: +49 (0) 173 308 7843
Tel:+49(0) 6103 80 21 98
Web: http://www.resource-solutions.de
SVG editor: http://www.resource-solutions.de/svgeditor.html
mailto:CPeto@...
------------------------------------
Member of: SPARK - SVG Programmers' Application Resource Kit
SVG site:  http://www.schemasoft.org/svg/main.svg
HTML site: http://www.schemasoft.org/





   -----Original Message-----
   From: Gergely Hajdu [mailto:ghajdu@...]
   Sent: Montag, 1. Dezember 2003 09:46
   To: svg-developers@yahoogroups.com
   Subject: RE: [svg-developers] Find Item in XML


   Hi,

   I would suggest you to use Digester :


http://www.javaworld.com/javaworld/jw-10-2002/jw-1025-opensourceprofile.html

   This is a very good introduction. By reading this, I could use it quite
   quickly.

   Regards
   /Gergely
     -----Original Message-----
     From: bobhunter7 [mailto:bhunter@...]
     Sent: Saturday, November 29, 2003 4:41 AM
     To: svg-developers@yahoogroups.com
     Subject: [svg-developers] Find Item in XML


     I have an application that loads an xml document and displays the
     text from the xml document in the svg document.  But, I think I'm
     using an innefficient method for locating the desired record in the
     xml document.

     The xml document looks likes this:
     <InfoList>
           <obj id="0">
                 <info>Info to display</info>
           </obj>

           <obj id="1">
                 <info>More info here</info>
           </obj>

           <obj id="2">
                 <info>Still more</info>
           </obj>
     </InfoList>

     In reality, there may be hundreds of entries in the document.

     So, if I need to find the one passed to the function as n, here's
     what I do:

     xmlDoc.load(xmlFile)   // Loads the xml document
     all = xmlDoc.getElementsByTagName("info"); //get all info elements
     pick = all.item(n);  //pick's the nth one in the list
     pick.text is the text from the element that I put in the display.

     This works, but only because I've ordered the elements by number (id
     = '3') and pick the nth one in the list.  What I'd prefer to do is
     to use more meaningful ids and do

          xmlDoc.getElementById(meaningfulID)

     But, this is apprently not acceptable to the ASV 3 (returns an error
     that this function doesn't exist).

     So, I got clever and did a xpath-like query:

          pick = xmlDoc.selectNodes("//obj[@id=meaningfulID]/info")

     This returns results, but I'm not able get the text out of it.  I've
     tried pick.text, pick.firstChild.text, pick.nodeValue, etc.

     Surely there is an easy javascript way to do the equivalent of
     getElementById in an xml file!

     Anyone have an idea?

     Thanks,

     Bob



           Yahoo! Groups Sponsor
                 ADVERTISEMENT




     -----
     To unsubscribe send a message to:
   svg-developers-unsubscribe@yahoogroups.com
     -or-
     visit http://groups.yahoo.com/group/svg-developers and click "edit my
   membership"
     ----

     Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


   [Non-text portions of this message have been removed]


         Yahoo! Groups Sponsor
               ADVERTISEMENT




   -----
   To unsubscribe send a message to:
svg-developers-unsubscribe@yahoogroups.com
   -or-
   visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
   ----

   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


[Non-text portions of this message have been removed]



-----
To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

#37397 From: "Ken Larson" <ken.larson@...>
Date: Mon Dec 1, 2003 2:14 pm
Subject: Adobe SVG viewer in Java/SWT
kenlars99
Send Email Send Email
 
I am working on a bridge that will allow the Adobe SVG activeX control
to be used in a Java/SWT application, with the same W3C DOM interface
classes that are used in Batik.  This means you can more or less use
Adobe SVG and Batik interchangeably in Java using SWT.  As you know, the
Adobe viewer is much much faster....

Anybody interested in helping out, or seeing the source of what I have
done, email me.  I expect that if it gets going I'll just put it on
SourceForge.

Ken Larson

#37398 From: Leonard Rosenthol <leonardr@...>
Date: Mon Dec 1, 2003 3:11 pm
Subject: Re: SVG in PDF - Print
leonardr@...
Send Email Send Email
 
At 8:49 AM +0000 12/1/03, brsbrs2 wrote:
>Displaying SVG in the PDF Viewer works fine, but print seems not to
>work. Has anyone succeeded to print SVG using the PDF Viewer.
>

	 I am looking into the issues of printing embedded SVG - there
seems to be a number of potential roadblocks, though none seem
insurmountable.


Leonard
--
---------------------------------------------------------------------------
Leonard Rosenthol                            <mailto:leonardr@...>
                      			      <http://www.lazerware.com>

#37399 From: larry_mason@...
Date: Mon Dec 1, 2003 3:45 pm
Subject: Re: SVG in PDF - Print
lpmlabs9
Send Email Send Email
 
>Displaying SVG in the PDF Viewer works fine, but print seems not to
>work. Has anyone succeeded to print SVG using the PDF Viewer.

Displaying and printing embedded SVG from Acrobat Reader works fine for me.
A search for "pdf viewer" returned several different products.  To which do
you refer?

Larry

#37400 From: "robinmakinson" <robinmakinson@...>
Date: Mon Dec 1, 2003 3:58 pm
Subject: XML -> SVG using XSL
robinmakinson
Send Email Send Email
 
Hi,

I just started using SVG and XSL and was hoping someone could help me
out. I have an XML file and I want to use XSL to transform it to SVG,
so I started out with a simple example but the xsl:output doesn't
seem to work. In the browser, I always end up with a blank screen.
Will someone help me out? Thanks!

XML (test.xml)
==============

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="myxsl.xsl"?>
<CHART>
	 <TITLE>My Title</TITLE>
</CHART>

XSL (myxsl.xsl)
===============

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/2000/svg">
<xsl:output method="xml" indent="yes"/>
<xsl:output doctype-system="-//W3C//DTD SVG 20010904//EN"/>
<xsl:output doctype-public="http://www.w3.org/TR/2001/REC-SVG-
20010904/DTD/svg10.dtd"/>
<xsl:template match="/">
<svg width="100%" height="100%">
    <g transform="translate(100,100)">
    <polygon points="200,0 300,150 100,150"
style="fill:red;stroke:blue;"/>
    </g>
</svg>
</xsl:template>
</xsl:stylesheet>

#37401 From: Thomas DeWeese <thomas.deweese@...>
Date: Mon Dec 1, 2003 4:36 pm
Subject: Re: Save as .jpg in .NET
world_mage
Send Email Send Email
 
Rick Bullotta wrote:

> While the SVG support in SharpVectorGraphics isn't yet as deep as Batik,
> the performance is about 10-20X faster for rendering.

     I don't normally get into this sort of stuff, but I was very
surprised to see these sorts of numbers put on the speed difference
SharpVectorGraphics and Batik (as this would make SharpVectorGraphics
many times faster than Adobe).

     I just did a quick test (not very scientific) and with all
the files I tested Batik was faster than the .3 release (even
considering that Batik was doing more - filters, complex clipping
etc). In some cases Batik was significantly faster (2-3x). I am
thus very curious where you find SharpVectorGraphics to be 20X faster?

Some of the the files I used:

http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-batik/samples/anne.svg
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-batik/samples/moonPhases.svg
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-batik/samples/sizeOfSun.svg

    I had to remove the doctype from these for SharpVectorGraphics to
read them otherwise the files were untouched.  I don't think there
is anything special about these files but they are generally
'simple' in that they lack filters etc.


> ---- svg-developers@yahoogroups.com wrote:
>
>>Hi,
>>
>>You should check out the SharpVectorGraphics library (SVG#) from
>>www.sharpvectorgraphics.org <http://www.sharpvectorgraphics.org/> . This
>>has a rendering class that lets you render an SVG file to a bitmap which
>>you can then save as a JPEG.
>>
>>In VB.net, if strSVG is the URL of your SVG file:
>>
>>    Dim svgRenderer As GdiRenderer = New GdiRenderer
>>        Dim svgDoc As SvgDocument = New SvgDocument(New SvgWindow(1, 1,
>>svgRenderer))
>>        svgDoc.XmlResolver = New LocalDtdXmlUrlResolver
>>        svgDoc.Load(strSVG)
>>        Dim svgRoot As SvgSvgElement
>>        svgRoot = svgDoc.RootElement
>>
>>        Dim intWidth as Integer = svgRoot.Width.AnimVal.Value
>>        Dim intHeight as Integer = svgRoot.Height.AnimVal.Value
>>
>>        Try
>>            Dim svgWin As SvgWindow = New SvgWindow(intWidth, intHeight,
>>svgRenderer)
>>            svgWin.Document = svgDoc
>>
>>            Dim svgRenderDoc As SvgDocument = svgWin.Document
>>            Dim objImg As Bitmap = svgRenderer.Render(svgRenderDoc)
>>            objImg.Save(strFile, ImageFormat.Jpeg)
>>            objImg.Dispose()
>>        Catch ex As Exception
>>            Response.Write(ex.ToString)
>>        End Try
>>
>>Geraint Jones
>>
>>Primal Pictures Ltd
>>
>>159-165 Great Portland Street
>>London W1W 5PA
>>
>>Tel: 020 7307 6492
>>Fax: 020 7636 7776
>>
>>http://www.anatomy.tv <http://www.anatomy.tv>
>>http://www.primalpictures.com <http://www.primalpictures.com>
>>
>>-----Original Message-----
>>From: Bill Tindal [mailto:bill@...]
>>Sent: 01 December 2003 02:35
>>To: svg-developers@yahoogroups.com
>>Subject: [svg-developers] Save as .jpg in .NET
>>
>>Hi,
>>
>>Anyone have a quick code sample handy that demonstrates saving an .SVG
>>document as a .JPG image? Or any other format?
>>
>>cheers,
>>Bill Tindal        <outbind://68/pixel.gif>
>>Senior Developer      3H Group Pty. Ltd
>><outbind://68/pixel.gif>
>><outbind://68/pixel.gif>
>><outbind://68/pixel.gif>
>>
>>Sydney, Australia
>>PHONE: +61 (0)2 9386 4911
>>FAX: +61 (0)2 9386 4922
>>MOBILE: +61 (0)4 13319777
>>
>>EMAIL: bill@...
>>MSN: dbloh7@...
>>
>>
>>
>>[Non-text portions of this message have been removed]
>>
>>
>>
>>
>>Yahoo! Groups Sponsor
>>ADVERTISEMENT
>>click here
>><http://rd.yahoo.com/SIG=12cec8p7j/M=267637.4116732.5333197.1261774/D=eg
>>roupweb/S=1706030389:HM/EXP=1070332547/A=1853618/R=0/*http:/www.netflix.
>>com/Default?mqso=60178338&partid=4116732>
>>
>><http://us.adserver.yahoo.com/l?M=267637.4116732.5333197.1261774/D=egrou
>>pmail/S=:HM/A=1853618/rand=680523904>
>>
>>-----
>>To unsubscribe send a message to:
>>svg-developers-unsubscribe@yahoogroups.com
>>-or-
>>visit http://groups.yahoo.com/group/svg-developers and click "edit my
>>membership"
>>----
>>
>>Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
>><http://docs.yahoo.com/info/terms/> .
>>
>>
>>[Non-text portions of this message have been removed]
>>
>>
>>
>>-----
>>To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
>>-or-
>>visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
>>----
>>
>>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>>
>>
>>
>>
>
>
>
> -----
> To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
> -or-
> visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
> ----
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>

#37402 From: Olaf Schnabel <schnabel@...>
Date: Mon Dec 1, 2003 4:41 pm
Subject: Re: XML -> SVG using XSL
darkolaf77
Send Email Send Email
 
hi robin

until now browsers can only show xml as text (not as graphic). that means that
your xsl-output to
svg does not work (you should only see the svg codelines as text).
try a parser like msxsl, then it should work.

regards
olaf

--On Montag, 1. Dezember 2003 15:58 +0000 robinmakinson
<robinmakinson@...> wrote:

> Hi,
>
> I just started using SVG and XSL and was hoping someone could help me
> out. I have an XML file and I want to use XSL to transform it to SVG,
> so I started out with a simple example but the xsl:output doesn't
> seem to work. In the browser, I always end up with a blank screen.
> Will someone help me out? Thanks!
>
> XML (test.xml)
> ==============
>
> <?xml version="1.0"?>
> <?xml-stylesheet type="text/xsl" href="myxsl.xsl"?>
> <CHART>
>  <TITLE>My Title</TITLE>
> </CHART>
>
> XSL (myxsl.xsl)
> ===============
>
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns="http://www.w3.org/2000/svg">
> <xsl:output method="xml" indent="yes"/>
> <xsl:output doctype-system="-//W3C//DTD SVG 20010904//EN"/>
> <xsl:output doctype-public="http://www.w3.org/TR/2001/REC-SVG-
> 20010904/DTD/svg10.dtd"/>
> <xsl:template match="/">
> <svg width="100%" height="100%">
>    <g transform="translate(100,100)">
>    <polygon points="200,0 300,150 100,150"
> style="fill:red;stroke:blue;"/>
>    </g>
> </svg>
> </xsl:template>
> </xsl:stylesheet>
>
>
>
>
>
>
> -----
> To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
> -or-
> visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
> ----
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>



------
Olaf Schnabel
Department of Cartography
Swiss Federal Institute of Technology (ETH)
ETH Hoenggerberg, CH-8093  Zurich, Switzerland
phone: ++41-1-633 3031
e-mail: schnabel@...
www: http://www.karto.ethz.ch/schnabel

#37403 From: "Rick Bullotta" <Rick.Bullotta@...>
Date: Mon Dec 1, 2003 4:48 pm
Subject: RE: Save as .jpg in .NET
RBullotta
Send Email Send Email
 
Excellent question!  As we know with "benchmarks", ignore them all <g>.

In our specific case, we implemented a prototype of our product with Batik
and SharpVectorGraphics.  In both cases, we implemented a server-side
component that streamed back PNG images to a requesting client.  The Batik
implementation was, of course, a servlet, and the SharpVectorGraphics
implemlentation an HttpRequestHandler.  The speed difference varied, but
generally was about 80ms for the .NET implementation and approximately 1200
ms for the Batik implementation.  I suspect that much of this was in the
rasterization, but either way, that's what we experienced in our testing.

Hope that helps!

- Rick




-----Original Message-----
From: Thomas DeWeese [mailto:thomas.deweese@...]
Sent: Monday, December 01, 2003 11:36 AM
To: svg-developers@yahoogroups.com
Subject: Re: [svg-developers] Save as .jpg in .NET

Rick Bullotta wrote:

> While the SVG support in SharpVectorGraphics isn't yet as deep as Batik,
> the performance is about 10-20X faster for rendering.

     I don't normally get into this sort of stuff, but I was very
surprised to see these sorts of numbers put on the speed difference
SharpVectorGraphics and Batik (as this would make SharpVectorGraphics
many times faster than Adobe).

     I just did a quick test (not very scientific) and with all
the files I tested Batik was faster than the .3 release (even
considering that Batik was doing more - filters, complex clipping
etc). In some cases Batik was significantly faster (2-3x). I am
thus very curious where you find SharpVectorGraphics to be 20X faster?

Some of the the files I used:

http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-batik/samples/anne.svg
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-batik/samples/moonPhases.sv
g
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-batik/samples/sizeOfSun.svg

    I had to remove the doctype from these for SharpVectorGraphics to
read them otherwise the files were untouched.  I don't think there
is anything special about these files but they are generally
'simple' in that they lack filters etc.


> ---- svg-developers@yahoogroups.com wrote:
>
>>Hi,
>>
>>You should check out the SharpVectorGraphics library (SVG#) from
>>www.sharpvectorgraphics.org <http://www.sharpvectorgraphics.org/> . This
>>has a rendering class that lets you render an SVG file to a bitmap which
>>you can then save as a JPEG.
>>
>>In VB.net, if strSVG is the URL of your SVG file:
>>
>>    Dim svgRenderer As GdiRenderer = New GdiRenderer
>>        Dim svgDoc As SvgDocument = New SvgDocument(New SvgWindow(1, 1,
>>svgRenderer))
>>        svgDoc.XmlResolver = New LocalDtdXmlUrlResolver
>>        svgDoc.Load(strSVG)
>>        Dim svgRoot As SvgSvgElement
>>        svgRoot = svgDoc.RootElement
>>
>>        Dim intWidth as Integer = svgRoot.Width.AnimVal.Value
>>        Dim intHeight as Integer = svgRoot.Height.AnimVal.Value
>>
>>        Try
>>            Dim svgWin As SvgWindow = New SvgWindow(intWidth, intHeight,
>>svgRenderer)
>>            svgWin.Document = svgDoc
>>
>>            Dim svgRenderDoc As SvgDocument = svgWin.Document
>>            Dim objImg As Bitmap = svgRenderer.Render(svgRenderDoc)
>>            objImg.Save(strFile, ImageFormat.Jpeg)
>>            objImg.Dispose()
>>        Catch ex As Exception
>>            Response.Write(ex.ToString)
>>        End Try
>>
>>Geraint Jones
>>
>>Primal Pictures Ltd
>>
>>159-165 Great Portland Street
>>London W1W 5PA
>>
>>Tel: 020 7307 6492
>>Fax: 020 7636 7776
>>
>>http://www.anatomy.tv <http://www.anatomy.tv>
>>http://www.primalpictures.com <http://www.primalpictures.com>
>>
>>-----Original Message-----
>>From: Bill Tindal [mailto:bill@...]
>>Sent: 01 December 2003 02:35
>>To: svg-developers@yahoogroups.com
>>Subject: [svg-developers] Save as .jpg in .NET
>>
>>Hi,
>>
>>Anyone have a quick code sample handy that demonstrates saving an .SVG
>>document as a .JPG image? Or any other format?
>>
>>cheers,
>>Bill Tindal        <outbind://68/pixel.gif>
>>Senior Developer      3H Group Pty. Ltd
>><outbind://68/pixel.gif>
>><outbind://68/pixel.gif>
>><outbind://68/pixel.gif>
>>
>>Sydney, Australia
>>PHONE: +61 (0)2 9386 4911
>>FAX: +61 (0)2 9386 4922
>>MOBILE: +61 (0)4 13319777
>>
>>EMAIL: bill@...
>>MSN: dbloh7@...
>>
>>
>>
>>[Non-text portions of this message have been removed]
>>
>>
>>
>>
>>Yahoo! Groups Sponsor
>>ADVERTISEMENT
>>click here
>><http://rd.yahoo.com/SIG=12cec8p7j/M=267637.4116732.5333197.1261774/D=eg
>>roupweb/S=1706030389:HM/EXP=1070332547/A=1853618/R=0/*http:/www.netflix.
>>com/Default?mqso=60178338&partid=4116732>
>>
>><http://us.adserver.yahoo.com/l?M=267637.4116732.5333197.1261774/D=egrou
>>pmail/S=:HM/A=1853618/rand=680523904>
>>
>>-----
>>To unsubscribe send a message to:
>>svg-developers-unsubscribe@yahoogroups.com
>>-or-
>>visit http://groups.yahoo.com/group/svg-developers and click "edit my
>>membership"
>>----
>>
>>Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
>><http://docs.yahoo.com/info/terms/> .
>>
>>
>>[Non-text portions of this message have been removed]
>>
>>
>>
>>-----
>>To unsubscribe send a message to:
svg-developers-unsubscribe@yahoogroups.com
>>-or-
>>visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
>>----
>>
>>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>>
>>
>>
>>
>
>
>
> -----
> To unsubscribe send a message to:
svg-developers-unsubscribe@yahoogroups.com
> -or-
> visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
> ----
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>





-----
To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

#37404 From: "svgdeveloper" <rdeserranno@...>
Date: Mon Dec 1, 2003 3:56 pm
Subject: Re: Save as .jpg in .NET
svgdeveloper
Send Email Send Email
 
The Mobiform SVG Browser and SVGViewPlus .NET component supports
external linking to any image format supported by
System.Graphics.Bitmap. This includes BMP, EMF, Exif, GIF, Icon,
Jpeg, PNG, Tiff, and WMF. Support for save includes BMP, GIF and PNG.
If you need a JPG, you can 'save as' to one of the listed formats and
then use another application or component to change to Jpg. Mobiform
will be saving to other formats in the near future.

Ron @ Mobiform
www.MOBIFORM.com



> >
> > -----Original Message-----
> > From: Bill Tindal [mailto:bill@3...]
> > Sent: 01 December 2003 02:35
> > To: svg-developers@yahoogroups.com
> > Subject: [svg-developers] Save as .jpg in .NET
> >
> > Hi,
> >
> > Anyone have a quick code sample handy that demonstrates saving
an .SVG
> > document as a .JPG image? Or any other format?
> >
> > cheers,
> > Bill Tindal        <outbind://68/pixel.gif>
> > Senior Developer      3H Group Pty. Ltd
> > Sydney, Australia
> > PHONE: +61 (0)2 9386 4911
> > FAX: +61 (0)2 9386 4922
> > MOBILE: +61 (0)4 13319777
> >
> > EMAIL: bill@3...
> > MSN: dbloh7@h...
> >

#37405 From: "Mathias FATENE" <mathias.fatene@...>
Date: Mon Dec 1, 2003 5:07 pm
Subject: RE: Find Item in XML
mfatene
Send Email Send Email
 
Hi,
This means that your need something faster than an xml parser.
Every method you use will first need to read data. To access a method like
seek in an xml document, you nead xmlquery, xsl, or something like that.

Every parser will use something like a loop to find th ematching element.
RegExp can solve your problem, but you will always read all the file to look
for just ONE element.

But i have an advise for you.

To be faster than everything else, create a file named by a city and
containing the description for the city.
Use my code, and just parseXML the data.content of the file used in
parameter of the onmouseover event.


Mathias

-----Original Message-----
From: Bob Hunter [mailto:bhunter@...]
Sent: Monday, December 01, 2003 4:00 PM
To: svg-developers@yahoogroups.com
Subject: RE: [svg-developers] Find Item in XML


Actually, this was a XML doc loaded by external javascript.  Data from the
xml document is shown in the svg by way of the  external javascript.  The
problem was not how to show in the svg, but how to find the data in the xml
document without having to loop through all the nodes looking for a node
with an id that matches the desired one.

Bob

-----Original Message-----
From: Chris Peto [mailto:CPeto@...]
Sent: Monday, December 01, 2003 3:51 AM
To: svg-developers@yahoogroups.com
Subject: RE: [svg-developers] Find Item in XML

Hi,

Is this xml doc and svg doc?  If so,  then you need to get the
getSVGDocument() and then use svgDoc.getElementById(meaningfulID)
.

Mit freundlichen Gru?en/Regards
Chris Peto
Freelance System Development
------------------------------------
Resource Solutions
Germany
Mobile: +49 (0) 173 308 7843
Tel:+49(0) 6103 80 21 98
Web: http://www.resource-solutions.de
SVG editor: http://www.resource-solutions.de/svgeditor.html
mailto:CPeto@...
------------------------------------
Member of: SPARK - SVG Programmers' Application Resource Kit
SVG site:  http://www.schemasoft.org/svg/main.svg
HTML site: http://www.schemasoft.org/





   -----Original Message-----
   From: Gergely Hajdu [mailto:ghajdu@...]
   Sent: Montag, 1. Dezember 2003 09:46
   To: svg-developers@yahoogroups.com
   Subject: RE: [svg-developers] Find Item in XML


   Hi,

   I would suggest you to use Digester :


http://www.javaworld.com/javaworld/jw-10-2002/jw-1025-opensourceprofile.html

   This is a very good introduction. By reading this, I could use it quite
   quickly.

   Regards
   /Gergely
     -----Original Message-----
     From: bobhunter7 [mailto:bhunter@...]
     Sent: Saturday, November 29, 2003 4:41 AM
     To: svg-developers@yahoogroups.com
     Subject: [svg-developers] Find Item in XML


     I have an application that loads an xml document and displays the
     text from the xml document in the svg document.  But, I think I'm
     using an innefficient method for locating the desired record in the
     xml document.

     The xml document looks likes this:
     <InfoList>
           <obj id="0">
                 <info>Info to display</info>
           </obj>

           <obj id="1">
                 <info>More info here</info>
           </obj>

           <obj id="2">
                 <info>Still more</info>
           </obj>
     </InfoList>

     In reality, there may be hundreds of entries in the document.

     So, if I need to find the one passed to the function as n, here's
     what I do:

     xmlDoc.load(xmlFile)   // Loads the xml document
     all = xmlDoc.getElementsByTagName("info"); //get all info elements
     pick = all.item(n);  //pick's the nth one in the list
     pick.text is the text from the element that I put in the display.

     This works, but only because I've ordered the elements by number (id
     = '3') and pick the nth one in the list.  What I'd prefer to do is
     to use more meaningful ids and do

          xmlDoc.getElementById(meaningfulID)

     But, this is apprently not acceptable to the ASV 3 (returns an error
     that this function doesn't exist).

     So, I got clever and did a xpath-like query:

          pick = xmlDoc.selectNodes("//obj[@id=meaningfulID]/info")

     This returns results, but I'm not able get the text out of it.  I've
     tried pick.text, pick.firstChild.text, pick.nodeValue, etc.

     Surely there is an easy javascript way to do the equivalent of
     getElementById in an xml file!

     Anyone have an idea?

     Thanks,

     Bob



           Yahoo! Groups Sponsor
                 ADVERTISEMENT




     -----
     To unsubscribe send a message to:
   svg-developers-unsubscribe@yahoogroups.com
     -or-
     visit http://groups.yahoo.com/group/svg-developers and click "edit my
   membership"
     ----

     Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


   [Non-text portions of this message have been removed]


         Yahoo! Groups Sponsor
               ADVERTISEMENT




   -----
   To unsubscribe send a message to:
svg-developers-unsubscribe@yahoogroups.com
   -or-
   visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
   ----

   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


[Non-text portions of this message have been removed]



-----
To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/





-----
To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

#37406 From: "brsbrs2" <brs@...>
Date: Mon Dec 1, 2003 5:15 pm
Subject: Re: SVG in PDF - Print
brsbrs2
Send Email Send Email
 
--- In svg-developers@yahoogroups.com, larry_mason@i... wrote:
>
>
>
>
> >Displaying SVG in the PDF Viewer works fine, but print seems not
to
> >work. Has anyone succeeded to print SVG using the PDF Viewer.
>
> Displaying and printing embedded SVG from Acrobat Reader works
fine for me.
> A search for "pdf viewer" returned several different products.  To
which do
> you refer?

I am using Adobe Reader 6.0

/Brian Sørensen

>
> Larry

#37407 From: "Geraint Jones" <geraint@...>
Date: Mon Dec 1, 2003 5:28 pm
Subject: tref ASV3
llithfaen66
Send Email Send Email
 
Hi,

Does Adobe SVG Viewer 3 support the tref element with a link to an
external file? I can't seem to get it to work other than to internal
links.

Cheers,

Geraint Jones

Primal Pictures Ltd

159-165 Great Portland Street
London W1W 5PA

Tel: 020 7307 6492
Fax: 020 7636 7776

http://www.anatomy.tv
http://www.primalpictures.com




[Non-text portions of this message have been removed]

#37408 From: larry_mason@...
Date: Mon Dec 1, 2003 5:27 pm
Subject: Re: Re: SVG in PDF - Print
lpmlabs9
Send Email Send Email
 
I use Apache's FOP to embed SVG into a PDF document.  The result displays
and prints fine from a browser as well as when loaded from disk by the
Acrobat Reader 6.0 standalone executable.

Larry

#37409 From: Leonard Rosenthol <leonardr@...>
Date: Mon Dec 1, 2003 6:11 pm
Subject: Re: Re: SVG in PDF - Print
leonardr@...
Send Email Send Email
 
At 11:27 AM -0600 12/1/03, larry_mason@... wrote:
>I use Apache's FOP to embed SVG into a PDF document.  The result displays
>and prints fine from a browser as well as when loaded from disk by the
>Acrobat Reader 6.0 standalone executable.
>

	 FOP doesn't embed SVG into a PDF - it CONVERTS the SVG into PDF...


Leonard
--
---------------------------------------------------------------------------
Leonard Rosenthol                            <mailto:leonardr@...>
                      			      <http://www.lazerware.com>

#37410 From: Thomas DeWeese <thomas.deweese@...>
Date: Mon Dec 1, 2003 6:22 pm
Subject: Re: Save as .jpg in .NET
world_mage
Send Email Send Email
 
Rick Bullotta wrote:

> Excellent question!  As we know with "benchmarks", ignore them all <g>.

     Yes they are notoriously difficult to make sense of.  All to often
the comparisons are apples to Toyota's :)

> In our specific case, we implemented a prototype of our product with Batik
> and SharpVectorGraphics.  In both cases, we implemented a server-side
> component that streamed back PNG images to a requesting client.  The Batik
> implementation was, of course, a servlet, and the SharpVectorGraphics
> implemlentation an HttpRequestHandler.  The speed difference varied, but
> generally was about 80ms for the .NET implementation and approximately 1200
> ms for the Batik implementation.  I suspect that much of this was in the
> rasterization, but either way, that's what we experienced in our testing.
>
> Hope that helps!

     Yah, it helps. If this was early on, Batik would always read the
DTD (700ms - which it doesn't do anymore unless validating) and our
PNG _encoder_ used to be absolutely terrible (it's _much_ faster now -
not that PNG encoding has much to do with SVG rendering :).

      I still suspect that something was seriously whacked in
how Batik was setup (especially given my recent experience with
SharpVectorGraphics).  Also 80ms seems impossibly low given the
load/display times I am seeing with SharpVectorGraphics are you
sure you weren't doing something like bypassing XML parsing? or
the like?

> -----Original Message-----
> From: Thomas DeWeese [mailto:thomas.deweese@...]
> Sent: Monday, December 01, 2003 11:36 AM
> To: svg-developers@yahoogroups.com
> Subject: Re: [svg-developers] Save as .jpg in .NET
>
> Rick Bullotta wrote:
>
>
>>While the SVG support in SharpVectorGraphics isn't yet as deep as Batik,
>>the performance is about 10-20X faster for rendering.
>
>
>     I don't normally get into this sort of stuff, but I was very
> surprised to see these sorts of numbers put on the speed difference
> SharpVectorGraphics and Batik (as this would make SharpVectorGraphics
> many times faster than Adobe).
>
>     I just did a quick test (not very scientific) and with all
> the files I tested Batik was faster than the .3 release (even
> considering that Batik was doing more - filters, complex clipping
> etc). In some cases Batik was significantly faster (2-3x). I am
> thus very curious where you find SharpVectorGraphics to be 20X faster?
>
> Some of the the files I used:
>
> http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-batik/samples/anne.svg
> http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-batik/samples/moonPhases.sv
> g
> http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-batik/samples/sizeOfSun.svg
>
>    I had to remove the doctype from these for SharpVectorGraphics to
> read them otherwise the files were untouched.  I don't think there
> is anything special about these files but they are generally
> 'simple' in that they lack filters etc.
>
>
>
>>---- svg-developers@yahoogroups.com wrote:
>>
>>
>>>Hi,
>>>
>>>You should check out the SharpVectorGraphics library (SVG#) from
>>>www.sharpvectorgraphics.org <http://www.sharpvectorgraphics.org/> . This
>>>has a rendering class that lets you render an SVG file to a bitmap which
>>>you can then save as a JPEG.
>>>
>>>In VB.net, if strSVG is the URL of your SVG file:
>>>
>>>   Dim svgRenderer As GdiRenderer = New GdiRenderer
>>>       Dim svgDoc As SvgDocument = New SvgDocument(New SvgWindow(1, 1,
>>>svgRenderer))
>>>       svgDoc.XmlResolver = New LocalDtdXmlUrlResolver
>>>       svgDoc.Load(strSVG)
>>>       Dim svgRoot As SvgSvgElement
>>>       svgRoot = svgDoc.RootElement
>>>
>>>       Dim intWidth as Integer = svgRoot.Width.AnimVal.Value
>>>       Dim intHeight as Integer = svgRoot.Height.AnimVal.Value
>>>
>>>       Try
>>>           Dim svgWin As SvgWindow = New SvgWindow(intWidth, intHeight,
>>>svgRenderer)
>>>           svgWin.Document = svgDoc
>>>
>>>           Dim svgRenderDoc As SvgDocument = svgWin.Document
>>>           Dim objImg As Bitmap = svgRenderer.Render(svgRenderDoc)
>>>           objImg.Save(strFile, ImageFormat.Jpeg)
>>>           objImg.Dispose()
>>>       Catch ex As Exception
>>>           Response.Write(ex.ToString)
>>>       End Try
>>>
>>>Geraint Jones
>>>
>>>Primal Pictures Ltd
>>>
>>>159-165 Great Portland Street
>>>London W1W 5PA
>>>
>>>Tel: 020 7307 6492
>>>Fax: 020 7636 7776
>>>
>>>http://www.anatomy.tv <http://www.anatomy.tv>
>>>http://www.primalpictures.com <http://www.primalpictures.com>
>>>
>>>-----Original Message-----
>>>From: Bill Tindal [mailto:bill@...]
>>>Sent: 01 December 2003 02:35
>>>To: svg-developers@yahoogroups.com
>>>Subject: [svg-developers] Save as .jpg in .NET
>>>
>>>Hi,
>>>
>>>Anyone have a quick code sample handy that demonstrates saving an .SVG
>>>document as a .JPG image? Or any other format?

#37411 From: "colors9204" <colors9204@...>
Date: Mon Dec 1, 2003 6:46 pm
Subject: Re: SVG in PDF - Print
colors9204
Send Email Send Email
 
Hello,

anyone has any example of using FOO to convert SVG to PDF? Is it
difficult? Thanks.

--- In svg-developers@yahoogroups.com, Leonard Rosenthol
<leonardr@l...> wrote:
> At 11:27 AM -0600 12/1/03, larry_mason@i... wrote:
> >I use Apache's FOP to embed SVG into a PDF document.  The result
displays
> >and prints fine from a browser as well as when loaded from disk
by the
> >Acrobat Reader 6.0 standalone executable.
> >
>
>  FOP doesn't embed SVG into a PDF - it CONVERTS the SVG into
PDF...
>
>
> Leonard
> --
> -------------------------------------------------------------------
--------
> Leonard Rosenthol                            <mailto:leonardr@l...>
>
<http://www.lazerware.com>

#37412 From: "robinmakinson" <robinmakinson@...>
Date: Mon Dec 1, 2003 6:52 pm
Subject: Re: XML -> SVG using XSL
robinmakinson
Send Email Send Email
 
Hi Olaf,

Thanks for the quick reply. Does that mean that the only output that
current browsers can process and we can see is <xsl:output
method="html"/>?

Robin

--- In svg-developers@yahoogroups.com, Olaf Schnabel <schnabel@k...>
wrote:
> hi robin
>
> until now browsers can only show xml as text (not as graphic). that
means that your xsl-output to
> svg does not work (you should only see the svg codelines as text).
> try a parser like msxsl, then it should work.
>
> regards
> olaf
>
> --On Montag, 1. Dezember 2003 15:58 +0000 robinmakinson
<robinmakinson@h...> wrote:
>
> > Hi,
> >
> > I just started using SVG and XSL and was hoping someone could
help me
> > out. I have an XML file and I want to use XSL to transform it to
SVG,
> > so I started out with a simple example but the xsl:output doesn't
> > seem to work. In the browser, I always end up with a blank screen.
> > Will someone help me out? Thanks!
> >
> > XML (test.xml)
> > ==============
> >
> > <?xml version="1.0"?>
> > <?xml-stylesheet type="text/xsl" href="myxsl.xsl"?>
> > <CHART>
> >  <TITLE>My Title</TITLE>
> > </CHART>
> >
> > XSL (myxsl.xsl)
> > ===============
> >
> > <?xml version="1.0"?>
> > <xsl:stylesheet version="1.0"
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > xmlns="http://www.w3.org/2000/svg">
> > <xsl:output method="xml" indent="yes"/>
> > <xsl:output doctype-system="-//W3C//DTD SVG 20010904//EN"/>
> > <xsl:output doctype-public="http://www.w3.org/TR/2001/REC-SVG-
> > 20010904/DTD/svg10.dtd"/>
> > <xsl:template match="/">
> > <svg width="100%" height="100%">
> >    <g transform="translate(100,100)">
> >    <polygon points="200,0 300,150 100,150"
> > style="fill:red;stroke:blue;"/>
> >    </g>
> > </svg>
> > </xsl:template>
> > </xsl:stylesheet>
> >
> >
> >
> >
> >
> >
> > -----
> > To unsubscribe send a message to: svg-developers-
unsubscribe@yahoogroups.com
> > -or-
> > visit http://groups.yahoo.com/group/svg-developers and
click "edit my membership"
> > ----
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
>
>
>
> ------
> Olaf Schnabel
> Department of Cartography
> Swiss Federal Institute of Technology (ETH)
> ETH Hoenggerberg, CH-8093  Zurich, Switzerland
> phone: ++41-1-633 3031
> e-mail: schnabel@k...
> www: http://www.karto.ethz.ch/schnabel

#37413 From: larry_mason@...
Date: Mon Dec 1, 2003 7:01 pm
Subject: Re: Re: SVG in PDF - Print
lpmlabs9
Send Email Send Email
 
> FOP doesn't embed SVG into a PDF - it CONVERTS the SVG into PDF...

"Embedding instream-foreign-object" is how Apache refers to it.
Larry

#37414 From: larry_mason@...
Date: Mon Dec 1, 2003 7:12 pm
Subject: Re: Re: SVG in PDF - Print
lpmlabs9
Send Email Send Email
 
> anyone has any example of using FOO to convert SVG to PDF?

Examples on the Apache site.  Here is what I do in a JSP that receives some
SVG from a browser and returns a PDF result.  Allows me to create suitable
results for printing (and saving to disk) any of my SVG-based components.

    ...
   <fo:instream-foreign-object>
   <%=svgcontent%>
   </fo:instream-foreign-object>
    ...

Larry

#37415 From: Thomas DeWeese <thomas.deweese@...>
Date: Mon Dec 1, 2003 7:18 pm
Subject: Re: Re: SVG in PDF - Print
world_mage
Send Email Send Email
 
colors9204 wrote:

> anyone has any example of using FOO to convert SVG to PDF? Is it
> difficult?

     I take it you mean FOP?  If so there are two routes to go.
1) Use FOP which means an FO document with embedded SVG for
     each page.
2) Use Batik (which uses FOP's PDF output engine) to convert
     individual SVG files to PDF.

     If you need to create multipage PDF files you must use #1.
If you are happy with a simple one page PDF for an SVG image
you can use #2.

     #2 is available as a command-line application, or you can
pretty easily embed it directly into a larger Java Application (more
efficient).  Going this route you only need Batik.

     #1 is also available as a command-line application, I have
no idea how easy/hard it would be to embed in a larger Application.
Going this route you will mostly interact with FOP.

> --- In svg-developers@yahoogroups.com, Leonard Rosenthol
> <leonardr@l...> wrote:
>
>>At 11:27 AM -0600 12/1/03, larry_mason@i... wrote:
>>
>>>I use Apache's FOP to embed SVG into a PDF document.  The result
>
> displays
>
>>>and prints fine from a browser as well as when loaded from disk
>
> by the
>
>>>Acrobat Reader 6.0 standalone executable.
>>>
>>
>> FOP doesn't embed SVG into a PDF - it CONVERTS the SVG into
>
> PDF...
>
>>
>>Leonard
>>--
>>-------------------------------------------------------------------
>
> --------
>
>>Leonard Rosenthol                            <mailto:leonardr@l...>
>>
>
> <http://www.lazerware.com>
>
>
>
> -----
> To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
> -or-
> visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
> ----
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>

#37416 From: "colors9204" <colors9204@...>
Date: Mon Dec 1, 2003 7:37 pm
Subject: Re: SVG in PDF - Print
colors9204
Send Email Send Email
 
Thanks.
Yeah, I meant FOP.
How good is batik at this? Do they convert gradients and patterns?

I heard that iText can also generate PDF, which one better?

again, thanks.
--- In svg-developers@yahoogroups.com, Thomas DeWeese
<thomas.deweese@k...> wrote:
> colors9204 wrote:
>
> > anyone has any example of using FOO to convert SVG to PDF? Is it
> > difficult?
>
>     I take it you mean FOP?  If so there are two routes to go.
> 1) Use FOP which means an FO document with embedded SVG for
>     each page.
> 2) Use Batik (which uses FOP's PDF output engine) to convert
>     individual SVG files to PDF.
>
>     If you need to create multipage PDF files you must use #1.
> If you are happy with a simple one page PDF for an SVG image
> you can use #2.
>
>     #2 is available as a command-line application, or you can
> pretty easily embed it directly into a larger Java Application
(more
> efficient).  Going this route you only need Batik.
>
>     #1 is also available as a command-line application, I have
> no idea how easy/hard it would be to embed in a larger Application.
> Going this route you will mostly interact with FOP.
>
> > --- In svg-developers@yahoogroups.com, Leonard Rosenthol
> > <leonardr@l...> wrote:
> >
> >>At 11:27 AM -0600 12/1/03, larry_mason@i... wrote:
> >>
> >>>I use Apache's FOP to embed SVG into a PDF document.  The
result
> >
> > displays
> >
> >>>and prints fine from a browser as well as when loaded from disk
> >
> > by the
> >
> >>>Acrobat Reader 6.0 standalone executable.
> >>>
> >>
> >> FOP doesn't embed SVG into a PDF - it CONVERTS the SVG into
> >
> > PDF...
> >
> >>
> >>Leonard
> >>--
> >>-----------------------------------------------------------------
--
> >
> > --------
> >
> >>Leonard Rosenthol
<mailto:leonardr@l...>
> >>
> >
> > <http://www.lazerware.com>
> >
> >
> >
> > -----
> > To unsubscribe send a message to: svg-developers-
unsubscribe@yahoogroups.com
> > -or-
> > visit http://groups.yahoo.com/group/svg-developers and
click "edit my membership"
> > ----
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >

#37417 From: Thomas DeWeese <thomas.deweese@...>
Date: Mon Dec 1, 2003 7:48 pm
Subject: Re: Re: SVG in PDF - Print
world_mage
Send Email Send Email
 
colors9204 wrote:
> Thanks.
> Yeah, I meant FOP.
> How good is batik at this? Do they convert gradients and patterns?

     It will convert some gradients and no patterns.  It does do
filters (by rasterizing - and this can be used as a 'hack' to
get rasterized patterns and gradients).

> I heard that iText can also generate PDF, which one better?

     I know nothing about iText.

> again, thanks.
> --- In svg-developers@yahoogroups.com, Thomas DeWeese
> <thomas.deweese@k...> wrote:
>
>>colors9204 wrote:
>>
>>
>>>anyone has any example of using FOO to convert SVG to PDF? Is it
>>>difficult?
>>
>>    I take it you mean FOP?  If so there are two routes to go.
>>1) Use FOP which means an FO document with embedded SVG for
>>    each page.
>>2) Use Batik (which uses FOP's PDF output engine) to convert
>>    individual SVG files to PDF.
>>
>>    If you need to create multipage PDF files you must use #1.
>>If you are happy with a simple one page PDF for an SVG image
>>you can use #2.
>>
>>    #2 is available as a command-line application, or you can
>>pretty easily embed it directly into a larger Java Application
>
> (more
>
>>efficient).  Going this route you only need Batik.
>>
>>    #1 is also available as a command-line application, I have
>>no idea how easy/hard it would be to embed in a larger Application.
>>Going this route you will mostly interact with FOP.
>>
>>
>>>--- In svg-developers@yahoogroups.com, Leonard Rosenthol
>>><leonardr@l...> wrote:
>>>
>>>
>>>>At 11:27 AM -0600 12/1/03, larry_mason@i... wrote:
>>>>
>>>>
>>>>>I use Apache's FOP to embed SVG into a PDF document.  The
>
> result
>
>>>displays
>>>
>>>
>>>>>and prints fine from a browser as well as when loaded from disk
>>>
>>>by the
>>>
>>>
>>>>>Acrobat Reader 6.0 standalone executable.
>>>>>
>>>>
>>>> FOP doesn't embed SVG into a PDF - it CONVERTS the SVG into
>>>
>>>PDF...
>>>
>>>
>>>>Leonard
>>>>--
>>>>-----------------------------------------------------------------
>
> --
>
>>>--------
>>>
>>>
>>>>Leonard Rosenthol
>
> <mailto:leonardr@l...>
>
>>>>
>>>
>>><http://www.lazerware.com>
>>>
>>>
>>>
>>>-----
>>>To unsubscribe send a message to: svg-developers-
>
> unsubscribe@yahoogroups.com
>
>>>-or-
>>>visit http://groups.yahoo.com/group/svg-developers and
>
> click "edit my membership"
>
>>>----
>>>
>>>Your use of Yahoo! Groups is subject to
>
> http://docs.yahoo.com/info/terms/
>
>>>
>
>
>
> -----
> To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
> -or-
> visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
> ----
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>

Messages 37387 - 37417 of 66117   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help