[pdftex] support for svg

Hans Hagen pragma at wxs.nl
Mon Jun 21 00:30:32 CEST 2004

wrobell wrote:

> <>OK, I can convert it to PDF probably, but it would be nice just to 
> embed SVG...

this is about the minimum needed

\def\SVGimage#1#2#3% name width height
  {\immediate\pdfobj stream file {#1}%
   \immediate\pdfobj {<</Type /Filespec /F (#1) /EF <</F
\the\pdflastobj\space0 R>> >>}%
   \vbox to #3{\vss\hbox to #2{\pdfannot width #2 height #3
     {/Type /Annot
      /Subtype /SVG
      /Resources <</Names[(#1) \the\pdflastobj\space0 R]>>
      /StartResource (#1)
      /T (#1)}\hss}}}

however, scaling is bugged in acrobat (windows version, i still have to
test the mac):

- smaller than natural size: ok
- same as natural size: wrong scaling
- using scaling while viewing (using magnifyer): no scaling

so, in order to get it useable in documents, you have to wait for
acrobat version 7 but at least it seems that svg will make it as embeded
graphic format -)


                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl

More information about the pdftex mailing list