xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olov Häggström <olov.haggst...@netresult.se>
Subject Re: &lt;fo:inline&gt; causes text placement issues with AFP
Date Mon, 26 Apr 2010 17:02:20 GMT
Thanks for your reply Jeremias!

> 
> 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
> 

That is strange. The latest update I did was earlier today, this did not fix 
the problem. I guess that my first checkout (about a month ago) included that
bugfix. Is there a bugzilla ref somewhere? 

<sidetrack>
I found this: https://issues.apache.org/bugzilla/show_bug.cgi?id=48329 but that
didn't seem right. From my, beginner, perspective it seems to be on the same
line of issue though. However, even if it is in status "new" I couldn't
reproduce it.
</sidetrack>

Could this be font related? I've added some screenshot links to show the
different behaviours depending on my font config.

http://img689.imageshack.us/img689/1609/withspacenofontconfig.jpg
http://img706.imageshack.us/img706/7717/withoutspaceownfonts.jpg
http://img96.imageshack.us/img96/668/withspaceownfonts.jpg
http://img689.imageshack.us/img689/1520/withoutspacenofontconfi.jpg

The file names tries to be self explanatory. "withspace" is showing that I
added a space as part of the last in-line before the inline starting with "S" 
in the fo-example. "nofontconfig" means I am using a configuration file that
doesn't have any font configuration, that should mean the standard base-14 font
should be used i.e. Helvetica (?). "ownfonts" means that the file was created
with my self-created raster fonts.

I am using the CRE-DO AFP-lookup professional 2.5.3 viewer, and the screenshots
are from that program. I've also tried some other viewers. The behaviour is
about the same. What viewer are you using? Did your generation of the files 
look the same?

When I tried in fop 0.95 the problem looked worse. Let me know if there are any
screenshots needed for that "session".

Another thing I might add is that the row width seems to be calculated
correctly, when I justified the text in the original file (where I found the
issue in the first place) the text alignment was perfect, but the start of a 
new in-line tag still moved the text to start like in 
"withoutspaceownfonts.jpg"

Any help is greatly appreciated!


//Olov

> 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