AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images

2005-07-20 Thread michella
Thank you for your reply,

I actually checked out the last trunk repositery of FOP, as you told me. I may 
be doing something wrong, but the trunk downloaded doesn't contain any 
build(.bat) file that is set as required in the FOP building documentation URL.

The FOP version I actually use is the latest binary release (fop-0.20.5 windows)

Regards

Lawrence

-Ursprüngliche Nachricht-
Von: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 19. Juli 2005 17:45
An: fop-users@xmlgraphics.apache.org
Betreff: Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG 
Images



On 19.07.2005 17:27:38 michella wrote:
 I already tried this alternate way, but it didn't change anything.
 (StrokeSVGText set to false)
 
 The SVG contains more or less 40 to 60 graphics (g). Each one having
 text with ellipses, rect, and so on.
 
 I tried the external Batik Rasterizer SVG to pdf conversion. The Pdf
 output is small (300k per SVG) ... and perfect.

The PDF Transcoder delivered with Batik is based on the FOP Trunk code
(redesign). It could very well be that there are considerable
improvements for your use case.

If all you do is basically use XSL-FO to place a set of SVGs on several
pages you could try the trunk source code.
http://xml.apache.org/fop/download.html#source

There's a little catch ATM: A bug may render the SVGs too small. I
already fixed that on my machine at home (I'm at ApacheCon ATM) but I'm
pretty sure I fixed it the wrong way. I still have to investigate that
and probably won't be able to fix it before next week. As a momentary
work-around you could make sure that the if-statement in the line below
(found in PDFXMLHandler.java) always resolves to false:

old:
if (!at.isIdentity()) {

new:
if (false  !at.isIdentity()) {

Depending on your skills that may sound adventurous, but that's all I
can offer right now.

 The external-graphics tag included has two xsl-fo:blocks as parents (ie
 parent + grandparent). Could it be the problem?

No.

 Second : As you'll see, the graphics blocks are all in one single
 page-sequence and flow. Is there a problem with that?

No.

 FO Abstract :
 
 fo:page-sequence master-reference=Title font-family=Frutiger45Light
   fo:flow flow-name=xsl-region-body
   fo:block id=d1e390153.4pct_Sortierung_NF break-before=page
   fo:block text-align=center padding-after=15pt
   fo:external-graphic 
 src=../Output/Bilder/EA_Diagrammen/SVG/d211_PDF.svg 
 content-type=content-type: xml/svg block-  
 progression-dimension=17cm inline-progression-dimension=25.7cm/
   /fo:block
   /fo:block
   (... + 48 times identical blocs with SVG graphics...)
   /fo:flow
 /fo:page-sequence
 
 Thank you for your help
 
 Lawrence Michel


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images

2005-07-20 Thread Jeremias Maerki

On 20.07.2005 09:31:45 michella wrote:
 Thank you for your reply,
 
 I actually checked out the last trunk repositery of FOP, as you told me.
 I may be doing something wrong, but the trunk downloaded doesn't
 contain any build(.bat) file that is set as required in the FOP building
 documentation URL.

I know. :-( The documentation has not been updated to reflect the
changes in the development. We don't include Apache Ant anymore but
require it installed on your machine. We're following Ant best practices
here. Please install Apache Ant on your machine and then just call ant
in the FOP directory to build the trunk sources.

http://ant.apache.org/manual/
http://ant.apache.org/manual/install.html#installing

 The FOP version I actually use is the latest binary release (fop-0.20.5 
 windows)



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images

2005-07-20 Thread Jeremias Maerki

On 20.07.2005 12:02:47 michella wrote:
 Hi again,
 
 thanks for your help.
 
 I successfully installed Ant and the latest trunk version of Fop. After
 a bit while fo:table-column redesign requirement, I finally got an
 output PDF. Unfortunately, the SVG Images could not be handled
 correctly. I got the following error :
 
 No ImageReader for this type of image ((some relative path)/svgImage.svg)
 Image not available : (some relative path)/svgImage.svg

Can you try with absolute paths, please? The image loading stuff may not
be working as it should. If that doesn't help can you please post a
small SVG graphic that produces this problem? Maybe there's also
something wrong with the SVG detection. FOP doesn't really check the
filename extension to detect the file format.

Sorry for the trouble, but we're on the bleeding edge here. :-)

I'll try to find some time between session to try to reproduce what
you're experiencing. No promises, though. It's a busy place here.

 Do I have to add any Batik stuff manually (if not automatically
 supplied in the FOP installed version)?

No. You should use the batik.jar in the lib directory.

 Thanks for your (really!) precious help

You're welcome. I hope we can get somewhere. :-)

 Gruss aus Bern ;-)

:-) Greetings from Stuttgart (ApacheCon), normally located in Lucerne.


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images

2005-07-20 Thread michella
Hi Jeremias,

I set an absolute Path, and image is now inserted. OK,

But the quality of insertion is really bad. It won't stick it in the middle, 
and don't have it sized as specified in the SVG header width and height. (the 
old version of fop did the work properly!). Here the sample FO and SVG header :

FO: 

fo:block text-align=center padding-after=15pt
fo:external-graphic 
src=file:///C:/Documents%20and%20Settings/michella/My

%20Documents/EAI/InformationsManagement/XML/Output/Bilder/EA_Diagrammen/SVG/d192_PDF.svg
 content-type=content-type:xml/svg block-progression-dimension=17cm 
inline-progression-dimension=25.7cm/
/fo:block

The SVG Header :

svg xmlns:xlink=http://www.w3.org/1999/xlink; width=355 height=800 
viewBox=75 12 1237 2791 preserveAspectRatio=xMinYMin meet kerning=0 
xml:space=preserve style=stroke: black; fill: none; g...

I may send you the PDF Output in your direct email only (confidentiality 
purposes :-( )

Thanks ;-)

Lawrence


-Ursprüngliche Nachricht-
Von: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 20. Juli 2005 12:31
An: fop-users@xmlgraphics.apache.org
Betreff: Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG 
Images



On 20.07.2005 12:02:47 michella wrote:
 Hi again,
 
 thanks for your help.
 
 I successfully installed Ant and the latest trunk version of Fop. After
 a bit while fo:table-column redesign requirement, I finally got an
 output PDF. Unfortunately, the SVG Images could not be handled
 correctly. I got the following error :
 
 No ImageReader for this type of image ((some relative path)/svgImage.svg)
 Image not available : (some relative path)/svgImage.svg

Can you try with absolute paths, please? The image loading stuff may not
be working as it should. If that doesn't help can you please post a
small SVG graphic that produces this problem? Maybe there's also
something wrong with the SVG detection. FOP doesn't really check the
filename extension to detect the file format.

Sorry for the trouble, but we're on the bleeding edge here. :-)

I'll try to find some time between session to try to reproduce what
you're experiencing. No promises, though. It's a busy place here.

 Do I have to add any Batik stuff manually (if not automatically
 supplied in the FOP installed version)?

No. You should use the batik.jar in the lib directory.

 Thanks for your (really!) precious help

You're welcome. I hope we can get somewhere. :-)

 Gruss aus Bern ;-)

