xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <dev.jerem...@greenmail.ch>
Subject Re: AW: Not-Solved - Huge size of Output PDF when inserting 49 SVG Images
Date Tue, 19 Jul 2005 15:45:17 GMT

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/d0000211_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:dev.jeremias@greenmail.ch] 
> 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/d0000206_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: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org



Jeremias Maerki


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


Mime
View raw message