Re: PDF size reduction

2017-05-16 Thread Peter Hansson
Hi Spoorthi
Another angle:
I've found SVGs to be MUCH MORE efficient in terms of space usage. Try to see 
if you have those logos in SVG format instead and see if it helps.
The added bonus of doing this is that image still looks nice even when the 
end-user is using the zoom function when looking at the PDF document.
SVGs cannot do everything that say JPEG can. For example Apache FOP doesn't 
have support for SVGs that use gradients. However, I've found that most 
corporate logos aren't that advanced and they typically work well with SVG 
format.
Give it a try. 
For example something like this:
 


Peter

 

On Tuesday, May 16, 2017 6:55 PM, Frank Hirsch  wrote:
 

 Personally I use Apache FOP for some projects - but I am not quite an expert 
when it comes to Java…
As far as I understand you may want to adjust the image resolution/compression 
to shrink the size of the files used in you FO - but I am not sure if this can 
be done automatically using a different image handling subsystem 
(https://xmlgraphics.apache.org/fop/0.95/graphics.html). Changing the color 
space may only affect the color profile/representation, but I don’t think this 
will preprocess the image size at all (sRGB is just a smaller gamut than Adobe 
RGB and RGB) - you may just get a different representation of colors outside 
the given gammut!
>From my perspective, it’s the same thing as placing an image in a layout 
>software: the image will be used „as is“. Only when it comes to write the PDF 
>you may have the ability to „donwsample“ all images to a given resolution 
>relative to the size in the layout…
- One solution might be to adjust the images to a proper size and compression 
accordingly to the layout- Alternatively you may „optimize“ the PDF for 
internet use: resample, compress and remove duplicates (images used multiple 
times)
Just a few ideas which may help if there is no native solution in Apache FOP 
;-)If there is no working solution in FOP, I may send you a link to a freeware 
to optimize the final PDF
The FOP guys may forgive me if I am completely wrong ;-)
Best,Frank

Am 16.05.2017 um 17:50 schrieb spoorthi myneni - TECRA 
:

Hi Team,
We have a requirement to reduce the size of the PDF size from 
200Kb(approximately) to as less as possible. There are 5 images in the PDF that 
I am using. 
PDF size without images is coming up to 40Kb. Each Image size(jpegs): CCX logo- 
60Kb, 3 small images: 18kb each, SMS logo - 50Kb approximately.
The PDF size is increased as mush as the image size is. Is there a way for us 
to optimize the image size or the PDF size in FO?I have already set this 
property: true

Please let me know if there are any techniques to achieve this. Has there been 
any enhancements done in the FOP 2.0?
Thank you,Spoorthi


   

Re: PDF size reduction

2017-05-16 Thread Frank Hirsch
Personally I use Apache FOP for some projects - but I am not quite an expert 
when it comes to Java…

As far as I understand you may want to adjust the image resolution/compression 
to shrink the size of the files used in you FO - but I am not sure if this can 
be done automatically using a different image handling subsystem 
(https://xmlgraphics.apache.org/fop/0.95/graphics.html 
). Changing the color 
space may only affect the color profile/representation, but I don’t think this 
will preprocess the image size at all (sRGB is just a smaller gamut than Adobe 
RGB and RGB) - you may just get a different representation of colors outside 
the given gammut!

From my perspective, it’s the same thing as placing an image in a layout 
software: the image will be used „as is“. Only when it comes to write the PDF 
you may have the ability to „donwsample“ all images to a given resolution 
relative to the size in the layout…

- One solution might be to adjust the images to a proper size and compression 
accordingly to the layout
- Alternatively you may „optimize“ the PDF for internet use: resample, compress 
and remove duplicates (images used multiple times)

Just a few ideas which may help if there is no native solution in Apache FOP ;-)
If there is no working solution in FOP, I may send you a link to a freeware to 
optimize the final PDF

The FOP guys may forgive me if I am completely wrong ;-)

Best,
Frank

