xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bowditch <bowditch_ch...@hotmail.com>
Subject Re: Duplicate fonts in PDF when Distiller processes fop PostScript
Date Mon, 16 Jan 2012 16:38:26 GMT
On 11/01/2012 04:46, Craig Ringer wrote:
> Hi all

Hi Craig,
>
> I'm struggling with font embedding in fop's PostScript output - it's
> embedding multiple copies of fonts, just like pdf output with
> fop-pdf-image, and this is causing some big problems with our RIP.
>
> As a workaround for the issues I've been having with fop-pdf-image where
> output PDFs land up with tens or hundreds of different embedded subsets
> of the same font, I've been trying to see if chucking PostScript output
> from fop through Adobe Acrobat Distiller would work better. In our
> current (non-fop-based) workflow Distiller seems to coalesce fonts so
> the documents that're produced contain only one copy of the font despite
> the input EPSs each having their own embedded subset. I was hoping it'd
> do the same for PostScript from fop.

In order to get FOP to de-duplicate resources in Postscript you need to 
have the following option enabled in the fop.xconf configuration file:

<optimize-resources>true</optimize-resources>

Have you enabled this option?

Chris

>
> Unexpectedly, I get the same kind of font duplication when I process
> fop's PostScript through distiller as I get from fop-pdf-image and the
> pdf renderer. A side-by-side comparison of the PostScript from the old
> system and from fop shows that the embedded EPS files are copied
> verbatim in to the PostScript stream by both fop and the old system, so
> it's not doing any kind of clever transformation to the EPS data its
> self. Somehow, though, the old system manages to merge fonts, and fop's
> PostScript output doesn't.
>
> The old system uses similar-looking pre- and post- eps inclusion
> procedures, but they're a little simpler. They don't try to compensate
> for leaked stack entries like fop's seem to; they also don't mess with
> `userdict', strokeadjust or overprint. There's certainly no font magic
> in them. It's not that, though, as I get the same results if I replace
> fop's pre- and post-eps procedures with those used in the old system.
>
> I don't speak PostScript particularly well, and I'm beginning to really
> bash my head against a wall here, so I thought I'd look for some advice.
> Is merging fonts the norm with Distiller, or is it something magic that
> the old system's PostScript file is doing? If it's the norm, what might
> Fop's PostScript files be doing to block it? If it's not the norm, any
> ideas how the old files might be doing the merging magic?
>
> I can happily provide PostScript files from the old system to anyone
> interested. The ones I'm working on are about 60MB each, but I can
> produce cut-down one page ones that should be no more than 5MB
> compressed. I don't know if I can legally provide excerpts of just the
> PostScript procedures so I'm going to err on the side of providing a
> whole file as a complete document.
>
> If I/we can figure out what's different it'll hopefully allow font
> merging in fop's PostScript output, so I'd be very happy to hear from
> anyone else interested in the same problem.
>
> I'm still working on PDF font merging in fop-pdf-image, btw, I was just
> hoping this would be a faster track where I could let Distiller do the
> merging for me. Merging fonts in fop-pdf-image will require me to extend
> fop's core to allow image handlers etc to hook on events in the renderer
> system so it's going to take patches to fop core and therefore time.
>
> Ideas on what might be going on? Let me know if you want a copy of the
> PostScript files involved.
>
> --
> Craig Ringer
>
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message