You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Jeremias Maerki <de...@greenmail.ch> on 2003/05/01 10:50:22 UTC

Re: Rendering PDF with EPS graphics in it

On 25.04.2003 18:30:58 Olivier Imbert wrote:
> Hi all,
> I sent the mail hereafter on the user list but nobody answer so I send it here 
> ...
> 
>  I have to render PDF including EPS graphics.
>  Everything renders fine using FOP 0.20.4.
>  I got a performance issue when printing on a PostScript printer  (several
>  types used) thru Acrobat Reader : for each page including EPS graphics the
>  printer spend a lot of time (formatting ?) before printing.
>  Printing an equivalent document from WordPerfect to the postscript printer
>  works fine.
>  Any idea ? Is there anything I can tune in the way FOP encapsulate EPS in
>  PDF ?
> 
> One thing I cannot understand is why fop insert a "scale" command before the 
> eps content and why this scale command is linked to the bounding box of the 
> eps ... The scale parameter seem very small also ...

I did not write the EPS wrapper but I believe the scale parameter is
basically so small (around 1/1000) because FOP works with millipoints
internally while PostScript/EPS works with points (1pt = 1000
millipoints) initially.

> For the same EPS file I got the fop following generation :

<snip what="Two PostScript wrappers for EPS files"/>

> Any idea or suggestion will be welcome ...

Unfortunately, I don't have access to a PostScript printer ATM so I
could test myself. But you could try the following to circle in possible
causes:
- Create a PostScript file from the PDF by printing to a file instead of
  to the printer.
- Edit the PostScript file and play with the code by commenting out one
  or more lines containing the "scale", "transform" etc. to see if the
  processing speed changes (even though the output won't be good
  anymore).
- The rest of the wrapper code doesn't look all that different but fact
  is that quite some data has to be pushed on the stack. This might be
  possible cause for slowness.
- Does the problem happen on a different printer also? With different
  EPS files? Does commenting out the EPS improve the speed?

Anyway, I'm not a pro in PostScript yet and I haven't dealt with
performance problems so I'm not a big help here. Maybe you could find
some advice in a place dedicated to PostScript. If you find anything we
would be glad to hear from you.

Have you tried to use SVG instead of EPS?

I hope this helps a bit.

Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Rendering PDF with EPS graphics in it

Posted by Jeremias Maerki <de...@greenmail.ch>.
On 02.05.2003 08:37:05 Olivier Imbert wrote:

<snip/>

> > Anyway, I'm not a pro in PostScript yet and I haven't dealt with
> > performance problems so I'm not a big help here. Maybe you could find
> > some advice in a place dedicated to PostScript. If you find anything we
> > would be glad to hear from you.
> >
> > Have you tried to use SVG instead of EPS?
> 
> I try that but I got two kinds of issue :
> - I am not able to take care of the bounding box I defined in the EPS ... I 
> don't know if it is an EPS to SVG problem or a Batik problem. I use 
> "pstoedit" to convert. Have you another suggestion ?

I did successful conversions using Adobe Illustrator and CorelDraw in
the past.

> - It seems that batik transform the SVG vectors to a bitmap image so I lost 
> quality. Is there a way to transform batik directly to PDF drawing dirrective 
> ?

Nah, not bitmaps. Fonts are painted as shapes and if Acrobat Reader has
smoothing disabled you get the impression of a bitmap file. See:
http://xml.apache.org/fop/graphics.html#svg-pdf-text
>  
> > I hope this helps a bit.
> 
> Yes it's help a bit ! Thanks !
> I continued to investigate and another track could be the fact that my EPS 
> graphics are encapsulated into several fo:table (fo:table within an 
> fo:table-cell) ... During fo:table to PDF generation is there some heavy code 
> generated ? (scaling ?)

I don't think so. Only a translation matrix or a moveto for the
indentation. But it is known that FOP's performance (not the printer's)
may suffer when a lot of table stuff is used.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org


Re: Rendering PDF with EPS graphics in it

Posted by Olivier Imbert <Ol...@laposte.net>.
Thanks for your answer Jeremias.

> Unfortunately, I don't have access to a PostScript printer ATM so I
> could test myself. But you could try the following to circle in possible
> causes:
> - Create a PostScript file from the PDF by printing to a file instead of
>   to the printer.
> - Edit the PostScript file and play with the code by commenting out one
>   or more lines containing the "scale", "transform" etc. to see if the
>   processing speed changes (even though the output won't be good
>   anymore).

About playing with the scale stuff in the EPS wrapper : I will try that.

> - The rest of the wrapper code doesn't look all that different but fact
>   is that quite some data has to be pushed on the stack. This might be
>   possible cause for slowness.
> - Does the problem happen on a different printer also? With different
>   EPS files? Does commenting out the EPS improve the speed?

The problem happend in every PS printer I try.

> Anyway, I'm not a pro in PostScript yet and I haven't dealt with
> performance problems so I'm not a big help here. Maybe you could find
> some advice in a place dedicated to PostScript. If you find anything we
> would be glad to hear from you.
>
> Have you tried to use SVG instead of EPS?

I try that but I got two kinds of issue :
- I am not able to take care of the bounding box I defined in the EPS ... I 
don't know if it is an EPS to SVG problem or a Batik problem. I use 
"pstoedit" to convert. Have you another suggestion ?
- It seems that batik transform the SVG vectors to a bitmap image so I lost 
quality. Is there a way to transform batik directly to PDF drawing dirrective 
?
 
> I hope this helps a bit.

Yes it's help a bit ! Thanks !
I continued to investigate and another track could be the fact that my EPS 
graphics are encapsulated into several fo:table (fo:table within an 
fo:table-cell) ... During fo:table to PDF generation is there some heavy code 
generated ? (scaling ?)

>
> Jeremias Maerki

Olivier Imbert.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-dev-unsubscribe@xml.apache.org
For additional commands, email: fop-dev-help@xml.apache.org