opensubscriber
   Find in this group all groups
 
Unknown more information…

f : fop-users@xmlgraphics.apache.org 10 September 2009 • 7:58AM -0400

Re: Inline images in fop
by sreenaresh gopu

REPLY TO AUTHOR
 
REPLY TO GROUP




Hi Jpee,

We are currently implementing the same concept with 0.95 that you are trying
to implement, after a long research and trials I came up with following
solution

<fo:block-container *width="153.72mm" height="27.23mm"*>
     <fo:block-container text-align="left" position="absolute">
         <fo:block>
                 <fo:external-graphic
src="url('file:///D:/jpg//image.jpg')"/>
         </fo:block>
     </fo:block-container>
     <fo:block-container position="absolute">
          <fo:block *start-indent="0mm" padding-top="7.5mm"*>
                  Text
          </fo:block>
     </fo:block-container>
</fo:block-container>

The width and height values are of the image to define the block-container
size.  The key here is overlaying the two block-containers using
position="absolute" inside a block-container.  I used the start-indent and
padding-top to place the text as per our requirements.

Hope this example gives you a direction.

Regards
Sreenaresh Gopu

On Wed, Sep 9, 2009 at 4:40 AM, JPee <perlet@soft...> wrote:

>
>
> Venkat Reddy-7 wrote:
> >
> > Hi JPee,
> >
> > As I understood, you are trying to produce something like this:
> >
> > [ The Image <<image.jpg>> will be used as a corporate logo]
> >
> > but you are getting
> >
> > [The Image
> >     <<image.jpg>>
> >  will be used as a corporate logo]
> >
> > Is that correct?
> >
> > Can you please include your sample FO file?
> >
> > Thanks,
> > Venkat.
> >
>
> Hi to post sample Code is a little bit difficult, because its embedded in a
> CMS and i use patterns. The text is stored with linebreaks images etc. in
> the db. I define the pattern for the image. But what u wrote is correct and
> my problem.
>
> So when i generate the PDF the structure is like this:
> <fo:block fonts...>
>   <fo:block>paragraphtext 1<fo:block>
>   <fo:block>paragrahptext with image<fo:external-image src=".." widht=""
> height="" content-height="scale-to-fit" width="scale-to-fit">...text goes
> on</fo:block>
> </fo:block>
>
> I also tried with fo:inline around the image.
>
> Greetings,
>
> JPee.
>
> --
> View this message in context:
> http://www.nabble.com/Inline-images-in-fop-tp25362645p25363179.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlg...
> For additional commands, e-mail: fop-users-help@xmlg...
>
>

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.