You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Kerkling, Sven" <sk...@bogs.de> on 2002/08/01 17:22:38 UTC

new line in a fo:block element

Hello 
i want to make a new line in a fo:block element but i did not work 
xml example

<letter>
  The first line
  the second line
</letter>

output is 
the first line the second line

the output should be
The first line
the second line

Can anyone help me? 


MFG
Sven Kerkling

Entwicklung
BOGS MARKETING & IT GMBH
Pagenstecherstra�e 143
D - 49090 Osnabr�ck
http://www.bogs.de

phone +49 (0) 541 13941 - 59
fax      +49  (0) 541 13941 - 88
mailto:sk@bogs.de


Re: new line in a fo:block element

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Kerkling, Sven wrote:
> Hello 
> i want to make a new line in a fo:block element but i did not work 
> xml example

Read the spec: by default, linefeeds are treated as spaces.
If possible, you should use multiple blocks.

The spec defines the linefeed-treatment property to control
how linefeeds are treated. Unfortunately, FOP doesn't implement
this yet. You can try white-space-collapse="false" which will
preserve all the spaces and linefeeds.
Another possiblity is to replace the line feeds by the line
separator character &#x2028;, which also causes an unconditional
line break.

J.Pietschmann



Re: FOP and Docbook XML problems

Posted by "Stefan Priebsch (e-novative GmbH)" <st...@e-novative.de>.
Hi list,

upon request I provide you with detailed information about my FOP problems:

I am using DocBook 4.2 XML, converting to fo using the DocBook 1.53.0
fo/docbook.xsl.A snippet of warnings (that are repeated many times for about every page)
follows:
C:\fop-0.20.4rc>java -cp
build\fop.jar;lib\batik.jar;lib\xalan-2.3.1.jar;lib\xercesImpl-2.0.1.jar;lib\xml-apis.jar;lib\avalon-framework-cvs-20020315.jar;lib\logkit-1.0.jar;lib\jimi.jar
org.apache.fop.apps.Fop -c c:\fop-0.20.4rc\conf\userconfig.xml
c:\docbook\book\asf_manual\test.fo -pdf c:\docbook\test.pdf[INFO] FOP 0.20.4rc
[INFO] building formatting object tree
[ERROR] Error in column-width property value '33%':
org.apache.fop.fo.expr.PropertyException: No conversion defined[ERROR] Error in column-width property value '34%':
org.apache.fop.fo.expr.PropertyException: No conversion defined[ERROR] Error in column-width property value '33%':
org.apache.fop.fo.expr.PropertyException: No conversion defined[ERROR] Unknown enumerated value for property 'relative-align': baseline
[ERROR] Error in relative-align property value 'baseline':
org.apache.fop.fo.expr.PropertyException: No conversion defined
[...]

Also, warnings:

Warning String-valued property starts with quote but doesn't end with
quote: "Times Roman",serif
appear, where "Times Roman" is the default font setting DocBook produces.
I can change the font setting supressing this warning, but I feel that
something is wrong because I´d think that DocBook XSL should produce proper
FO using the default settings.

Regardless of wether I use xsltproc or saxon to generate FO, the result
remainsthe same.

My userconfig.xml just defines additional fonts, nothing else.
When using a

<xsl:param name="alignment">left</xsl:param>

all text is left-aligned and okay, when using the default (justify), also
all verbatim text blocks appear justified. Does anybody know a way of telling
FOP (resp. modifying the FO) to *not* inherit the alignment from the body
alignment, which it obviously does.

Another problem I have is that the table of contents does not properly align
the page numbers, each appears in a fixed distance from the chapter name,
but all line numbers are not aligned, like this:

This Is A First Chapter  2
Another       5

Thanks again for your help that I very much appreciate.

Cheers,

Steve

----------------------------------------------
>e-novative> - e-Business Software & Solutions

e-novative GmbH - Isartorplatz 3 - D-80331 München - Germany
http://www.e-novative.de - fon 089 21 579 555 - fax 089 21 579 556

Handelsregister: Amtsgericht München HRB 134907
Geschäftsführer: Dipl. Inform. Stefan Priebsch



Re: FOP and Docbook XML problems