:-) Greetings from Stuttgart (ApacheCon), normally located in Lucerne.


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Almost-Solved - Huge size of Output PDF when inserting 49 SVG Images

2005-07-20 Thread michella
Back ...

I did the java modifications you proposed, and it worked. ;-)

As you already said, there is a scaling problem still to be solved. In my 
specific case, my FO documents has inline- and block-progression-dimension as 
image block parameters set to specific centimeters values. Does the actual FOP 
implementation still handle this case (as it was the case in the previous 
version)?

Again thank you for your precious help

Lawrence

-Ursprüngliche Nachricht-
Von: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 20. Juli 2005 15:28
An: fop-users@xmlgraphics.apache.org
Betreff: Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG 
Images


Remember the little catch I wrote about yesterday? There's a work-around
there. I don't know if it fixes everything but at least the scaling.

On 20.07.2005 15:20:19 michella wrote:
 But the quality of insertion is really bad. It won't stick it in the
 middle, and don't have it sized as specified in the SVG header width
 and height. (the old version of fop did the work properly!). Here the sample
 FO and SVG header :


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Huge size of Output PDF when inserting 49 SVG Images

2005-07-19 Thread michella
Hi all,

I have an xsl-fo which inserts 49 SVG images into the PDF file. These
files are diagrams, containing text and vectorial symbols.

After launching the Fop processing, have a bath, coffee, and so on, I
finally get a nice 730 MB Pdf file of 160 pages...
The Word comparison is... 1.4 Mb...

Is there any switch in FOP that might handle the SVG a bit more
efficiently?

FOP command :

