On Sunday 30 July 2006 4:03 pm, Keith Marshall wrote: > > I'd fix that sed script myself if I had a faintest idea how to > > reliably distinguish a valid embedded EPS from a blank page. > > The problem with this sed script was that it would delete EVERYTHING > from the `%%Page: n n' marker record for a new page, down to the first > line of PostScript code following the associated `%%EndPageSetup' > marker, if it matched the regular expression `0 *Cg *EP' ANYWHERE > within that line range. Clearly, this was too greedy a match > specification, which could remove page headers where they should have > been retained, potentially even leading to an invalid PostScript output > stream. > > I've now tightened the requirement...
But not tightly enough, for it failed my `teapot' test, to the extent that sed would hang, or segfault, while trying to parse the embedded EPS photographic images. This too is now fixed in CVS. For anyone who fancies an amusing read, the `teapot' test source is attached; you need the latest CVS pdfroff to format it: pdfroff --no-toc -ms teapot.ms > teapot.pdf Regards, Keith. _______________________________________________ Groff mailing list Groff@gnu.org http://lists.gnu.org/mailman/listinfo/groff