You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Domján Gergő <do...@freemail.hu> on 2009/10/23 09:31:02 UTC

Bug report - reading config xml

Hi Everyone,


I think, I have found a bug.
I want to use FOP to convert xsl-fo files into txt files with layout.

I experienced, that the layout is distorted because the max column number is set to 80 by default. I wanted to change this value using a config xml ( fop -c cfg.xml), 
so I took the example config xml (distribution 0.95, {fop-dir}/conf/fop.xconf).

It contains this section:

 <renderers>
    <renderer mime="text/plain">
      <pageSize columns="80"/>
    </renderer>

  </renderers>


This would be exactly what I need, and because this section, I think, FOP is supposed to read this information from the configuration xml and not only to work with the default value. 
The problem is, that the application is not reading this config information from the config file.
Than I validated the config file I built, and according to the latest .xsd (http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd, No 731248), 
it is not valid, the "pageSize" element does not exist.

Can You please advise, how to set default column number to higher or could anyone please add this functionality/fix this bug?


Thank You

doger



<br><br>________________________________________________________<br><a 
href=" http://ad.adverticum.net/b/cl,1,6022,359365,443916/click.prm">
Nokia 5130 Domino csomagban 25 990 Ft helyett 23 391 Ft csak a T-Mobile Webshopban.
</a>


Re: Bug report - reading config xml

Posted by Vincent Hennebert <vh...@gmail.com>.
Hi Domján,

Domján Gergő wrote:
> Hi Chris,
> 
> Thank You for Your answer.
> I would like to make clear, that it was not me, who added this "pageSize" element arbitrarily to the config file, it was in the sample config xml I downloaded with the FOP package 0.95 from the Apache FOP website.
> So it is definitely a mistake.
> 
> There is two solution for the problem:
> 1. to delete the "pageSize" element from the sample config xml on the Apache web site
> 2. to add this functionality really to the FOP application.
> 
> As You wrote, the second is also not a big deal (or: "fairly easy"), to someone, who has the development environment for Java installed and who has some experience with Java programming.
> 
> Sadly, I have none of them, so I was wondering, if I could ask someone from the Apache FOP community and who would be so kind to do this (maybe not only) for me.

I’m afraid there is no interest (to my knowledge) in the current
development team in maintaining the text renderer. Our resources are
very sparse and we prefere to concentrate on parts that are more core to
the FOP project. If the text renderer is ever broken by improvements to
the code, it’s probable that it’s not going to be fixed.

Sorry, if you really need this functionality you will have to give it
a go yourself. But I’m not even sure that would be helpful anyway. What
do you want to do? Maybe you could describe your issue in more details
on the fop-users list, and we could give you some help or suggest
alternative ways to produce your text output. Using the well-supported
PDF output and converting it to text with some PDF post-processing tool
is probably going to give better results, for example. Have a look at
the following thread:
http://markmail.org/thread/y7k2awwwxuihyw2y


HTH,
Vincent


> Thank You in advance
> 
> Gergo
> 
> 
> 
> Chris Bowditch <bo...@hotmail.com> írta: 
> 
> 
>> Domján Gergő wrote:
>>> Hi Everyone,
>> Hi Domjan,
>>
>>>
>>> I think, I have found a bug.
>>> I want to use FOP to convert xsl-fo files into txt files with layout.
>>>
>>> I experienced, that the layout is distorted because the max column 
>>> number is set to 80 by default. I wanted to change this value using a 
>>> config xml ( fop -c cfg.xml),
>>> so I took the example config xml (distribution 0.95, 
>>> {fop-dir}/conf/fop.xconf).
>>>
>>> It contains this section:
>>>
>>> <renderers>
>>> <renderer mime="text/plain">
>>> <pageSize columns="80"/>
>>> </renderer>
>>>
>>> </renderers>
>>>
>>>
>>> This would be exactly what I need, and because this section, I think, 
>>> FOP is supposed to read this information from the configuration xml and 
>>> not only to work with the default value.
>>> The problem is, that the application is not reading this config 
>>> information from the config file.
>> That's right. It is not sufficient to simply add new XML elements into 
>> the config and hope that FOP somehow applies this value to the output. 
>> You have to make FOP read the element by changing the code. This is done 
>> fairly eaily in the configure method of class TXTRendererConfigurator. 
>> Then you have to make sure the value extracted there is applied to the 
>> output which in some cases is less trivial.
>>
>>> Than I validated the config file I built, and according to the latest 
>>> .xsd 
>>> (http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd, 
>>> No 731248),
>>> it is not valid, the "pageSize" element does not exist.
>>>
>>> Can You please advise, how to set default column number to higher or 
>>> could anyone please add this functionality/fix this bug?
>> Chris
>>
>>>
>>> Thank You
>>>
>>> doger

Re: Re: Bug report - reading config xml

Posted by Domján Gergő <do...@freemail.hu>.
Hi Chris,