> Am 16.05.2017 um 17:50 schrieb spoorthi myneni - TECRA 
> :
> 
> Hi Team,
> 
> We have a requirement to reduce the size of the PDF size from 
> 200Kb(approximately) to as less as possible. There are 5 images in the PDF 
> that I am using. 
> 
> PDF size without images is coming up to 40Kb. 
> Each Image size(jpegs): CCX logo- 60Kb, 3 small images: 18kb each, SMS logo - 
> 50Kb approximately.
> 
> The PDF size is increased as mush as the image size is. Is there a way for us 
> to optimize the image size or the PDF size in FO?
> I have already set this property: 
> true
> 
> 
> Please let me know if there are any techniques to achieve this. Has there 
> been any enhancements done in the FOP 2.0?
> 
> Thank you,
> Spoorthi



PDF size reduction

2017-05-16 Thread spoorthi myneni - TECRA
Hi Team,

We have a requirement to reduce the size of the PDF size from 
200Kb(approximately) to as less as possible. There are 5 images in the PDF that 
I am using. 

PDF size without images is coming up to 40Kb. 
Each Image size(jpegs): CCX logo- 60Kb, 3 small images: 18kb each, SMS logo - 
50Kb approximately.

The PDF size is increased as mush as the image size is. Is there a way for us 
to optimize the image size or the PDF size in FO?
I have already set this property: 
true


Please let me know if there are any techniques to achieve this. Has there been 
any enhancements done in the FOP 2.0?

Thank you,
Spoorthi

Re: Defining XML Entities in FOP 2.2

2017-05-16 Thread Glenn Adams
Since the XSLT front end functionality in FOP serves merely as a
convenience function for the user, you may choose to use alternative tools
not integrated into FOP as your front end. I suggest you do this in order
to transform from your input data set into XSL-FO input files which you can
feed directly to FOP without making use of the the XSLT front end found in
FOP that does not support XML Entities.

Regards,
Glenn

On Tue, May 16, 2017 at 5:54 AM, Jens Hofschröer  wrote:

> Hi
>
> Since FOP 2.2 it is no longer allowed to use a DOCTYPE declaration[1]. An
> issue originally only disallowing the loading of external DTDs.
>
> We are using FOP to transform a Docbook document separated in several
> files. Each of these files uses a local "settings.dtd" with common XML
> Entities used across the whole document. This is no longer possible with
> FOP 2.2. Even a simple DOCTYPE declaration without any file reference is
> disallowed now.
>
> The following error occurs if you have any DOCTYPE in your document(s):
> > javax.xml.transform.TransformerException: DOCTYPE is disallowed when
> the feature "http://apache.org/xml/features/disallow-doctype-decl; set to
> true.
>
> For Docbook these XML Entities are a common and documented[2] way to use
> "constants" across your document. So please allow the use of internal
> DOCTYPE and/or the use of local DTDs.
>
> Greetings
> Jens Hofschröer
>
>
> [1] https://issues.apache.org/jira/browse/FOP-2668
> [2] http://www.sagehill.net/docbookxsl/Db5Entities.html
>
> --
> http://blog.nigjo.de/netbeans/
>
> -
> To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
>
>


Defining XML Entities in FOP 2.2

2017-05-16 Thread Jens Hofschröer

Hi

Since FOP 2.2 it is no longer allowed to use a DOCTYPE declaration[1]. 
An issue originally only disallowing the loading of external DTDs.


We are using FOP to transform a Docbook document separated in several 
files. Each of these files uses a local "settings.dtd" with common XML 
Entities used across the whole document. This is no longer possible with 
FOP 2.2. Even a simple DOCTYPE declaration without any file reference is 
disallowed now.


The following error occurs if you have any DOCTYPE in your document(s):
> javax.xml.transform.TransformerException: DOCTYPE is disallowed when 
the feature "http://apache.org/xml/features/disallow-doctype-decl; set 
to true.


For Docbook these XML Entities are a common and documented[2] way to use 
"constants" across your document. So please allow the use of internal 
DOCTYPE and/or the use of local DTDs.


Greetings
Jens Hofschröer


[1] https://issues.apache.org/jira/browse/FOP-2668
[2] http://www.sagehill.net/docbookxsl/Db5Entities.html

--
http://blog.nigjo.de/netbeans/

-
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org