You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by JPee <pe...@softwareforen.de> on 2009/09/09 13:02:47 UTC

Inline images in fop

Hi,

I'm working with fop integrated in a CMS. I need a solution like this:

<text-flow.....
<image>...text-flow...
...text-flow>

The text-flow is one string, the image should be inside the text and the
text should flow around the image.

I tried this:

<fo:block> text.... <fo:external-graphic ...> </fo:block> but the result
looks like this:

<text-flow
<image>
...text-flow>

any ideas how to fix it without using tables?

Greetings JPee
-- 
View this message in context: http://www.nabble.com/Inline-images-in-fop-tp25362645p25362645.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Inline images in fop

Posted by sreenaresh gopu <sr...@gmail.com>.
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 <pe...@softwareforen.de> 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@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

Re: Inline images in fop

Posted by JPee <pe...@softwareforen.de>.

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@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Inline images in fop

Posted by Venkat Reddy <va...@googlemail.com>.
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.


JPee wrote:
> Hi,
>
> I'm working with fop integrated in a CMS. I need a solution like this:
>
> <text-flow.....
> <image>...text-flow...
> ...text-flow>
>
> The text-flow is one string, the image should be inside the text and the
> text should flow around the image.
>
> I tried this:
>
> <fo:block> text.... <fo:external-graphic ...> </fo:block> but the result
> looks like this:
>
> <text-flow
> <image>
> ...text-flow>
>
> any ideas how to fix it without using tables?
>
> Greetings JPee
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


AW: Inline images in fop

Posted by Georg Datterl <ge...@geneon.de>.
Hi Jpee, 

What you need is an implementation of fo:float. Which is not currently part of fop. But if you implement it, I know some people here, who would be happy.

Regards,
 
Georg Datterl
 
------ Kontakt ------
 
Georg Datterl
 
Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg
 
HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert 

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20
 
www.geneon.de
 
Weitere Mitglieder der Willmy MediaGroup:
 
IRS Integrated Realization Services GmbH:    www.irs-nbg.de 
Willmy PrintMedia GmbH:                            www.willmy.de
Willmy Consult & Content GmbH:                 www.willmycc.de 
-----Ursprüngliche Nachricht-----
Von: JPee [mailto:perlet@softwareforen.de] 
Gesendet: Mittwoch, 9. September 2009 13:03
An: fop-users@xmlgraphics.apache.org
Betreff: Inline images in fop


Hi,

I'm working with fop integrated in a CMS. I need a solution like this:

<text-flow.....
<image>...text-flow...
...text-flow>

The text-flow is one string, the image should be inside the text and the text should flow around the image.

I tried this:

<fo:block> text.... <fo:external-graphic ...> </fo:block> but the result looks like this:

<text-flow
<image>
...text-flow>

any ideas how to fix it without using tables?

Greetings JPee
--
View this message in context: http://www.nabble.com/Inline-images-in-fop-tp25362645p25362645.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org