|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
PDF rendering problem with image nested in fo:block inside multiple fo:inlineHello,
I have a PDF rendering problem using FOP 0.95. It occurs with a fo:external-graphic nested inside of a fo:block that is itself nested inside at least two fo:inline elements. See the attached "good.pdf" output for what I would expect and the "bad.pdf" output for what actually happens. The "test.fo.xml" file is a XML-FO example file that will produce the bad rendering. Notice that removing either the fo:block or the second fo:inline element will fix the problem. I know that this is rather weird formatting to begin with, but unfortunately I have no easy way to prevent it from being generated this way. I'm wondering if this may be fixed on the trunk or if someone can suggest a work around. Thank you, - Frank <?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 page-width="8.5in" page-height="11in" master-name="default-page"> <fo:region-body margin="0.4in"/> </fo:simple-page-master> <fo:page-sequence-master master-name="document"> <fo:repeatable-page-master-reference master-reference="default-page"/> </fo:page-sequence-master> </fo:layout-master-set> <fo:page-sequence master-reference="document"> <fo:flow flow-name="xsl-region-body"> <fo:block> <fo:block> <fo:inline> This is some text above. </fo:inline> </fo:block> <fo:block> <fo:inline> <fo:inline> <!-- Removing this extra fo:inline fixes the problem. --> <fo:block> <!-- Removing this fo:block also fixes the problem. --> <fo:external-graphic src="image.jpg" content-width="50%" content-height="50%"/> </fo:block> </fo:inline> </fo:inline> </fo:block> <fo:block> <fo:inline> This is some text below. </fo:inline> </fo:block> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: PDF rendering problem with image nested in fo:block inside multiple fo:inlineOn 24 Jun 2009, at 08:07, Frank Worsley wrote:
Hi First of all: apologies for the rather late reply. Just noticed that this post had not been answered... > <snip /> > Notice that removing either the fo:block or the second fo:inline > element will fix the problem. > > I know that this is rather weird formatting to begin with, but > unfortunately I have no easy way to prevent it from being generated > this way. I'm wondering if this may be fixed on the trunk or if > someone can suggest a work around. Bad news: current trunk still has the same issue, which is definitely a bug. If you want, please attach the files to a Bugzilla report, so we don't lose track of it, and you will be kept informed about the status. Thanks! Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: PDF rendering problem with image nested in fo:block inside multiple fo:inlineAndreas Delmelle <andreas.delmelle <at> telenet.be> writes:
> Bad news: current trunk still has the same issue, which is definitely > a bug. > If you want, please attach the files to a Bugzilla report, so we don't > lose track of it, and you will be kept informed about the status. Hi Andreas, Thank you for your reply. I've added a bug report: https://issues.apache.org/bugzilla/show_bug.cgi?id=47430 Do you think this will be easy to fix? If yes, can you point me in a general direction in the code base? I might try and fix it myself. Cheers, - Frank --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: PDF rendering problem with image nested in fo:block inside multiple fo:inlineOn 25 Jun 2009, at 19:19, Frank Worsley wrote:
Hi Frank > Andreas Delmelle <andreas.delmelle <at> telenet.be> writes: > >> Bad news: current trunk still has the same issue, which is definitely >> a bug. >> If you want, please attach the files to a Bugzilla report, so we >> don't >> lose track of it, and you will be kept informed about the status. > > Thank you for your reply. I've added a bug report: > > https://issues.apache.org/bugzilla/show_bug.cgi?id=47430 Splendid! Thanks. > Do you think this will be easy to fix? If yes, can you point me in a > general > direction in the code base? I might try and fix it myself. As always: that depends on what you call easy... :-) It would require a general understanding of the Knuth/TeX algorithm for line-breaking[*], and specifically, the way inline-blocks are implemented in FOP. It may be a side-effect of a more general issue with inline-block content, since I know for a fact that FOP trunk also has trouble with tables if they appear as descendants of fo:inlines. You will probably need to dive into the code in org.apache.fop.layoutmgr.inline.InlineLayoutManager, and debug this to get an understanding of what precisely happens there (or more to the point: what precisely does NOT happen). If you need assistance with setting up FOP in an IDE, we have step-by-step Wiki pages for Netbeans, Eclipse and IntelliJ [**] If I were to have a go at this myself, I'd have to start by debugging both cases, with and without inlines, to see what the exact difference is between the two. Finally, and perhaps most importantly: if you're serious about taking this on, I invite you to subscribe to fop-dev@, if you have not done so, and follow up there (as this off-topic for the user list). Once you're there, and have specific questions, we'll be here to (try to) answer them. [*] http://wiki.apache.org/xmlgraphics-fop/KnuthsModel [**] http://wiki.apache.org/xmlgraphics-fop/FOPIDESetupGuide Thanks for your interest in FOP! HTH! Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
|
|
Re: PDF rendering problem with image nested in fo:block inside multiple fo:inlineAndreas Delmelle <andreas.delmelle <at> telenet.be> writes:
> > https://issues.apache.org/bugzilla/show_bug.cgi?id=47430 > Hello Andreas, I've added a small patch to the bug report. It fixes the issue for me, although I don't know enough about FOP to say whether its the right approach. I'm using FOP for my zinepal.com project and it's been working very well for me. I'll start using the patched version and hopefully it won't blow up. :-) Cheers, - Frank --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@... For additional commands, e-mail: fop-users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |