Re: PostScript output: missing %%DocumentNeededResources comment

2010-06-28 Thread Vincent Hennebert
Vincent Hennebert wrote:
 Hi Jeremias,
 
 Jeremias Maerki wrote:
 Hi Vincent,

 hmmyes, that's tricky. An (atend) requires a corresponding comment in
 the end, but resources is defined to provide at least one item. An
 ugly work-around would be to always list Helvetica as needed resources
 and to generate a corresponding %%IncludeResource although it might
 never be used.
 
 FWIW, when optimization mode is off, /all/ of the base 14 fonts are
 %%IncludeResource:’d in the setup section of the document, whether they
 are actually used or not; And they aren’t listed in
 %%DocumentNeededResources:. I don’t know whether it’s another violation
 of the DSC specification or not.

Having just re-checked, it is.


 At any rate, this happens only with the resource optimization disabled.
 I think I'd add the missing (atend) but omit the trailer comment (when
 there are no needed resources) in the hope that any consumer can deal
 with it. We've never had any complaints about DSC comments that caused
 trouble AFAICR.
 
 I guess using a document manager goes in pair with optimizing the
 PostScript output anyway.
 
 
 Thanks,
 Vincent
 
 
 On 25.06.2010 13:07:51 Vincent Hennebert wrote:
 Hi,

 The PostScript Document Structuring Conventions Specification states
 that the %%DocumentNeededResources: comment can be specified in the
 %%Trailer section, but if this is the case it must also be present in
 the header with an (atend) value.
 http://www.adobe.com/devnet/postscript/pdfs/5001.DSC_Spec.pdf

 This is not what FOP does. I suppose that that’s because external
 resources aren’t always needed (mainly, the base 14 fonts aren’t being
 used). But if they are then the document violates the DSC specification.

 There doesn’t seem to be any easy fix for that problem. We can’t
 systematically put it in the header because then it /must/ appear in the
 %%Trailer section as well. But if no base 14 font is used then it’s not
 needed. But if a base 14 font is used then I guess it’s too late when we
 know it, the header has already been produced. That kills a bit the
 utility of the (atend) feature.

 So... WDYT?

 Thanks,
 Vincent



 Jeremias Maerki



PostScript output: missing %%DocumentNeededResources comment

2010-06-25 Thread Vincent Hennebert
Hi,

The PostScript Document Structuring Conventions Specification states
that the %%DocumentNeededResources: comment can be specified in the
%%Trailer section, but if this is the case it must also be present in
the header with an (atend) value.
http://www.adobe.com/devnet/postscript/pdfs/5001.DSC_Spec.pdf

This is not what FOP does. I suppose that that’s because external
resources aren’t always needed (mainly, the base 14 fonts aren’t being
used). But if they are then the document violates the DSC specification.

There doesn’t seem to be any easy fix for that problem. We can’t
systematically put it in the header because then it /must/ appear in the
%%Trailer section as well. But if no base 14 font is used then it’s not
needed. But if a base 14 font is used then I guess it’s too late when we
know it, the header has already been produced. That kills a bit the
utility of the (atend) feature.

So... WDYT?

Thanks,
Vincent


Re: PostScript output: missing %%DocumentNeededResources comment

2010-06-25 Thread Jeremias Maerki
Hi Vincent,

hmmyes, that's tricky. An (atend) requires a corresponding comment in
the end, but resources is defined to provide at least one item. An
ugly work-around would be to always list Helvetica as needed resources
and to generate a corresponding %%IncludeResource although it might
never be used.

At any rate, this happens only with the resource optimization disabled.
I think I'd add the missing (atend) but omit the trailer comment (when
there are no needed resources) in the hope that any consumer can deal
with it. We've never had any complaints about DSC comments that caused
trouble AFAICR.

