[pdftex] support for svg
Hans Hagen Outside
pragma at wxs.nl
Sun Jun 20 21:15:55 CEST 2004
wrobell wrote:
>Hello,
>
>PDF file with embedded SVG
>
> http://www.carto.net/papers/svg/us_population/us_population.pdf
>
>can be viewed with Acrobat Reader 6.x.
>
>Is it possible to create such PDF file with pdftex?
>
>Any hints?
>
>
I picked up that file and it seems that there is some new annotation
subtype svg. So, once we can reverse engineer its characteristics it's
trivial for pdftex to do the same. The danger is in changing specs.
\def\SVGimage#1#2#3% name width height
{\immediate \pdfobj {(#1)}%
\edef\SVGname{\the\pdflastobj\space0 R }%
\immediate \pdfobj stream attr {/Type /EmbeddedFile
/Subtype/image#232Fsvg#232Bxml} file {#1}%
\edef\SVGfile{\the\pdflastobj\space0 R }%
\immediate \pdfobj {<</Type/Filespec /F \SVGname /EF <</F \SVGfile>>
>>}%
\edef\SVGspec{\the\pdflastobj\space0 R }%
\vbox to #3{\vss\hbox to #2{\pdfannot width #2 height #3
{/F 4
/H /P
/Type /Annot
/FT /Btn
/Resources <</Names[\SVGname \SVGspec]>>
/Subtype /SVG
/T \SVGname
/Ff 65536
/TU \SVGname
% /MK << /BG [1 1 1] /CA (Play) >>
/StartResource \SVGname}\hss}}}
SVG image: \vskip1cm \SVGimage{ausmap.svg}{10cm}{10cm}
So te big question is: what are the formal specs (some mix between
native SVG annots and buttons and resources; smells messy; i'd expect
svg to be supported by the new multimedia features) -)
Hans
-----------------------------------------------------------------
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