Thank You for Your answer.
I would like to make clear, that it was not me, who added this "pageSize" element arbitrarily to the config file, it was in the sample config xml I downloaded with the FOP package 0.95 from the Apache FOP website.
So it is definitely a mistake.

There is two solution for the problem:
1. to delete the "pageSize" element from the sample config xml on the Apache web site
2. to add this functionality really to the FOP application.

As You wrote, the second is also not a big deal (or: "fairly easy"), to someone, who has the development environment for Java installed and who has some experience with Java programming.

Sadly, I have none of them, so I was wondering, if I could ask someone from the Apache FOP community and who would be so kind to do this (maybe not only) for me.

Please please please

Thank You in advance

Gergo



Chris Bowditch <bo...@hotmail.com> írta: 


> Domján Gergő wrote:
> > 
> > Hi Everyone,
> 
> Hi Domjan,
> 
> > 
> > 
> > I think, I have found a bug.
> > I want to use FOP to convert xsl-fo files into txt files with layout.
> > 
> > I experienced, that the layout is distorted because the max column 
> > number is set to 80 by default. I wanted to change this value using a 
> > config xml ( fop -c cfg.xml),
> > so I took the example config xml (distribution 0.95, 
> > {fop-dir}/conf/fop.xconf).
> > 
> > It contains this section:
> > 
> > <renderers>
> > <renderer mime="text/plain">
> > <pageSize columns="80"/>
> > </renderer>
> > 
> > </renderers>
> > 
> > 
> > This would be exactly what I need, and because this section, I think, 
> > FOP is supposed to read this information from the configuration xml and 
> > not only to work with the default value.
> > The problem is, that the application is not reading this config 
> > information from the config file.
> 
> That's right. It is not sufficient to simply add new XML elements into 
> the config and hope that FOP somehow applies this value to the output. 
> You have to make FOP read the element by changing the code. This is done 
> fairly eaily in the configure method of class TXTRendererConfigurator. 
> Then you have to make sure the value extracted there is applied to the 
> output which in some cases is less trivial.
> 
> > Than I validated the config file I built, and according to the latest 
> > .xsd 
> > (http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd, 
> > No 731248),
> > it is not valid, the "pageSize" element does not exist.
> > 
> > Can You please advise, how to set default column number to higher or 
> > could anyone please add this functionality/fix this bug?
> 
> Chris
> 
> > 
> > 
> > Thank You
> > 
> > doger
> > 
> > 
> > 
> > ________________________________________________________
> > Nokia 5130 Domino csomagban 25 990 Ft helyett 23 391 Ft csak a T-Mobile 
> > Webshopban. < http://ad.adverticum.net/b/cl,1,6022,359365,443916/click.prm>;
> > 
> 
> 

<br><br>________________________________________________________<br><a 
href=" http://ad.adverticum.net/b/cl,1,6022,359365,443916/click.prm">
Nokia 5130 Domino csomagban 25 990 Ft helyett 23 391 Ft csak a T-Mobile Webshopban.
</a>


Re: Bug report - reading config xml

Posted by Chris Bowditch <bo...@hotmail.com>.
Domján Gergő wrote:
> 
> Hi Everyone,

Hi Domjan,

> 
> 
> I think, I have found a bug.
> I want to use FOP to convert xsl-fo files into txt files with layout.
> 
> I experienced, that the layout is distorted because the max column 
> number is set to 80 by default. I wanted to change this value using a 
> config xml ( fop -c cfg.xml),
> so I took the example config xml (distribution 0.95, 
> {fop-dir}/conf/fop.xconf).
> 
> It contains this section:
> 
>  <renderers>
>     <renderer mime="text/plain">
>       <pageSize columns="80"/>
>     </renderer>
> 
>   </renderers>
> 
> 
> This would be exactly what I need, and because this section, I think, 
> FOP is supposed to read this information from the configuration xml and 
> not only to work with the default value.
> The problem is, that the application is not reading this config 
> information from the config file.

That's right. It is not sufficient to simply add new XML elements into 
the config and hope that FOP somehow applies this value to the output. 
You have to make FOP read the element by changing the code. This is done 
fairly eaily in the configure method of class TXTRendererConfigurator. 
Then you have to make sure the value extracted there is applied to the 
output which in some cases is less trivial.

> Than I validated the config file I built, and according to the latest 
> .xsd 
> (http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd, 
> No 731248),
> it is not valid, the "pageSize" element does not exist.
> 
> Can You please advise, how to set default column number to higher or 
> could anyone please add this functionality/fix this bug?

Chris

> 
> 
> Thank You
> 
> doger
> 
> 
> 
> ________________________________________________________
> Nokia 5130 Domino csomagban 25 990 Ft helyett 23 391 Ft csak a T-Mobile 
> Webshopban. < http://ad.adverticum.net/b/cl,1,6022,359365,443916/click.prm>
>