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 "Illiano, Vincent" <IL...@onyx.dcri.duke.edu> on 2003/03/05 16:14:54 UTC

ASCII text output and pagination

Hi all,

I'm using FOP to generate PDF and corresponding ASCII text output files.
I'm using FOP to generate the corresponding ASCII output instead of just
straight XSL because the reports I'm creating contain many tables with
varying widths and columns.  I also didn't want to have to worry about line
breaking.

The ASCII text output is actually working quite nicely.  Figuring out what
font-family (Courier), font-size (7.3pt), and line-height (10.5pt) to use
solved the problems I was having with missing spaces and sequential lines in
the output overlaying one another.

There is still one problem I need to solve - pagination.  The text output
files that I'm creating do not need pagination, since they are just one long
virtual page.  But FOP is inserting page breaks at the page boundries.  Is
there a way to tell FOP not to insert page breaks in text mode?  I know I
can solve the problem by creating a simple-page-master with an arbitrarily
long page-height, and then do some post-processing on the generated output
file.  But I thought I'd see if there's a more elegant solution.

If FOP cannot currently surpress page breaks in text mode, how hard would it
be for me to add this functionality myself?  Can anybody familiar with the
ASCII renderer point me where to look?

Thanks! -Vincent


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: ASCII text output and pagination

Posted by Jeremias Maerki <de...@greenmail.ch>.
On 05.03.2003 16:53:15 Illiano, Vincent wrote:
> Thanks for the quick response.  I am willing to add media-usage support to
> FOP.  I have a couple of questions on this, though.  Given that I need this
> functionality now, if I add it to the redesigned FOP branch, when will I be
> able to use it?

If the functionality available in the redesign already fits your needs 
(check that please) you can start using it immediately. Just download it
from CVS as indicated on our website. 

> When will the first release of the redesiged FOP be
> available?

Unknown. There's still a lot to do. But please do have a look at the
redesign.

> If I decide to put the support in the maintainance branch
> because I need it now, would it be difficult to port it later to the new
> FOP?

I think, yes. The reason is that the layout engine is completely
different. The renderers are still pretty similar, but your
functionality need to be implemented in the layout engine.

> I guess we should also ask the question if there are other FOP users out
> there who would like to see ASCII support in the redesigned FOP.  I,
> personally, have found it very useful!
>
> One more thing.  I am not familiar with the layout engines.  How difficult
> will it be to "teach" it not to make page breaks and to increase the page
> length dynamically?

Hmm, I can't answer that off-hand. I'm the "peripheral guy" here, sort of, read:
specialist for everything but layout. :-) I hope Keiron can answer that.

If you need your functionality real quick, I suggest you go the
post-processing way. But it would certainly be cool to have new people
jump in and help.

Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: ASCII text output and pagination

Posted by Jeremias Maerki <de...@greenmail.ch>.
The correct thing to do whould be to use media-usage="bounded-in-one-dimension"
on fo:root. The problem is that this isn't implemented in FOP, yet. And
it's not only a matter of changing the ASCII renderer, I'm afraid. You
would have to teach the layout engine not to make any page breaks and
to increase the page length as necessary.

If you decide to try fixing that I would recommend you to work with us
on the redesign to implement this feature because the maintenance branch
(from which 0.20.5 originates) will soon be discontinued. The other
problem is that the ASCII renderer hasn't been brought back in the
redesign. So it would involve helping us with that one, too.

On 05.03.2003 16:14:54 Illiano, Vincent wrote:
> Hi all,
> 
> I'm using FOP to generate PDF and corresponding ASCII text output files.
> I'm using FOP to generate the corresponding ASCII output instead of just
> straight XSL because the reports I'm creating contain many tables with
> varying widths and columns.  I also didn't want to have to worry about line
> breaking.
> 
> The ASCII text output is actually working quite nicely.  Figuring out what
> font-family (Courier), font-size (7.3pt), and line-height (10.5pt) to use
> solved the problems I was having with missing spaces and sequential lines in
> the output overlaying one another.
> 
> There is still one problem I need to solve - pagination.  The text output
> files that I'm creating do not need pagination, since they are just one long
> virtual page.  But FOP is inserting page breaks at the page boundries.  Is
> there a way to tell FOP not to insert page breaks in text mode?  I know I
> can solve the problem by creating a simple-page-master with an arbitrarily
> long page-height, and then do some post-processing on the generated output
> file.  But I thought I'd see if there's a more elegant solution.
> 
> If FOP cannot currently surpress page breaks in text mode, how hard would it
> be for me to add this functionality myself?  Can anybody familiar with the
> ASCII renderer point me where to look?


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org