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

How to insert a graphic directly from a database?

Expand Messages
  • Jean-Michel Raclet
    Hello, I m new to fop and I m using fop 0.20.5 with java 1.3.1. Inserting PNG or JPEG graphics from a file works fine:
    Message 1 of 3 , Oct 6, 2004
    • 0 Attachment
      Hello,

      I'm new to fop and I'm using fop 0.20.5 with java 1.3.1.
      Inserting PNG or JPEG graphics from a file works fine:

      <fo:block>
      <fo:external-graphic src="myImage.png"/>
      </fo:block>

      But what I would like to do is to read the graphic directly from the
      database (saved as BLOB) and insert this graphic in fo, without saving the
      file to a
      filesystem.
      Is it possible after reading the graphic from the database as an
      InputStream, to insert this InputStream in fo using <fo:external-graphic
      .../> or another fo tag?

      I'm searching the web and reading news groups for a few days without
      success. Thus I hope you can help me with this issue.
      Thanks.

      J-Michel
    • Jirka Kosek
      ... This is possible with XEP. It supports data pseudoprotocol and you can insert base64 encoded image data directly into src attribute. AFAIK FOP doesn t
      Message 2 of 3 , Oct 7, 2004
      • 0 Attachment
        Jean-Michel Raclet wrote:

        > <fo:block>
        > <fo:external-graphic src="myImage.png"/>
        > </fo:block>
        >
        > But what I would like to do is to read the graphic directly from the
        > database (saved as BLOB) and insert this graphic in fo, without saving the
        > file to a
        > filesystem.
        > Is it possible after reading the graphic from the database as an
        > InputStream, to insert this InputStream in fo using <fo:external-graphic
        > .../> or another fo tag?

        This is possible with XEP. It supports data pseudoprotocol and you can
        insert base64 encoded image data directly into src attribute. AFAIK FOP
        doesn't support this.

        Jirka

        --
        ------------------------------------------------------------------
        Jirka Kosek e-mail: jirka@... http://www.kosek.cz
        ------------------------------------------------------------------
        Profesion�ln� �kolen� a poradenstv� v oblasti technologi� XML.
        Pod�vejte se na n�� nov� spu�t�n� web http://DocBook.cz
        Podrobn� p�ehled �kolen� http://xmlguru.cz/skoleni/
        ------------------------------------------------------------------


        [Non-text portions of this message have been removed]
      • Jean-Michel Raclet
        Thanks a lot for your help. I ll either use XEP or convert the chart read from the database to SVG and then insert SVG into FOP. J-Michel ... the
        Message 3 of 3 , Oct 11, 2004
        • 0 Attachment
          Thanks a lot for your help.
          I'll either use XEP or convert the chart read from the database to SVG and
          then insert SVG into FOP.

          J-Michel



          >
          > Jean-Michel Raclet wrote:
          >
          > > <fo:block>
          > > <fo:external-graphic src="myImage.png"/>
          > > </fo:block>
          > >
          > > But what I would like to do is to read the graphic directly from the
          > > database (saved as BLOB) and insert this graphic in fo, without saving
          the
          > > file to a
          > > filesystem.
          > > Is it possible after reading the graphic from the database as an
          > > InputStream, to insert this InputStream in fo using <fo:external-graphic
          > > .../> or another fo tag?
          >
          > This is possible with XEP. It supports data pseudoprotocol and you can
          > insert base64 encoded image data directly into src attribute. AFAIK FOP
          > doesn't support this.
          >
          > Jirka
          >
          > --
          > ------------------------------------------------------------------
          > Jirka Kosek e-mail: jirka@... http://www.kosek.cz
          > ------------------------------------------------------------------
          > Profesionální ¹kolení a poradenství v oblasti technologií XML.
          > Podívejte se na ná¹ novì spu¹tìný web http://DocBook.cz
          > Podrobný pøehled ¹kolení http://xmlguru.cz/skoleni/
          > ------------------------------------------------------------------
          >
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.