CALL ..\..\Tools\fop-0.20.5\fop -q -c
..\..\Tools\fop-0.20.5\conf\PostConfig.xml -fo
..\XSL-FO\pcs_Kommissionierung_automatisch.fo -pdf
..\Output\PDF\PA\pcs_Kommissionierung_automatisch.pdf

XSL-FO Image import extract :

fo:block text-align=center padding-after=15pt
fo:external-graphic
src=../Output/Bilder/EA_Diagrammen/SVG/d206_PDF.svg
content-type=content-type: xml/svg block-progression-dimension=17cm
inline-progression-   dimension=25.7cm/
/fo:block

The SVG width and Height have been set in a way that they fit a given
area on the page.

And here the header of the SVG :

svg xmlns:xlink=http://www.w3.org/1999/xlink; width=525 height=503
viewBox=-19 -14 1189 1140 preserveAspectRatio=xMinYMin meet
kerning=0 xml:space=preserve style=stroke: black; fill: none;
g../g
/svg

Any help would be appreciated ;-)

regards

Lawrence Michel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images

2005-07-19 Thread michella
I already tried this alternate way, but it didn't change anything. 
(StrokeSVGText set to false)

The SVG contains more or less 40 to 60 graphics (g). Each one having text with 
ellipses, rect, and so on.

I tried the external Batik Rasterizer SVG to pdf conversion. The Pdf output is 
small (300k per SVG) ... and perfect.

The external-graphics tag included has two xsl-fo:blocks as parents (ie parent 
+ grandparent). Could it be the problem?
Second : As you'll see, the graphics blocks are all in one single page-sequence 
and flow. Is there a problem with that?

FO Abstract :

fo:page-sequence master-reference=Title font-family=Frutiger45Light
fo:flow flow-name=xsl-region-body
fo:block id=d1e390153.4pct_Sortierung_NF break-before=page
fo:block text-align=center padding-after=15pt
fo:external-graphic 
src=../Output/Bilder/EA_Diagrammen/SVG/d211_PDF.svg 
content-type=content-type: xml/svg block-  
progression-dimension=17cm inline-progression-dimension=25.7cm/
/fo:block
/fo:block
(... + 48 times identical blocs with SVG graphics...)
/fo:flow
/fo:page-sequence

Thank you for your help

Lawrence Michel

-Ursprüngliche Nachricht-
Von: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 19. Juli 2005 16:04
An: fop-users@xmlgraphics.apache.org
Betreff: Re: Huge size of Output PDF when inserting 49 SVG Images


You can have a look at the strokeSVG switch:
http://xml.apache.org/fop/configuration.html#strokeSVGText

If it's set to true all text is rendered as shapes and takes (1) more
time and (2) more space, but is (3) probably more accurate. Switching it
to false might help but can have side-effects.

Also be sure to give the process enough memory so the garbage collector
kicks in later.

Maybe that helps.

On 19.07.2005 15:55:45 michella wrote:
 Hi all,
 
 I have an xsl-fo which inserts 49 SVG images into the PDF file. These
 files are diagrams, containing text and vectorial symbols.
 
 After launching the Fop processing, have a bath, coffee, and so on, I
 finally get a nice 730 MB Pdf file of 160 pages...
 The Word comparison is... 1.4 Mb...
 
 Is there any switch in FOP that might handle the SVG a bit more
 efficiently?
 
 FOP command :
 
 CALL ..\..\Tools\fop-0.20.5\fop -q -c
 ..\..\Tools\fop-0.20.5\conf\PostConfig.xml -fo
 ..\XSL-FO\pcs_Kommissionierung_automatisch.fo -pdf
 ..\Output\PDF\PA\pcs_Kommissionierung_automatisch.pdf
 
 XSL-FO Image import extract :
 
 fo:block text-align=center padding-after=15pt
   fo:external-graphic
 src=../Output/Bilder/EA_Diagrammen/SVG/d206_PDF.svg
 content-type=content-type: xml/svg block-progression-dimension=17cm
 inline-progression- dimension=25.7cm/
 /fo:block
 
 The SVG width and Height have been set in a way that they fit a given
 area on the page.
 
 And here the header of the SVG :
 
 svg xmlns:xlink=http://www.w3.org/1999/xlink; width=525 height=503
 viewBox=-19 -14 1189 1140 preserveAspectRatio=xMinYMin meet
 kerning=0 xml:space=preserve style=stroke: black; fill: none;
 g../g
 /svg


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images

2005-07-19 Thread Jeremias Maerki

