USHAKOV, Sergey | 1 Mar 2007 05:12
Picon

0.93: problem with fo:table, width="100%" in a page header

Hello all,

I have run into a "Cannot find LM to handle given FO for LengthBase" problem
that is related to a fo:table with width="100%" in a page header
(fo:region-before).

It seems that layout manager cannot find a relation between page header and
page itself to calculate the page header width.

I have a more or less distilled .fo sample file. Is it a good idea to post
it as an attachment here?

Regards,
Sergey
malm | 1 Mar 2007 06:54
Picon
Favicon

Re: [SPAM] 0.93: problem with fo:table, width="100%" in a page header


Check BugZilla if its already reported. If yes attach your sample to the
existing bug if not create a new bug and attach to that.

Cheers

Manuel

Ushakov, Sergey N wrote:
> 
> Hello all,
> 
> I have run into a "Cannot find LM to handle given FO for LengthBase"
> problem
> that is related to a fo:table with width="100%" in a page header
> (fo:region-before).
> 
> It seems that layout manager cannot find a relation between page header
> and
> page itself to calculate the page header width.
> 
> I have a more or less distilled .fo sample file. Is it a good idea to post
> it as an attachment here?
> 
> Regards,
> Sergey
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe <at> xmlgraphics.apache.org
(Continue reading)

Xavier Ottolini | 1 Mar 2007 09:50

How to modify the log level in FOP 0.93 ?

Hi,

I installed a FOP as a servlet to generate PDF documents. Since this 
service is being running, a lot of messages, which I do not need, are 
being written in the log file.

Here is an extract of the log written in the catalina.out :

INFO: Source resolution set to: 300.0dpi (px2mm=0.08466666)
15 febr. 2007 14:16:25 org.apache.fop.apps.FopFactory initUserConfig
INFO: Default page-height set to: 11in
15 febr. 2007 14:16:25 org.apache.fop.apps.FopFactory initUserConfig
INFO: Default page-width set to: 8.26in
15 febr. 2007 14:16:25 org.apache.fop.apps.FopFactory getBaseURLfromConfig
INFO: base set to: file:/home/server/webapps/opencms/export/xsl/
15 febr. 2007 16:29:24 org.apache.fop.apps.FopFactory initUserConfig

I read that the file log4j.properties allows to modifiy the log level. I 
know that I should place the "log4j.properties" under the 
"WEB-INF/classes" directory.
But I do not know hot to write it. Can anybody expain me how to set the 
parameters in this properties file ?

Any help would be appreciated.

Best regards,

Xavier

--

-- 
(Continue reading)

Chris Bowditch | 1 Mar 2007 11:40
Picon
Favicon

Re: Problem with text flow

Miroslav Pukhalsky wrote:

> Hi there!
> 
> Andreas L Delmelle wrote:
> 
>> You would need to place the fo:external-graphic in an fo:float with 
>> float="start", IIC.
>>
>> Unfortunately, this is not yet supported by any released FOP version. 
>> IIRC, there is a branch that contains a basic implementation for 
>> floats, but AFAIK this branch has not yet been merged back into the 
>> trunk.
>>
>> No immediate workaround comes to mind.
>>
> 
> I tried to use this feature, but got very sad result:
> WARNING: fo:float is not yet implemented.
> 
> 
> Have anyone other idea?

You could use a table to mimic this layout. But you would have to 
manually break the text yourself at the end of the first cell of text (2 
column first row in the table). So this solution may not be acceptable

Chris
Andreas L Delmelle | 1 Mar 2007 11:51
Picon

Re: 0.93: problem with fo:table, width="100%" in a page header

On Mar 1, 2007, at 05:12, USHAKOV, Sergey wrote:

Hi,

> I have run into a "Cannot find LM to handle given FO for  
> LengthBase" problem
> that is related to a fo:table with width="100%" in a page header
> (fo:region-before).
>
> It seems that layout manager cannot find a relation between page  
> header and
> page itself to calculate the page header width.
>
> I have a more or less distilled .fo sample file. Is it a good idea  
> to post
> it as an attachment here?

Is it large? If so, better not post it here, but you can mail it to  
me off-list if you want.

FWIW: I've already tried a simple table in a static content, and do  
not receive the error.

Recently, a similar problem was reported, but there the user also  
specified width="100%" on the cells, and that was causing the error.  
Be sure to check that. If that is the case, then removing the width  
property from the cells should solve the problem.

