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: <fo:inline> causes text placement issues with AFP
Date Mon, 26 Apr 2010 12:17:37 GMT
Olov, I think that's an old bug in FOP 0.95 which has already been fixed
in Trunk. At least, I can only reproduce this with FOP 0.95 but not with
FOP Trunk. So you may want to download the latest source code and try
that. HTH

On 23.04.2010 18:11:39 Olov Häggström wrote:
> Hi,
> 
> I am using FOP Trunk to generate PDF:s and AFP:s. The idea is to generate the
> FO-file from an XSL stylesheet and an XML and then generate the PDF. After the
> PDF is generated, custom afp-extension tags will be added to the FO-file and an
> AFP-file will be generated from the modified FO-file. The XSL-stylesheet
> contains conditional texts and dynamic data. This means that a lot of different
> <fo:inline> tags are created. This is not an issue with the PDF-output format,
> however when I render an AFP, it is. When generating AFP-files the last few
> characters of the previous inline-text are overwritten. This doesn't happen
> every time, but always for dynamic data and conditional texts.
> 
> I have created my own raster fonts for the AFP file generation. I recall an old
> (about a year old) mail-thread involving Jeremias discussing using fonts not
> included in the base-14 set included in FOP. Therefore, I have tried to generate
> the file below using standard base-14 config and my custom config. The result is
> the same.
> 
> <!--Start Fo-example-->
> <?xml version="1.0" encoding="UTF-8"?>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <fo:layout-master-set>
> <fo:simple-page-master master-name="page-master-175389712" margin-left="0.60in"
> margin-right="0.60in" page-height="11in" page-width="8.50in">
> <fo:region-body margin-top="0.79in" margin-bottom="0.79in" column-count="1"
> column-gap="0.50in"/>
> </fo:simple-page-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="page-master-175389712"
> initial-page-number="auto" format="1">
> <fo:flow flow-name="xsl-region-body">
> <fo:block>
> <fo:inline>Testing multiple consecutive inlines. </fo:inline>
> <fo:inline>Testing multiple consecutive inlines. </fo:inline>
> <fo:inline>Testing multiple consecutive inlines. </fo:inline>
> <fo:inline>Testing multiple consecutive inlines. </fo:inline>
> <fo:inline>Testing multiple consecutive inlines. </fo:inline>
> <fo:inline>Testing multiple consecutive inlines. </fo:inline>
> <fo:inline>12 2134567 1234 123 123 masim  asidjashdj a asjdhnakjsnd jasnd
> akjsndaksjdn naksdjnasjdn as naksjn daksjn dasjn aksjn aksjn aksjnsdasd nakasdas
> jasndaksndksajnd. </fo:inline>
> <fo:inline>12345 12 12 1234 123 12 1234 123456 aksdlasd. </fo:inline>
> <fo:block/>
> <fo:inline font-size="10pt">12 213 123 12 12345 1234567 12345678910 123456
> 123456 123 123456789101 1 123456.</fo:inline>
> <fo:inline font-size="10pt">S23456 12345 123456 123 12345 12 1234567890,
> 1234567890 12345678 12345678. 12345 12345678 123.123456789101112121212.12. 12
> 12345678 12 123 1234 1234 123456789101 123 12345678 (12 123456789 12 12345 1234)
> 123 12345 12345 123456789101112.</fo:inline>
> </fo:block>
> <fo:block id="SV_RefID_PageTotal"/>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
> <!--End Fo-example-->
> 
> 
> In the above example the last inline-tag (with text starting with S) produces
> the error when generating AFP. PDF is fine.
> 
> <fo:block text-align="center"> fixes the issue for this specific file. However,
> i need left aligned texts
> 
> To omit the font-size or using a table to set the font-size also seems to fix
> the trouble. This is however hard to do, since we are using a stylesheet tool
> and not programming the XSL:s directly.
> 
> Questions:
> 1. Is this a known issue with the AFP-renderer?
> 2. Could it be a bug with the font-loaders? I haven't had time to check the
> code, but I will do. Since the issue seems to be less recurring when setting a
> "global" font name and size, could it have to do with this?
> 3. Has anyone else encountered this problem? Is there any nice workaround?
> 
> 
> 



Jeremias Maerki


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


Mime
View raw message