On 19.07.2005 17:27:38 michella wrote:
 I already tried this alternate way, but it didn't change anything.
 (StrokeSVGText set to false)
 
 The SVG contains more or less 40 to 60 graphics (g). Each one having
 text with ellipses, rect, and so on.
 
 I tried the external Batik Rasterizer SVG to pdf conversion. The Pdf
 output is small (300k per SVG) ... and perfect.

The PDF Transcoder delivered with Batik is based on the FOP Trunk code
(redesign). It could very well be that there are considerable
improvements for your use case.

If all you do is basically use XSL-FO to place a set of SVGs on several
pages you could try the trunk source code.
http://xml.apache.org/fop/download.html#source

There's a little catch ATM: A bug may render the SVGs too small. I
already fixed that on my machine at home (I'm at ApacheCon ATM) but I'm
pretty sure I fixed it the wrong way. I still have to investigate that
and probably won't be able to fix it before next week. As a momentary
work-around you could make sure that the if-statement in the line below
(found in PDFXMLHandler.java) always resolves to false:

old:
if (!at.isIdentity()) {

new:
if (false  !at.isIdentity()) {

Depending on your skills that may sound adventurous, but that's all I
can offer right now.

 The external-graphics tag included has two xsl-fo:blocks as parents (ie
 parent + grandparent). Could it be the problem?

No.

 Second : As you'll see, the graphics blocks are all in one single
 page-sequence and flow. Is there a problem with that?

No.

 FO Abstract :
 
 fo:page-sequence master-reference=Title font-family=Frutiger45Light
   fo:flow flow-name=xsl-region-body
   fo:block id=d1e390153.4pct_Sortierung_NF break-before=page
   fo:block text-align=center padding-after=15pt
   fo:external-graphic 
 src=../Output/Bilder/EA_Diagrammen/SVG/d211_PDF.svg 
 content-type=content-type: xml/svg block-  
 progression-dimension=17cm inline-progression-dimension=25.7cm/
   /fo:block
   /fo:block
   (... + 48 times identical blocs with SVG graphics...)
   /fo:flow
 /fo:page-sequence
 
 Thank you for your help
 
 Lawrence Michel
 
 -Ursprüngliche Nachricht-
 Von: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
 Gesendet: Dienstag, 19. Juli 2005 16:04
 An: fop-users@xmlgraphics.apache.org
 Betreff: Re: Huge size of Output PDF when inserting 49 SVG Images
 
 
 You can have a look at the strokeSVG switch:
 http://xml.apache.org/fop/configuration.html#strokeSVGText
 
 If it's set to true all text is rendered as shapes and takes (1) more
 time and (2) more space, but is (3) probably more accurate. Switching it
 to false might help but can have side-effects.
 
 Also be sure to give the process enough memory so the garbage collector
 kicks in later.
 
 Maybe that helps.
 
 On 19.07.2005 15:55:45 michella wrote:
  Hi all,
  
  I have an xsl-fo which inserts 49 SVG images into the PDF file. These
  files are diagrams, containing text and vectorial symbols.
  
  After launching the Fop processing, have a bath, coffee, and so on, I
  finally get a nice 730 MB Pdf file of 160 pages...
  The Word comparison is... 1.4 Mb...
  
  Is there any switch in FOP that might handle the SVG a bit more
  efficiently?
  
  FOP command :
  
  CALL ..\..\Tools\fop-0.20.5\fop -q -c
  ..\..\Tools\fop-0.20.5\conf\PostConfig.xml -fo
  ..\XSL-FO\pcs_Kommissionierung_automatisch.fo -pdf
  ..\Output\PDF\PA\pcs_Kommissionierung_automatisch.pdf
  
  XSL-FO Image import extract :
  
  fo:block text-align=center padding-after=15pt
  fo:external-graphic
  src=../Output/Bilder/EA_Diagrammen/SVG/d206_PDF.svg
  content-type=content-type: xml/svg block-progression-dimension=17cm
  inline-progression-   dimension=25.7cm/
  /fo:block
  
  The SVG width and Height have been set in a way that they fit a given
  area on the page.
  
  And here the header of the SVG :
  
  svg xmlns:xlink=http://www.w3.org/1999/xlink; width=525 height=503
  viewBox=-19 -14 1189 1140 preserveAspectRatio=xMinYMin meet
  kerning=0 xml:space=preserve style=stroke: black; fill: none;
  g../g
  /svg
 
 
 Jeremias Maerki
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]