(For non-macs, you can look at ) The readme is greatly detailed and if you read all of the instructions carefully, it will work, however I had a little trouble getting all the pieces, so I will outline exactly what I did in the hopes of saving someone else some trouble. But here's what I did:ĭownload the source code from codepoet cups-pdf-for-mac-os-x. #Cups pdf for mac for mac#I really wish I could accept two answers because I don't think I could have done this without all of Pfeifle 's help for Mac specifics and just understanding printer drivers and locations of files. Update: Looks like I forgot 2 quotes in my originally prescribed *cupsFilter. #Cups pdf for mac pdf#Modify the 2dir in a way that adds your desired modifications to your PDF before saving on the result in /tmp/pdfqueue/*.pdf. It's simple Bash, and reasonably well commented. Sudo launchctl load /System/Library/LaunchDaemons/įrom now on your pdfqueue will cause each job printed to it to end up as PDF in /tmp/pdfqueue/*.pdf. Re-start the CUPS scheduler: sudo launchctl unload /System/Library/LaunchDaemons/ That '-' filter is a special one: it does nothing, it is a passthrough filter. *cupsFilter: "application/pdf 0 -" (Make sure the *cupsFilter starts at the very beginning of the line.) This line tells cupsd to auto-setup a filtering chain that produces PDF and then call the last filter named '-' before it sends the file via a backend to a printer. Locate the PPD used by this queue in /etc/cups/ppd/ (its name should be pdfqueue.ppd).Īdd the following line (best, near the top of the PPD): (with none of the modifications you want yet). Each result should for now be a PostScript file. The 2dir backend now will write all output to directory /tmp/pdfqueue/ and it will use a uniq name for each job. Make sure when copying that you get the line endings right (Unix-like). That one can be copied from this website: KDE Printing Developer Tools Wiki. Initially, use the (educational) CUPS backend named 2dir. (A PostScript PPD is one which does not contain any *cupsFilter. But I recommend to use a PostScript driver/PPD. #Cups pdf for mac driver#Set up a print queue with any driver you like. If anyone can get either of these to work on a mac through the terminal, please let me know step-by-step how you did it. And if anyone is looking for a user-end PDF-printer, this cups-pdf-for-mac-os-x is one that works through the installer, however I have the same issue of no file appearing in the indicated directory when I download the source and follow the instructions in the readme. I've worked through this printing with CUPS tutorial and seem to get everything set up okay, but the file never seems to appear in the appropriate temporary location. I guess my questions are: how do I add a virtual "printer" driver for the user that will launch the application I've been developing that will make the PDF (or make the PDF and launch my application with references to the newly generated PDF)? How do I interface with CUPS to generate the PDF? I'm not sure I'm being clear, so let me know if more information would be helpful. I want to add a print option that prints whatever the user's document is to a PDF and adds some headers before sending it off to a device.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |