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 ne...@swisslab.de on 2006/04/28 08:55:43 UTC
Filesize of created PDFs
Hello List,
If I include a grafic into my PDF (in this example a PNG) the resulting PDF
filesize has an enormous diffenrence between FOP025 and FOP092 beta. When
rendered with 0.25 the file's size is about 8kb. The same FO file results in
an 108kb(!) big PDF file when rendered with 0.92
beta!
If I does'nt include a picture the filesize is about equal.
Both, FOP025 and FOP092 got the "jai_codec.jar" and "jai_core.jar" in there
lib folder and FOPs classpath.
How can that happen?
I m storing the resulting PDFs into a database. A improvment of the
resulting filesizes of factor 10 and over is really bad for me :(
with best redards,
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Filesize of created PDFs
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Should be fixed now in FOP Trunk:
http://svn.apache.org/viewcvs?rev=404759&view=rev
Instead of embedding a smaller sRGB profile, I chose not to embed an
sRGB profile at all which should match the behaviour from before the
color profile handling was changed. Non-default ICC profiles will still
be embedded.
On 28.04.2006 10:03:47 Jeremias Maerki wrote:
> Interesting. Didn't notice that before. Here's what happens:
>
> The PNG is decoded by the PNG codec in XML Graphics Commons. Even if the
> PNG does not contain an explicit ICC color profile, the default sRGB
> color profile is returned because it's a Java default. The problem with
> Java's sRGB profile is that it's about 100KB in size even though there
> are sRGB profiles which are merely 4KB in size (we include one for PDF/A
> support). Currently FOP simply includes the ICC color profile if one is
> returned. In the case of sRGB this is probably not necessary or we might
> at least replace Java's profile with the embedded smaller one. The
> result for ICC-aware readers should be the same.
>
> To fix this, code needs to be added to identify Java's default sRGB
> profile and to ignore/replace it when output files (not only PDF!) are
> written.
>
> On 28.04.2006 08:55:43 news wrote:
> > Hello List,
> >
> > If I include a grafic into my PDF (in this example a PNG) the resulting PDF
> > filesize has an enormous diffenrence between FOP025 and FOP092 beta. When
> > rendered with 0.25 the file's size is about 8kb. The same FO file results in
> > an 108kb(!) big PDF file when rendered with 0.92
> > beta!
> > If I does'nt include a picture the filesize is about equal.
> >
> > Both, FOP025 and FOP092 got the "jai_codec.jar" and "jai_core.jar" in there
> > lib folder and FOPs classpath.
> >
> > How can that happen?
> > I m storing the resulting PDFs into a database. A improvment of the
> > resulting filesizes of factor 10 and over is really bad for me :(
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Filesize of created PDFs
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Interesting. Didn't notice that before. Here's what happens:
The PNG is decoded by the PNG codec in XML Graphics Commons. Even if the
PNG does not contain an explicit ICC color profile, the default sRGB
color profile is returned because it's a Java default. The problem with
Java's sRGB profile is that it's about 100KB in size even though there
are sRGB profiles which are merely 4KB in size (we include one for PDF/A
support). Currently FOP simply includes the ICC color profile if one is
returned. In the case of sRGB this is probably not necessary or we might
at least replace Java's profile with the embedded smaller one. The
result for ICC-aware readers should be the same.
To fix this, code needs to be added to identify Java's default sRGB
profile and to ignore/replace it when output files (not only PDF!) are
written.
On 28.04.2006 08:55:43 news wrote:
> Hello List,
>
> If I include a grafic into my PDF (in this example a PNG) the resulting PDF
> filesize has an enormous diffenrence between FOP025 and FOP092 beta. When
> rendered with 0.25 the file's size is about 8kb. The same FO file results in
> an 108kb(!) big PDF file when rendered with 0.92
> beta!
> If I does'nt include a picture the filesize is about equal.
>
> Both, FOP025 and FOP092 got the "jai_codec.jar" and "jai_core.jar" in there
> lib folder and FOPs classpath.
>
> How can that happen?
> I m storing the resulting PDFs into a database. A improvment of the
> resulting filesizes of factor 10 and over is really bad for me :(
>
> with best redards,
> Jan
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org