HTH!

(Continue reading)

Andreas L Delmelle | 1 Mar 2007 11:57
Picon

Re: [SPAM] Exception in thread "main" java.lang.OutOfMemoryError

On Feb 28, 2007, at 19:53, Tyndyll wrote:

Hi Tyndyll,

>
> I've often been told that I'm special :)
>
> I dumped the data in because the example called for a lump of data to
> generate 35 pages. I'd prefer to use 0.93 so its time to adapt to  
> survive :)

Just FYI: I did a little follow-up on this on fop-dev <at> , and it seems  
to be a problem with scalability of the text-layout-algorithm. In  
your case, putting each of the scene-blocks in your example in its  
own fo:block already avoids the error.

Note that I did alter the FO to use linefeed-treatment="preserve".

The result looks as good as can be expected.

Cheers,

Andreas
herman | 1 Mar 2007 13:05
Picon

Re: [SPAM] Fonts and copyrights


Warren Young wrote:
> 
> herman wrote:
>> 
>> Suppose i want to put some pdf files on the web, but these
>> include some characters from a special font (non-free). 
>> Now i've been told that as long as not the entire font
>> is put in the pdf file, but only those characters that are used
>> in the document, then i won't violate the copyright.
> 
> If you write a book, and I put a copy of chapter 12 on my web site, am I 
> violating your copyright?
> 
> Please read through these sites:
> 
> 	http://fairuse.stanford.edu/
> 	http://www.templetons.com/brad/copymyths.html
> 	http://www.copyright.gov/
> 
>> 4. does anyone have some extra advice?
> 
> Buy a font that allows embedding, or use truly free fonts.  No other 
> option gives you the rights you seek.
> 

Ok, clear. 
Suppose i have a font that does allow me subset embedding in a pdf file,
but not full embedding. So far i have found out the following:
(I use FOP with CID-keyed embedding.)
(Continue reading)

Slawick | 1 Mar 2007 17:11
Picon
Favicon

Rows higher than expected

Dear FOP users,

I have a small problem with FOP (both 0.20 and 0.93).
When generating a PDF, I got an error of type "The contents of row 1 are 
taller than they should be", and in the generated PDF, the rows are higher 
than I expect.

I understand the error by itself, but not why it is generated.

For example, I have:
"the row grows to 21600 millipoints, but the row shouldn't get any taller than 
MinOptMax[min=opt=max=12000] millipoints"

But the font size I use is 12pt, and even if I add the 1pt padding on top and 
bottom, the result shouldn't be higher than 14pt.

Does anyone know why my rows are that higher? How the necessary high (21600pt 
in my example) is calculated? What elements are taken in account (font size, 
padding, borders size...?)?

Thank you for your help,
Slawick Charlier
Chris Bowditch | 1 Mar 2007 18:22
Picon
Favicon

Re: Rows higher than expected

Slawick wrote:
> Dear FOP users,
> 
> I have a small problem with FOP (both 0.20 and 0.93).
> When generating a PDF, I got an error of type "The contents of row 1 are 
> taller than they should be", and in the generated PDF, the rows are higher 
> than I expect.
> 
> I understand the error by itself, but not why it is generated.
> 
> For example, I have:
> "the row grows to 21600 millipoints, but the row shouldn't get any taller than 
> MinOptMax[min=opt=max=12000] millipoints"
> 
> But the font size I use is 12pt, and even if I add the 1pt padding on top and 
> bottom, the result shouldn't be higher than 14pt.

Wrong. First of all theres half leading. Which means a line of text 
typically takes up 1.2x the font height.

1.2x 12pt = 14.4pt.

You don't show your FO, but if you have added 1pt padding top and bottom 
then the line height is up to:

16.4pt.

If your table cells have borders this may also increase the row height. 
There are many other things that can increase the row height, but rather 
than try and guess, post up the XSL-FO for the row in question and we'll 
(Continue reading)

Ian Hendry | 1 Mar 2007 18:49
Picon
Favicon

problem with FOP set up

Hi,

