Loading ...
Sorry, an error occurred while loading the content.

6470Re: use svg in xslfo to generate pdf

Expand Messages
  • arianhojat2000
    May 2 10:19 AM
      simple example:
      run this...
      command prompt> fop -fo example.fo -pdf example.pdf

      pdf file has svg in it?

      example.fo is...


      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" >
      <fo:layout-master-set>
      <fo:simple-page-master master-name="simple">
      <fo:region-body/>
      </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="simple">
      <fo:flow flow-name="xsl-region-body">
      <fo:block>

      <fo:instream-foreign-object>
      <svg:svg width="100pt" height="100pt"
      xmlns:svg="http://www.w3.org/2000/svg" >
      <svg:circle cx="50pt" cy="50pt"
      r="30pt" style="fill:blue;"/>
      </svg:svg>
      </fo:instream-foreign-object>


      <fo:instream-foreign-object>
      <svg:svg width="100pt" height="100pt"
      xmlns:svg="http://www.w3.org/2000/svg" >
      <svg:rect x="50pt" y="50pt"
      width="100pt" height="100pt" style="fill:blue;"/>
      </svg:svg>
      </fo:instream-foreign-object>

      </fo:block>
      </fo:flow>
      </fo:page-sequence>
      </fo:root>
    • Show all 9 messages in this topic