You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Imran Khan <im...@daffodildb.com> on 2006/12/11 12:17:11 UTC

Problem with FOP-0.20.5 -watermark position

Hi All,

I am using FOP-0.20.5 for xml to pdf conversion.
I am facing problem while creating a watermark. For creating a watermark i
am using background property of a block .
Now problem is that i want the image as the background place centrally. But
when i use background-position="center" it does not work
.I also have tested with background-position-horizontal,
background-position-vertical but everything goes in vain.


Plz help me to make the image  or any work as a background , or watermark

Thanks
Imran

Re: Problem with FOP-0.20.5 -watermark position

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Imran Khan wrote:
> Is it possible to place an image centrally in page as a watermark using FOP
> 0.92 beta version?

The 0.92 release supports background placement in general. The
compliance page at
  http://xmlgraphics.apache.org/fop/compliance.html
lists background-position-horizontal and background-position-vertical
as supported.

J.Pietschmann

Re: Problem with FOP-0.20.5 -watermark position

Posted by Imran Khan <im...@daffodildb.com>.
Hi,

Is it possible to place an image centrally in page as a watermark using FOP
0.92 beta version?

At present i am using FOP 0.20.5 which does not allow the same.

Thanks,
Imran

On 12/12/06, Imran Khan <im...@daffodildb.com> wrote:
>
> Thanks J.Pietschmann
>
>
> On 12/12/06, J.Pietschmann <j3...@yahoo.de> wrote:
> >
> > Imran Khan wrote:
> > > I am using FOP-0.20.5 for xml to pdf conversion.
> > > I am facing problem while creating a watermark. For creating a
> > watermark i
> > > am using background property of a block .
> > > Now problem is that i want the image as the background place
> > centrally. But
> > > when i use background-position="center" it does not work
> > > .I also have tested with background-position-horizontal,
> > > background-position-vertical but everything goes in vain.
> >
> > FOP 0.20.5 doesn't support positioning background images well
> > (the image is scaled to fit the whole area, which should look
> > like a centered position in most cases).
> >
> > Also, 0.20.5 is no longer maintained. Please try a more recent
> > release.
> >
> > J.Pietschmann
> >
>
>

Re: Problem with FOP-0.20.5 -watermark position

Posted by Imran Khan <im...@daffodildb.com>.
Thanks J.Pietschmann


On 12/12/06, J.Pietschmann <j3...@yahoo.de> wrote:
>
> Imran Khan wrote:
> > I am using FOP-0.20.5 for xml to pdf conversion.
> > I am facing problem while creating a watermark. For creating a watermark
> i
> > am using background property of a block .
> > Now problem is that i want the image as the background place centrally.
> But
> > when i use background-position="center" it does not work
> > .I also have tested with background-position-horizontal,
> > background-position-vertical but everything goes in vain.
>
> FOP 0.20.5 doesn't support positioning background images well
> (the image is scaled to fit the whole area, which should look
> like a centered position in most cases).
>
> Also, 0.20.5 is no longer maintained. Please try a more recent
> release.
>
> J.Pietschmann
>

Re: Need some help on one particular FOTreeBuilder URI mismatch warning (v0.92beta)

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Well, you need to make sure you generate the nodes in a namespace-aware
fashion. Obviously, that doesn't happen in your Xalan extension. Just
specifying the "fo:" prefix on every element isn't enough.

Would you please post questions like that to fop-users in the future?
Thank you.

