Bug 689726 - -dEPSCrop depends on EPSF-3.0 header?
Summary: -dEPSCrop depends on EPSF-3.0 header?
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 8.61
Hardware: PC Linux
: P4 enhancement
Assignee: Ray Johnston
QA Contact: Bug traffic
Depends on:
Reported: 2008-02-27 11:47 UTC by Hin-Tak Leung
Modified: 2013-06-08 17:06 UTC (History)
1 user (show)

See Also:
Word Size: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Hin-Tak Leung 2008-02-27 11:47:34 UTC
Not sure if this is considered a bug or not - but the documentation for 
-dEPSCrop probably can be updated if the behavior is intentional.

I was trying to do 
gs -sDEVICE=tiffg4 -dEPSCrop -dNOPAUSE -dBATCH boundbox_A4.ps

and gs cropped the output to to letter (the default paper size); adding 
EPSF-3.0 in the header get the desired behavior (crop to a little inside A4).

I guess what I expect is that EPSCrop works as boundbox crop,
(with or without EPSF header; probably not relevant to pdf?). 
Would a boundingboxcrop  be considered a useful improvement?
The current behavior seems to be intentional, since
it depends on all the EPS hooks. But I can see for most graphic conversion,
boundingbox crop is desirable (and the input should be EPS without declaring so).
Comment 1 Ray Johnston 2008-02-27 21:06:28 UTC
This is not a bug in that EPSCrop is intended to only do something for DSC
compliant EPSF files, with the appropriate header.

Producing images by first running a bbox on the file is something that requires
two passes on the file, and since it would slow things down, we don't want to
do it.

The section in doc/Use.htm _does_ mention Document Structuring Conventions (DSC)
but this could be improved slightly by adding a reference to Adobe's document
on DSC and explaining that EPSCrop and EPSFitPage ONLY apply to DSC compliant
EPSF files.

I don't think Ken should be bothered with this.
Comment 2 Hin-Tak Leung 2008-02-28 05:30:01 UTC
Yes, I checked the actual code and it checks for "%!PS-Adobe-a.b EPSF-c.d" 
headers; and the documentation did mention in 


that it needs to be DSC compliant; however I think it is appropriate and 
relevant to briefly mention DSC compliantness at the beginning of


Comment 3 Hin-Tak Leung 2008-03-19 18:17:38 UTC
Oh, the fact that it requires two passes mean that this option does not work
with pipes, right? Should mention that if that's the case.... 
Comment 4 Ray Johnston 2013-06-08 17:06:38 UTC
The doc/Use.htm has this statement which should be sufficient:

An EPS file must conform to the Document Structuring Conventions