[cairo] Semantics of transparent objects on opaque targets (image vs. PostScript)

Michael Sweet mike at easysw.com
Fri Jan 13 14:39:13 PST 2006


Carl Worth wrote:
> On Fri, 13 Jan 2006 12:34:30 -0800, Carl Worth wrote:
>> On Fri, 13 Jan 2006 15:16:22 -0500, Michael Sweet wrote:
>>
>>> On a separate, nit-picky note, your PS output does not conform to
>>> the Adobe Document Structuring Conventions:
>> Hey, thanks for the careful look. This is greatly appreciated!
> 
> I've now committed fixes to cairo for each of the identified issues.
> 
> Take a look at the attached output (which is generated by
> cairo---latest CVS plus some patches to re-enable some vector
> PostScript output) and let me know if you see any remaining
> problems. It is pessimistic about LanguageLevel and DocumentData
> (always stating 3 and Binary respectively) even when (such as this
> case) the document could work with 2 and Clean7Bit just fine.

OK, you're real close now - the %%Page comment needs two values, the
page title and the page number.  The page number MUST go from 1 to N
(and in that order) in the file, while the page title is a string that
can contain any characters except spaces and control chars.  Typically
you just plug in the page number twice, e.g.:

     %%Page: 1 1
     ...
     %%Page: 2 2

Finally, binary PostScript is not portable - you should always use
Base85 or hex encoding of all binary data, even compressed data.
Otherwise the file will not print on most printers... :(

(If you know for sure that a printer will support binary data, you
still need to add DSC comments for it so the PostScript filter
doesn't destroy your data... :)

Anyways, I'd at least offer Level 2/3 and Binary/ASCII as options
when creating the PostScript surface - that way the app can choose
the best format for the printer.  (Just stub it in for now, and I'll
make the options do the Right Thing... :)

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com


More information about the cairo mailing list