Help: Using FOP with embedded image in SVG

Here should go questions about transforming XML with XSLT and FOP.
toma
Posts: 1
Joined: Thu Jun 23, 2005 1:21 pm

Help: Using FOP with embedded image in SVG

Post by toma » Thu Jun 23, 2005 1:31 pm

Hi,

I'm new in XSLT and FOP world and already have problems ;). I'm trying to generate pdf file from xml and xslt with fop. The xml contains svg part wich contains an embedded image (png). Problem is that resulting pdf is huge respect to image+text size (unreasonable huge!). The image is about 5K and it repeates itself on 10-20 pages as small header. Fop is slow processing it and offten runs out of memory (I have already set 512Mb for it). Any help is appreciated.

Thank you,
Toma.

sorin_ristache
Posts: 4144
Joined: Fri Mar 28, 2003 2:12 pm

Re: Help: Using FOP with embedded image in SVG

Post by sorin_ristache » Fri Jun 24, 2005 12:42 pm

Hello,
toma wrote:Problem is that resulting pdf is huge respect to image+text size (unreasonable huge!).
What do you mean unreasonable huge ? For a 1.5 MB XML source a PDF result of 2.5 MB is normal.
toma wrote:The image is about 5K and it repeates itself on 10-20 pages as small header.
FOP inserts the image into the PDF so the image will take a space of 20 x 5kB.
toma wrote:Fop is slow processing it and offten runs out of memory (I have already set 512Mb for it).
FOP was continually improved but it can still consume a large memory space. That is an effect of the formatting process and FOP implementation choices. All FO processors that exist now on the market have memory problems with certain output layouts. You should be careful about:
  • Avoid forward references that is references to some later part of a document. Examples include page number citations refering to pages following the citation, tables of contents at the beginning of a document, page numbering schemes that include the total number of pages in the document.
  • If you edit the FO document directly use multiple page sequences. FOP starts rendering after the end of a page sequence is encountered. While the actual rendering is done page-by-page, some additional memory is freed after the page sequence has been rendered.
Best regards,
Sorin

Post Reply