Posted by Jeremias Maerki <de...@greenmail.ch>.
FOP is a great tool to produce PDF files. A lot of people use it
productively and with success. There are a few issues with DocBook
because FOP doesn't implement the whole XSL:FO spec, yet. Waiting for
new releases does not make sense IMO, FOP is good enough for most uses
as it is.

You may want to look into the mailing list archives for possible
work-arounds (http://marc.theaimsgroup.com/?l=fop-user). For other good
sources of information look here:
http://xml.apache.org/fop/gethelp.html
http://xml.apache.org/fop/resources.html

If this does not help you, come back to the mailing list with error
messages, log output.

Good luck!

On 01.08.2002 17:49:21 Stefan Priebsch (e-novative GmbH) wrote:
> Hi list,
> 
> I´m new to FOP and I don´t want to ask stupid questions, but when
> processing XSLT'ed DocBook XML output (latest versions of both), I get
> loads of errors and warnings (fop 0.20.4rc, win32 and linux as well,
> xsltproc and sablotron as well) and/or more or less scrambled PDF. In
> particular, when using align=justify, also <programlisting> blocks will
> appear justified which of course makes them unusable. Also, picture
> processing (png´s, jimi 1.0 installed) causes warnings about sizing etc. I
> can provide you with a full log if anybody is interested.
> From trying in different setups, it seems that the blame must be put on
> FOP ...so how are your experiences in getting reasonable PDF output with FOP, can
> it be done, or will I have to wait for forthcoming releases?
> Any help or pointer is greatly appreciated. Thanks in advance.
> 
> Steve
> 
> ----------------------------------------------
> >e-novative> - e-Business Software & Solutions
> 
> e-novative GmbH - Isartorplatz 3 - D-80331 München - Germany
> http://www.e-novative.de - fon 089 21 579 555 - fax 089 21 579 556
> 
> Handelsregister: Amtsgericht München HRB 134907
> Geschäftsführer: Dipl. Inform. Stefan Priebsch
> 


Jeremias Maerki


FOP and Docbook XML problems

Posted by "Stefan Priebsch (e-novative GmbH)" <st...@e-novative.de>.
Hi list,

I´m new to FOP and I don´t want to ask stupid questions, but when
processing XSLT'ed DocBook XML output (latest versions of both), I get
loads of errors and warnings (fop 0.20.4rc, win32 and linux as well,
xsltproc and sablotron as well) and/or more or less scrambled PDF. In
particular, when using align=justify, also <programlisting> blocks will
appear justified which of course makes them unusable. Also, picture
processing (png´s, jimi 1.0 installed) causes warnings about sizing etc. I
can provide you with a full log if anybody is interested.
>From trying in different setups, it seems that the blame must be put on
FOP ...so how are your experiences in getting reasonable PDF output with FOP, can
it be done, or will I have to wait for forthcoming releases?
Any help or pointer is greatly appreciated. Thanks in advance.

Steve

----------------------------------------------
>e-novative> - e-Business Software & Solutions

e-novative GmbH - Isartorplatz 3 - D-80331 München - Germany
http://www.e-novative.de - fon 089 21 579 555 - fax 089 21 579 556

Handelsregister: Amtsgericht München HRB 134907
Geschäftsführer: Dipl. Inform. Stefan Priebsch



Re: new line in a fo:block element

Posted by sascha <sa...@assbach.de>.
I had that one too-
only way seems to be

<fo:block>first line</fo:block>
<fo:block>second line</fo:block>

or

<fo:block>
first line<fo:block/>second line
</fo:block>

Hope that helps,

Sascha

----- Original Message -----
From: "Kerkling, Sven" <sk...@bogs.de>
To: <fo...@xml.apache.org>
Sent: Thursday, August 01, 2002 5:22 PM
Subject: new line in a fo:block element


> Hello
> i want to make a new line in a fo:block element but i did not work
> xml example
>
> <letter>
>   The first line
>   the second line
> </letter>
>
> output is
> the first line the second line
>
> the output should be
> The first line
> the second line
>
> Can anyone help me?
>
>
> MFG
> Sven Kerkling
>
> Entwicklung
> BOGS MARKETING & IT GMBH
> Pagenstecherstraße 143
> D - 49090 Osnabrück
> http://www.bogs.de
>
> phone +49 (0) 541 13941 - 59
> fax      +49  (0) 541 13941 - 88
> mailto:sk@bogs.de
>