[tex-k] epstopdf: %%BoundingBox: (atend)

Martin von Gagern Martin.vGagern at gmx.net
Fri Aug 21 13:34:42 CEST 2009


I'm concerned about the support for "%%BoundingBox: (atend)" in epstopdf.

Right now, a comment at the beginning of the file as well as its man
page state that this feature was not supported. In the history contained
within the file, however, there are at least three references to this
feature, which look like someone considers that feature to be supported.
There is some code present in the file to deal with the atend case.

That code, however, doesn't work for me. It uses tell on a pipe to
determine the number of bytes written, but at least on my Linux and
Perl, tell on a pipe will return -1, and the Perl documentation tells me
that this is normal and to be expected.

As a consequence, the script will seek to the wrong position when it's
done, causing the output it generates to be broken, causing gs to fail.

I originally reported this issue for Gentoo: http://bugs.gentoo.org/282129
There you can find an example file which exhibits this problem.

I don't know if there is any kind of public archive of past versions of
this tool, which might be used to see the changes introduced by recent
versions. I assume it used to work in the past, but don't know how.

If you consider atend support to be unfixably broken, undesirable, or in
any other way not worth the effort, it might make sense to have the
script print an error message when it detects this case, instead of the
current broken handling.

If, on the other hand, you wish to properly support atend bboxes, as I
would very much hope, then you should take care of this issue with the
pipe position, and should also update the header and man page to
officially claim support for these cases.

 Martin von Gagern

More information about the tex-k mailing list