On 25.06.2010 13:07:51 Vincent Hennebert wrote:
 Hi,
 
 The PostScript Document Structuring Conventions Specification states
 that the %%DocumentNeededResources: comment can be specified in the
 %%Trailer section, but if this is the case it must also be present in
 the header with an (atend) value.
 http://www.adobe.com/devnet/postscript/pdfs/5001.DSC_Spec.pdf
 
 This is not what FOP does. I suppose that that’s because external
 resources aren’t always needed (mainly, the base 14 fonts aren’t being
 used). But if they are then the document violates the DSC specification.
 
 There doesn’t seem to be any easy fix for that problem. We can’t
 systematically put it in the header because then it /must/ appear in the
 %%Trailer section as well. But if no base 14 font is used then it’s not
 needed. But if a base 14 font is used then I guess it’s too late when we
 know it, the header has already been produced. That kills a bit the
 utility of the (atend) feature.
 
 So... WDYT?
 
 Thanks,
 Vincent




Jeremias Maerki



Re: PostScript output: missing %%DocumentNeededResources comment

2010-06-25 Thread Tom Browder
On Fri, Jun 25, 2010 at 06:37, Jeremias Maerki d...@jeremias-maerki.ch wrote:
 Hi Vincent,
...
 hmmyes, that's tricky. An (atend) requires a corresponding comment in
 the end, but resources is defined to provide at least one item. An
 ugly work-around would be to always list Helvetica as needed resources
 and to generate a corresponding %%IncludeResource although it might
 never be used.

Would two passes work as a first-order work-around?

-Tom


Re: PostScript output: missing %%DocumentNeededResources comment

2010-06-25 Thread Jeremias Maerki
Sure, just enable resource optimization. That already does the trick.
The issue here is the behaviour where resource optimization is off which
tries to avoid the second pass. But seriously, I doubt many people will
want to turn off resource optimization, especially when a lot of fonts
are configured, since FOP has to embed every possible font in the prolog.

On 25.06.2010 13:55:00 Tom Browder wrote:
 On Fri, Jun 25, 2010 at 06:37, Jeremias Maerki d...@jeremias-maerki.ch 
 wrote:
  Hi Vincent,
 ...
  hmmyes, that's tricky. An (atend) requires a corresponding comment in
  the end, but resources is defined to provide at least one item. An
  ugly work-around would be to always list Helvetica as needed resources
  and to generate a corresponding %%IncludeResource although it might
  never be used.
 
 Would two passes work as a first-order work-around?
 
 -Tom




Jeremias Maerki



Re: PostScript output: missing %%DocumentNeededResources comment

2010-06-25 Thread Vincent Hennebert
Hi Jeremias,

Jeremias Maerki wrote:
 Hi Vincent,
 
 hmmyes, that's tricky. An (atend) requires a corresponding comment in
 the end, but resources is defined to provide at least one item. An
 ugly work-around would be to always list Helvetica as needed resources
 and to generate a corresponding %%IncludeResource although it might
 never be used.

FWIW, when optimization mode is off, /all/ of the base 14 fonts are
%%IncludeResource:’d in the setup section of the document, whether they
are actually used or not; And they aren’t listed in
%%DocumentNeededResources:. I don’t know whether it’s another violation
of the DSC specification or not.


 At any rate, this happens only with the resource optimization disabled.
 I think I'd add the missing (atend) but omit the trailer comment (when
 there are no needed resources) in the hope that any consumer can deal
 with it. We've never had any complaints about DSC comments that caused
 trouble AFAICR.

I guess using a document manager goes in pair with optimizing the
PostScript output anyway.


Thanks,
Vincent


 On 25.06.2010 13:07:51 Vincent Hennebert wrote:
 Hi,

 The PostScript Document Structuring Conventions Specification states
 that the %%DocumentNeededResources: comment can be specified in the
 %%Trailer section, but if this is the case it must also be present in
 the header with an (atend) value.
 http://www.adobe.com/devnet/postscript/pdfs/5001.DSC_Spec.pdf

 This is not what FOP does. I suppose that that’s because external
 resources aren’t always needed (mainly, the base 14 fonts aren’t being
 used). But if they are then the document violates the DSC specification.

 There doesn’t seem to be any easy fix for that problem. We can’t
 systematically put it in the header because then it /must/ appear in the
 %%Trailer section as well. But if no base 14 font is used then it’s not
 needed. But if a base 14 font is used then I guess it’s too late when we
 know it, the header has already been produced. That kills a bit the
 utility of the (atend) feature.

 So... WDYT?

 Thanks,
 Vincent
 
 
 
 
 Jeremias Maerki