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 PN...@directsourcing.com on 2000/02/07 19:27:22 UTC
Further optimization
> From: BOYCE,JIM (HP-Boise,ex1) [mailto:jim_boyce@hp.com]
> in memory). I'm trying to make PDFs that are books. The fop
> process works
> fine until I process a book in excess of about 190 pages. I've been
>
I don't think I need to run my testcases now. I did tried once though with
the book "The Prince (Maciavelli)". It worked fine. It was 170 kb and
generated 52 pages, which is way less than Jim's testcase.
Another optimization I have been thinking of is the way we handle text
streams. We break the text in to words and then place it on the pdf. I know
it gives you finer control over the placement of the text. But it increase
the file size. The Prince which was 170 kb in ascii format became 1132 kb in
pdf using fop while it was 430 kb using Adobe Acrobat PDFwriter. The
difference is that they have line areas in there. And lines instead of words
are placed. Below I have given the pdf excerpts from the two programs. And
if we can compress these text streams before emitting it in pdf like Eric's
code does with the images. Nothing like it. I sense a need for compression
engine.
Sorry, if these things are too early to say. But I think these are important
issues.
OUTPUT FROM PDFWRITER
2.4 0 TD -0.0518 Tc -0.0682 Tw (therefore the injury that is to be done
to a ) Tj
-301.92 -11.52 TD -0.0372 Tc -0.0828 Tw (man ought to be of such a) Tj
102.72 0 TD 0 Tc -0.12 Tw ( ) Tj
2.4 0 TD -0.0862 Tc -0.0338 Tw (kind that one does not stand in fear of
revenge.) Tj
184.8 0 TD 0 Tc 2.28 Tw ( ) Tj
-289.92 -17.28 TD -0.0934 Tc -0.0266 Tw (But in maintaining armed men
there) Tj
142.56 0 TD -0.0685 Tc -0.0515 Tw ( in place of colonies one spends much)
Tj
150.24 0 TD 0 Tc -0.12 Tw ( ) Tj
2.4 0 TD -0.0539 Tc -0.0661 Tw (more, having to consume on the garrison
all ) Tj
-295.2 -11.52 TD -0.0394 Tc -0.0806 Tw (income from the state, so) Tj
100.32 0 TD 0 Tc -0.12 Tw ( ) Tj
OUTPUT FROM FOP
1 0 0 1 202.048 156.184 Tm (appropriate) Tj
1 0 0 1 266.08 156.184 Tm (line) Tj
1 0 0 1 288.088 156.184 Tm (breaks.) Tj
1 0 0 1 150.0 130.684 Tm (\225) Tj
1 0 0 1 162.0 130.684 Tm (This) Tj
1 0 0 1 189.858 130.684 Tm (is) Tj
1 0 0 1 203.712 130.684 Tm (a) Tj
1 0 0 1 215.574 130.684 Tm (multiple) Tj
1 0 0 1 262.104 130.684 Tm (line) Tj
Pankaj