[cups.development] A postscript rendering filter

Michael Sweet mike at easysw.com
Mon May 22 14:06:17 PDT 2006


Matt Anderson wrote:
> Michael Sweet wrote:
>> You should just set the job-sheets attribute using the context you
>> get via the domain socket.  That said, the context of the application
>> may not reflect the context of the document being printed...
> 
> It almost always doesn't reflect that context.  It supersedes it, which
> meets the evaluation requirement, but is less than useful for the MCS
> case which is Redhat's main goal.  The advisory label should bridge this
> gap.
> 
>> I don't think this will work, since lp and lpr are only two ways of
>> submitting jobs to CUPS.  KDE and GNOME applications both use the
>> native CUPS API now, so that will also need to be taken into
>> consideration.  If you change things at the CUPS API level then
>> you should be well covered...
> 
> I'll look into that.  Perhaps a check during cupsFileOpen and an added
> field to cups_file_t?

No, look at cups/request.c - we aren't currently using the CUPS
file API here (and probably never will, since we want to preserve
any compression on the file), so you'll just need to query the
file's context and pass it along with the request somehow.

>> But the security banners would be added to the sanitized PostScript,
>> not to the original PostScript, so even if the user added showpage
>> magic to the original document, that would not be passed on in the
>> pswrite output from Ghostscript...
> 
> hmmm..  This sounds good to me, but I'm pretty sure my security
> evaluator isn't going to like this answer.

Ghostscript is interpreting the original PostScript and then
generating a new file containing only vectors and images.  It
is akin to printing using the PDF driver.  You can then
overlay anything you like and then feed the result to a PS
printer or back into Ghostscript to get converted to raster
data for printing.

>> Where?
> 
> http://www.cups.org/espgs/documentation.php

OK, Ghostscript documentation is a non-starter right now (no funding,
no volunteers); look under the CUPS tab for CUPS documentation...

>> When I click on the CUPS Raster Format HTML link, I get the
>> correct HTML...
>>
>> Also, the current CUPS book talks about it, as does the CUPS DDK
>> manual.
> 
> Those are all great, thanks.
> 
> -matt
> 


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




More information about the cups-devel mailing list