On 15.12.2006 14:07:52 Andrejus Chaliapinas wrote:
> Hi,
> 
> I'm trying to process XML file by applying XSl stylesheet to it and using
> such constraint inside that XSL:
> 
> <xsl:copy-of select="xalan:nodeset(ext:generateDynamicNodes())" />
> 
> My Java method generateDynamicNodes by itself generates NodeList
> understandable by xalan in form like <fo:block>...</fo:block>.
> 
> Now when I run everything together during transformation I get this warning:
> 
> org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:
> 373) WARN: Mismatch: block (http://www.w3.org/1999/XSL/Format) vs. block ()
> 
> Where should I additionally specify that URI to match?
> 
> I've tried this syntax as well without any luck:
> 
> <xsl:copy-of xmlns:fo="http://www.w3.org/1999/XSL/Format"
> select="xalan:nodeset(ext:generateDynamicNodes())" />
> 
> Any help would be appreciated.
> 
> Andrejus



Jeremias Maerki


Need some help on one particular FOTreeBuilder URI mismatch warning (v0.92beta)

Posted by Andrejus Chaliapinas <a....@infosana.com>.
Hi,

I'm trying to process XML file by applying XSl stylesheet to it and using
such constraint inside that XSL:

<xsl:copy-of select="xalan:nodeset(ext:generateDynamicNodes())" />

My Java method generateDynamicNodes by itself generates NodeList
understandable by xalan in form like <fo:block>...</fo:block>.

Now when I run everything together during transformation I get this warning:

org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:
373) WARN: Mismatch: block (http://www.w3.org/1999/XSL/Format) vs. block ()

Where should I additionally specify that URI to match?

I've tried this syntax as well without any luck:

<xsl:copy-of xmlns:fo="http://www.w3.org/1999/XSL/Format"
select="xalan:nodeset(ext:generateDynamicNodes())" />

Any help would be appreciated.

Andrejus


Re: Could I prepare font metrics file for a font like Webdings (i.e. without Unicode cmap table inside)?

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Webdings.ttf defines a Symbol encoding (platform 3, encoding 0). Our
current code doesn't support that. Patches welcome.

OpenType spec: http://www.microsoft.com/OpenType/OTSpec/

The only other options that come to mind are:
- Convert webdings.tff to a Type 1 font somehow.
- Create SVG images from the glyphs you need.

On 13.12.2006 10:22:21 Andrejus Chaliapinas wrote:
> > > When I run TTFReader (from 0.92 beta) over Webdings.ttf - I get this
> > output:
> > >
> > > Parsing font...
> > > Reading c:\windows\fonts\webdings.ttf...
> > > Number of glyphs in font: 227
> > > 2 cmap tables
> > > Unicode cmap table not present
> > > Unsupported format: Aborting
> > >
> > > Question - is it possible then to prepare metrics file for this font as
> > well
> > > in the same way as for let say Arial?
> > 
> > You can try to use the "-enc ansi" switch and see if it helps.
> 
> Same result :( Any other thoughts?
> 
> Andrejus



Jeremias Maerki


RE: Could I prepare font metrics file for a font like Webdings (i.e. without Unicode cmap table inside)?

Posted by Andrejus Chaliapinas <a....@infosana.com>.
> > When I run TTFReader (from 0.92 beta) over Webdings.ttf - I get this
> output:
> >
> > Parsing font...
> > Reading c:\windows\fonts\webdings.ttf...
> > Number of glyphs in font: 227
> > 2 cmap tables
> > Unicode cmap table not present
> > Unsupported format: Aborting
> >
> > Question - is it possible then to prepare metrics file for this font as
> well
> > in the same way as for let say Arial?
> 
> You can try to use the "-enc ansi" switch and see if it helps.

Same result :( Any other thoughts?

Andrejus


Re: Could I prepare font metrics file for a font like Webdings (i.e. without Unicode cmap table inside)?

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Andrejus Chaliapinas wrote:
> When I run TTFReader (from 0.92 beta) over Webdings.ttf - I get this output:
> 
> Parsing font...
> Reading c:\windows\fonts\webdings.ttf...
> Number of glyphs in font: 227
> 2 cmap tables
> Unicode cmap table not present
> Unsupported format: Aborting
> 
> Question - is it possible then to prepare metrics file for this font as well
> in the same way as for let say Arial?

You can try to use the "-enc ansi" switch and see if it helps.

J.Pietschmann

Could I prepare font metrics file for a font like Webdings (i.e. without Unicode cmap table inside)?

Posted by Andrejus Chaliapinas <a....@infosana.com>.
Hi,

When I run TTFReader (from 0.92 beta) over Webdings.ttf - I get this output:

Parsing font...
Reading c:\windows\fonts\webdings.ttf...
Number of glyphs in font: 227
2 cmap tables
Unicode cmap table not present
Unsupported format: Aborting

Question - is it possible then to prepare metrics file for this font as well
in the same way as for let say Arial?

Regards,
Andrejus


Re: Problem with FOP-0.20.5 -watermark position

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Imran Khan wrote:
> I am using FOP-0.20.5 for xml to pdf conversion.
> I am facing problem while creating a watermark. For creating a watermark i
> am using background property of a block .
> Now problem is that i want the image as the background place centrally. But
> when i use background-position="center" it does not work
> .I also have tested with background-position-horizontal,
> background-position-vertical but everything goes in vain.

FOP 0.20.5 doesn't support positioning background images well
(the image is scaled to fit the whole area, which should look
like a centered position in most cases).

Also, 0.20.5 is no longer maintained. Please try a more recent
release.

J.Pietschmann