[cups.development] Newbie question
Michael Sweet
msweet at apple.com
Tue Apr 21 10:17:49 PDT 2009
You can create a PPD file that accepts application/pdf, application/
postscript, and application/vnd.cups-postscript:
*cupsFilter: "application/pdf 0 -"
*cupsFilter: "application/postscript 0 -"
*cupsFilter: "application/vnd.cups-postscript 0 -"
and then have your backend grab the print file from argv[6]. The
format will be in the CONTENT_TYPE environment variable. You can list
any format you accept directly.
Keep in mind that most Mac applications natively produce PDF via
CoreGraphics/Cocoa...
On Apr 21, 2009, at 7:09 AM, Dave Foster wrote:
>> Dave Foster wrote:
>>> ...
>>> I have read a lot of the documentation on this site, and it seems
>>> that this might be possible with a CUPS filter or backend. I am just
>>> struggling to find how to begin - what program to use to write it,
>>> how to reference the app, and where to put it. I am on Mac OSX 10.5.
>>
>> What you want to do is a PDF workflow - there are some examples on
>> the Apple support site:
>>
>>
>> http://support.apple.com/kb/index?page=search&src=support_site.home&locale=en_US&q=pdf%20workflow
>>
>> This way you can just hit CMD+P and choose your workflow action to
>> fiddle with the page and print it, or save it off to PDF (as you
>> like).
>>
>> --
>> ______________________________________________________________________
>> Michael R Sweet Senior Printing System
>> Engineer
>>
>
> Hi Michael,
>
> Thanks for your reply. I have looked into your suggestion of using a
> workflow, but this is less than ideal because a) The process of
> choosing the workflow adds an extra step to the process and b) I
> want to try and avoid doing the intermediate step of converting to
> PDF.
>
> I have been studying the documentation on this site and in your
> book, and have tinkered with various bits of CUPS code - printing
> files from Terminal and generating an executable file which prints a
> file using XCode. I have also got as far as replacing the cups-pdf
> backend with my own code which runs (this gets me pretty close
> because I can batch print to it without any extra keystrokes or
> menus) - but I am stuck at how to pass the job data to it (or access
> it) to be able to achieve what I want to.
>
> Any suggestions on how I can proceed, or if I'm barking up the wrong
> tree etc., would be much appreciated - or if you could point me in
> the direction of somewhere else I could enquire?
>
> Many thanks,
>
> Dave
>
> _______________________________________________
> cups-dev mailing list
> cups-dev at easysw.com
> http://lists.easysw.com/mailman/listinfo/cups-dev
________________________________________
Michael R Sweet, Senior Printing System Engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cups.org/pipermail/cups/attachments/20090421/161ac828/attachment.html>
More information about the cups
mailing list