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

Re: use svg in xslfo to generate pdf

Expand Messages
  • minou_girl2005
    i use windows 2000,i run FOP with java class. the execution interrupts and exits. I use version FOP 0.20.5 and there is the Batik jar in the FOP. ... your ...
    Message 1 of 9 , May 2, 2005
    • 0 Attachment
      i use windows 2000,i run FOP with java class.
      the execution interrupts and exits.
      I use version FOP 0.20.5 and there is the Batik jar in the FOP.



      --- In XSL-FO@yahoogroups.com, Mike Trotman <mike.trotman@d...> wrote:
      > FOP 'can' process svg.
      > So - if you get an error there is most likely something wrong with
      your
      > installation.
      >
      > What platform / OS are you using
      > and how are you running FOP?
      > (are you using the supplied script to run it from the command line?)
      >
      > What is the error message?
      >
      > What version of FOP are you using.
      > If not 0.20.5 - then change to 0.20.5.)
      >
      > Also - FOP requires BATIK to process SVG.
      > It is possible that batik.jar is not on your classpath.
      > (It is supplied with FOP - and should be found OK.)
      >
      > Mike
      >
      > minou_girl2005 wrote:
      >
      > >But this example not work in my pc.
      > >When i write <svg:svg>,an error appears and the execution
      interrupts.
      > >i use jdk 1.3 and FOP.
      > >svg code can not be supported by the application.
      > >where is the problem??
      > >
      > >
      > >
      > >
      > >
      > >--- In XSL-FO@yahoogroups.com, "arianhojat2000"
      <arianhojat2000@y...>
      > >wrote:
      > >
      > >
      > >>well first reference the svg namespace at root of fop document so
      > >>
      > >>
      > >it
      > >
      > >
      > >>understand svg elements...
      > >>
      > >>
      > >><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
      > >>xmlns:svg="http://www.w3.org/2000/svg" >
      > >>....
      > >>....
      > >>then when u want to actually make an image.... for example a
      circle
      > >>somewhere in the document...
      > >><fo:block>
      > >>normal text.
      > >>normal text.
      > >>normal text.
      > >>normal text.
      > >>normal text.
      > >>normal text... now svg content...
      > >> <fo:instream-foreign-object>
      > >> <svg:svg width="10pt" height="10pt">
      > >> <svg:circle cx="5pt" cy="5pt" r="4pt"
      > >>
      > >>
      > >style="stroke:black;
      > >
      > >
      > >>fill:none;"/>
      > >> </svg:svg>
      > >> </fo:instream-foreign-object>
      > >>
      > >>
      > >></fo:block>
      > >>....
      > >>
      > >>
      > >>hope that helped,
      > >>Arian
      > >>--- In XSL-FO@yahoogroups.com, "minou_girl2005"
      > >>
      > >>
      >
      >
      >
      > --
      > No virus found in this outgoing message.
      > Checked by AVG Anti-Virus.
      > Version: 7.0.308 / Virus Database: 266.11.0 - Release Date:
      29/04/2005
    • arianhojat2000
      simple example: run this... command prompt fop -fo example.fo -pdf example.pdf pdf file has svg in it? example.fo is...
      Message 2 of 9 , May 2, 2005
      • 0 Attachment
        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>
      • minou_girl2005
        I use a class java to generate pdf,and your example can not work. when i put a code svg,the execution interrupts. can you give me please more inforamations
        Message 3 of 9 , May 3, 2005
        • 0 Attachment
          I use a class java to generate pdf,and your example can not work.
          when i put a code svg,the execution interrupts.
          can you give me please more inforamations about Batik???
          i think the problem is with Batik.
          thank you






          --- In XSL-FO@yahoogroups.com, "arianhojat2000" <arianhojat2000@y...>
          wrote:
          > 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>
        • J.Pietschmann
          ... It would help if you described the problem in more detail. Cut&paste the console output might be a good start. J.Pietschmann
          Message 4 of 9 , May 3, 2005
          • 0 Attachment
            minou_girl2005 wrote:
            > I use a class java to generate pdf,and your example can not work.
            > when i put a code svg,the execution interrupts.

            It would help if you described the problem in more detail. Cut&paste
            the console output might be a good start.

            J.Pietschmann
          • bg34342002
            Did you follow these instructions: http://xml.apache.org/fop/graphics.html#batik ...
            Message 5 of 9 , May 6, 2005
            • 0 Attachment
              Did you follow these instructions:
              http://xml.apache.org/fop/graphics.html#batik


              --- In XSL-FO@yahoogroups.com, "minou_girl2005"
              <minou_girl2005@y...> wrote:
              > I use a class java to generate pdf,and your example can not work.
              > when i put a code svg,the execution interrupts.
              > can you give me please more inforamations about Batik???
              > i think the problem is with Batik.
              > thank you
              >
              >
              >
              >
              >
              >
              > --- In XSL-FO@yahoogroups.com, "arianhojat2000"
              <arianhojat2000@y...>
              > wrote:
              > > 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>
            Your message has been successfully submitted and would be delivered to recipients shortly.