Newbie, question for PDF transformation

Questions about XML that are not covered by the other forums should go here.
arnaudmrs13
Posts: 19
Joined: Tue Sep 18, 2007 1:45 pm

Newbie, question for PDF transformation

Post by arnaudmrs13 »

Hello everybody,

i have a problem when i create a pdf document, is it possible to format my text because the problem is in the whole document

this is a exemple :

Image

in my exemple section the text is too much on the right and out of my page

this is my code for this section

Code: Select all

    <warning><para>TODO: Insérer un schéma.</para></warning>

<para/><sect2><title>Logiciels</title>
<para/>
<para>Le service de reverse-proxy est assuré par des serveurs apache 2.2.</para><sect3><title>Processus</title>
<para>Les processus /usr/sbin/apache2 -k start doivent être au nombre de quatres, conformément à la configuration générale d'Apache.</para>
<para>Extrait de la commande « top » en fonctionnement optimal (machine non chargée):</para>

<example><title>Extrait de la commande « top »</title>
<programlisting>
top - 09:33:52 up 35 days, 4:40, 1 user, load average: 0.05, 0.01, 0.00
Tasks: 45 total, 2 running, 43 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni, 99.7%id, 0.3%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1034984k total, 421132k used, 613852k free, 275660k buffers
Swap: 1951888k total, 0k used, 1951888k free, 104264k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21320 www-data 23 0 228m 5088 1888 S 0 0.5 0:00.06 apache2
22324 www-data 18 0 228m 5040 1892 S 0 0.5 0:00.05 apache2
21301 root 18 0 12408 4120 2300 S 0 0.4 0:00.14 apache2
21302 www-data 21 0 11668 2620 816 S 0 0.3 0:00.00 apache2
23624 root 15 0 7860 2396 1944 R 0 0.2 0:00.02 sshd
23626 root 15 0 4492 1776 1348 S 0 0.2 0:00.00 bash
2256 ntp 15 0 4128 1312 1008 S 0 0.1 0:01.39 ntpd
23678 root 15 0 2232 1116 864 R 0 0.1 0:00.00 top
</programlisting>
</example>


<para/></sect3><sect3><title>Configuration:</title>
<para>La configuration du serveur apache se trouve dans le répertoire /etc/apache2/</para>
<para>Les configurations des différents sites se trouvent dans le répertoire /etc/apache2/site-available.</para>
<para>Il est important de paramétrer correctement la variable « ProxyPreserveHost » du VirtualHost en question, en fonction du paramétrage de l'application proxifiée.</para>
<para/>
<para>Une configuration basique d'un vhost d'une application proxifiée se configure comme suit:</para>
<para/>
Does anyone have a idee to correct this problem ? is there a function to return to the line that i could use inside <programlisting> variables ?

Thankx a lot

Arnaud from Marseille FRANCE :shock:
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

The whitespaces in programlisting is preserved so do not indent its content, use something like

Code: Select all


            <programlisting>
top - 09:33:52 up 35 days, 4:40, 1 user, load average: 0.05, 0.01, 0.00
Tasks: 45 total, 2 running, 43 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni, 99.7%id, 0.3%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1034984k total, 421132k used, 613852k free, 275660k buffers
Swap: 1951888k total, 0k used, 1951888k free, 104264k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
21320 www-data 23 0 228m 5088 1888 S 0 0.5 0:00.06 apache2
22324 www-data 18 0 228m 5040 1892 S 0 0.5 0:00.05 apache2
21301 root 18 0 12408 4120 2300 S 0 0.4 0:00.14 apache2
21302 www-data 21 0 11668 2620 816 S 0 0.3 0:00.00 apache2
23624 root 15 0 7860 2396 1944 R 0 0.2 0:00.02 sshd
23626 root 15 0 4492 1776 1348 S 0 0.2 0:00.00 bash
2256 ntp 15 0 4128 1312 1008 S 0 0.1 0:01.39 ntpd
23678 root 15 0 2232 1116 864 R 0 0.1 0:00.00 top
</programlisting>
Regards,
George
George Cristian Bina
robert3L
Posts: 21
Joined: Sun Jan 15, 2006 11:36 am

Post by robert3L »

I have a problem related to this. I have <programlisting> contained within a <listitem>. Even though the lines in the <programlisting> do not have white space, the list gets indented and lines in the <programlisting> get truncated in PDF.

Code: Select all


<listitem>
robert3L
Posts: 21
Joined: Sun Jan 15, 2006 11:36 am

Post by robert3L »

I have a problem related to this. I have <programlisting> contained within a <listitem>. Even though the lines in the <programlisting> do not have white space other than for the necessary line indent, some lines get in the <programlisting> get truncated in PDF output.

Code: Select all


      <listitem>
<para><programlisting>
<role name="user">
<!--
- <deny> : general read access is NOT granted and must be assigned on the project level or via another role
-->
</role>
</programlisting></para>
</listitem>
Would I have to hard wrap the line in the DocBook source file or something? I ues "out of box " transformation scenario DocBook PDF v. 8.2
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

A hard wrap in the Docbook source file is one option. Also you should check out the FOP hyphenation files which cannot be distributed with the FOP libraries due to licensing issues. Also you should check out the Docbook parameters hyphenate.verbatim and hyphenate.verbatim.characters. The element programlisting is a verbatim one.


Regards,
Sorin
Post Reply