<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>You can create a PPD file that accepts application/pdf, application/postscript, and application/vnd.cups-postscript:</div><div><br></div><div>    *cupsFilter: "application/pdf 0 -"</div><div>    *cupsFilter: "application/postscript 0 -"</div><div>    *cupsFilter: "application/vnd.cups-postscript 0 -"</div><div><br></div><div>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.</div><div><br></div><div>Keep in mind that most Mac applications natively produce PDF via CoreGraphics/Cocoa...</div><br><div><div>On Apr 21, 2009, at 7:09 AM, Dave Foster wrote:</div><blockquote type="cite"><div><blockquote type="cite">Dave Foster wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">...<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I have read a lot of the documentation on this site, and it seems<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">that this might be possible with a CUPS filter or backend. I am just<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">struggling to find how to begin - what program to use to write it,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">how to reference the app, and where to put it. I am on Mac OSX 10.5.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">What you want to do is a PDF workflow - there are some examples on<br></blockquote><blockquote type="cite">the Apple support site:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><a href="http://support.apple.com/kb/index?page=search&src=support_site.home&locale=en_US&q=pdf%20workflow">http://support.apple.com/kb/index?page=search&src=support_site.home&locale=en_US&q=pdf%20workflow</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This way you can just hit CMD+P and choose your workflow action to<br></blockquote><blockquote type="cite">fiddle with the page and print it, or save it off to PDF (as you<br></blockquote><blockquote type="cite">like).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--<br></blockquote><blockquote type="cite">______________________________________________________________________<br></blockquote><blockquote type="cite">Michael R Sweet                        Senior Printing System Engineer<br></blockquote><blockquote type="cite"><br></blockquote><br>Hi Michael,<br><br>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.<br><br>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.<br><br>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?<br><br>Many thanks,<br><br>Dave<br><br>_______________________________________________<br>cups-dev mailing list<br><a href="mailto:cups-dev@easysw.com">cups-dev@easysw.com</a><br>http://lists.easysw.com/mailman/listinfo/cups-dev<br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>________________________________________</div><div>Michael R Sweet, Senior Printing System Engineer</div></div></div></span></span>
</div>
<br></body></html>