xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: need a sample on usage of afp:include-page-segment tag
Date Thu, 09 Apr 2009 07:07:29 GMT
Hi Sree,

I guess that extension can be a bit confusing. I assume you've seen the
documentation here:

Anyway, AFP page segments in FOP don't work like any other images
(unfortunately). Basically, you have to have a normal bitmap or vector image
(PNG, JPEG, SVG....) that serves as provider for the intrinsic size of
the image which FOP needs for layout. FOP cannot currently extract the
intrinsic size of a page segment directly from the resource. Instead you
basically define a place-holder using some other image (you may have to
set the dimensions explicitely using the width and height properties on
the fo:external-graphic) and the AFP output will then replace the
placeholder image with an invocation of the page segment whenever it
encounters the URI that was used in the afp-page-segment extension.
Please note that the page segment itself will not be embedded in the
output file but is required to be present on the target platform. Surely,
there is room for improvement here.

I've attached a minimal example that demonstrates the extension.


On 09.04.2009 06:41:08 sreenaresh gopu wrote:
> Hello,
> Can someone please provide me with a sample fo file on how to use AFP Page
> segment extension (afp:include-page-segment tag).  Basically I am using FOP
> version .95 and am trying to develop alternative ways of printing PSEG/AFP
> documents.  We have lot of .psg files that are embeded in AFP document using
> XML as datasource for documents.  currently we parse the XML using brute
> COBOL (this was developed in 2000) and create AFP steams.  Now we are
> looking for other options and would like to replace COBOL with java
> processing and onto windows or linux platform.
> Thanks
> Sree

Jeremias Maerki

View raw message