Re: Transparent Text



Thank you, I was beginning to come to that conclusion.

I haven't tried SVG. Do you happen to know if text rendered by SVG rendered text would be searchable and selectable as text in the PDF?

In the meantime I have hit on the expedient solution of rendering the text underneath the image. It is still searchable and selectable there, but invisible.

Thanks again

Duncan

On 27 Feb 2009, at 14:56, Jeremias Maerki wrote:

If I'm not mistaken, XSL-FO doesn't provide anything to do transparent
text. The only thing you can do is "white on white". For text with
transparency you'd have to look towards SVG with its opacity attributes.
FOP/Batik can handle those but I haven't checked what exactly happens if
you have an opacity of 0 (there's a risk that it might be "optimized"
away). It would be great if you could report back if that works once
you've tried it.

On 27.02.2009 15:11:02 Duncan McGregor wrote:
Thanks for the swift response Paul.

I don't know if I explained this well. What I want is for the text's
_foreground_ colour (hey, just realised you must be a Brit) to be
fully transparent. That way it will not display when overlaid on the
background image, but will still be searchable and selectable.
Transparent block background seems to be the default, but I only seem
to have 3 rgb channels of foreground

<fo:block-container left='26.4px' position='absolute'
top='252.48px'>
<fo:block font-size='8.16px' color='rgb(255, 0, 0)'>
subject to credit status. lf you are not accepted lor a
credit
account, you will not be entitled to claim your
</fo:block>
</fo:block-container>

Cheers

Duncan


On 27 Feb 2009, at 12:16, paul womack wrote:

Duncan McGregor wrote:
Hi
I'm trying to work out how to write transparent text to overlay OCR
r> data on top of its source image.
I've seen it done in PDFs, but cannot find how to represent
transparency in xsl:fo
Thanks in anticipation

Text is set in the foreground colour, and has no background colour
per se.

What might be loosely termed "opaque text" is merely text upon (and
in)
a coloured box (which has a colour, which we might term background
colour)

If the text you wish to be "transparent" is in a box, it is the box's
colour you need to suppress - so if you've been looking
in the text control parameters, you may well have missed it.




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: fop-users-help@xxxxxxxxxxxxxxxxxxxxxx



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: fop-users-help@xxxxxxxxxxxxxxxxxxxxxx



Privacy