I guess my setup is wrong - perhaps someone can help? I downloaded and extracted fop-0.93 (fop-current-bin-jdk1.4.zip) to C:\PROGRA~1\APACHE~1\fop-0.93. I copied the jar files from the /lib directory into my CLASSPATH. Then I tried to run FOP from the command line. I tried first to make an FO file using Fop -xml xml.xml -xsl xsl.xsl -foout foo.fo. The FO file is created fine but then when I try and create the PDF from the FO file that FOP has created for me it fails! See below (Also at the foot of the message I have included the contents of my xml, xsl and FOP's FO file)

Thanks in advance for any help, Ian.

C:\PROGRA~1\APACHE~1\fop-0.93>Fop -xml xml.xml -xsl xsl.xsl -foout foo.fo
"C:\PROGRA~1\Java\jre1.5.0_10\bin\java"
C:\PROGRA~1\APACHE~1\fop-0.93>Fop foo.fo foo.pdf
"C:\PROGRA~1\Java\jre1.5.0_10\bin\java"
01-Mar-2007 17:43:30 org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException:
 Error: First element must be the fo:root formatting object. Found fo:block inst
ead. Please make sure you're producing a valid XSL-FO document.
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
        at org.apache.fop.cli.Main.startFOP(Main.java:160)
        at org.apache.fop.cli.Main.main(Main.java:191)

---------

javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException:
 Error: First element must be the fo:root formatting object. Found fo:block inst
ead. Please make sure you're producing a valid XSL-FO document.
        at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Transf
ormerIdentityImpl.java:501)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.ja va:115)
        at org.apache.fop.cli.Main.startFOP(Main.java:160)
        at org.apache.fop.cli.Main.main(Main.java:191)
Caused by: org.apache.fop.fo.ValidationException: Error: First element must be t
he fo:root formatting object. Found fo:block instead. Please make sure you're pr
oducing a valid XSL-FO document.
        at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuil
der.java:292)
        at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
        at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Tra
nsformerIdentityImpl.java:1072)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
ce)
        at org.apache.xerces.impl.X MLNSDocumentScannerImpl.scanStartElement(Unkn
own Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.s
canRootElementHook(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xalan.transformer.TransformerIdentityImpl.transfor m(Transf
ormerIdentityImpl.java:484)
        ... 4 more
---------
org.apache.fop.fo.ValidationException: Error: First element must be the fo:root
formatting object. Found fo:block instead. Please make sure you're producing a v
alid XSL-FO document.
        at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuil
der.java:292)
        at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:185)
        at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(Tra
nsformerIdentityImpl.java:1072)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Sour
ce)
        at org.apache.xerces.impl.XMLNSDocumentScannerI mpl.scanStartElement(Unkn
own Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.s
canRootElementHook(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
        at org.apache.fop.cli.Main.startFOP(Main.java:160)
        at org.apache.fop.cli.Main.main(Main.java:191)


********* END SCREEN DUMP *********

********* INCLUDED FILES  *********
XML.XML
<?xml version="1.0" encoding="UTF-8"?& gt;
<data>
<name>
Krusty the Clown
</name>
<description>
This memo explains why Krusty the Clown is our best customer.
We need to take good care of him from now onwards and make sure
that there are always enough bananas for his pet monkey.
</description>
</data>
END
XML.XML
XSL.XSL
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">

<xsl:template match="data">
<fo:block>
<xsl:apply-templates select="name"/>
<xsl:apply-templates select="description"/>
</fo:block>
</xsl:template>

<xsl:template match="name">
<fo:block font-size="18pt"
font-family="sans-serif"
line-height="24pt"
space-after.optimum="15pt"
background-color="blue"
color="white"
text-align="center"
padding-top="3pt">
<xsl:value-of select="."/>
</fo:block>
</xsl:template>

<xsl:template match="description">
<fo:block font-size="12pt"
font-family="sans-serif"
line-height="15pt"
space-after.optimum="3pt"
text-align="justify">
<xsl:value-of select="."/>
</fo:block>
</xsl:template>

</xsl:stylesheet>
END XSL.XSL
FOO.FO
<?xml version="1.0" encoding="UTF-8"?><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"><fo:block padding-top="3pt" text-align="center" color="white" background-color="blue" space-after.optimum="15pt" line-height="24pt" font-family="sans-serif" font-size="18pt">
Krusty the Clown
</fo:block><fo:block t ext-align="justify" space-after.optimum="3pt" line-height="15pt" font-family="sans-serif" font-size="12pt">
This memo explains why Krusty the Clown is our best customer.
We need to take good care of him from now onwards and make sure
that there are always enough bananas for his pet monkey.
</fo:block></fo:block>
END FO.FO


Gmane