Postscript to PDF help

Discussion in 'Mac Programming' started by Ianarchy, May 20, 2012.

  1. Ianarchy macrumors newbie

    May 20, 2012
    Hello, I'm new to the forum and new to Mac as well. I've done a lot of reading, research and experimenting but so far can not find what I want, maybe someone here can help.

    What I'd like is to print to PDF but the PDF is first rendered as a postscript file then saved as a PDF and the postscript deleted.

    I have found no program that does this and even experimented with CUPS-PDF to no avail. I've been thinking there might be an applescript that could perform this task, but my search has not found any and I'm completely green with Mac scripting.

    Any ideas?
  2. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    Please describe exactly what you want to accomplish. You've partially described some attempted solutions, but you haven't described what you're trying to accomplish.
    .. You want to do X, and you think Y is the best way of doing it.
    .. Instead of asking about X, you ask about Y.

    Why does it first have to be rendered to Postscript, if the PS will then be rendered to PDF and the PS deleted? One could render it to hieroglyphics or Morse code as an intermediate step, then delete that, but the result is the same: output in PDF. So please explain exactly why the intermediate Postscript is needed, if it's only going to be deleted.

    Exactly what is doing the printing to PDF? Applications that use the system print dialogs? Do you mean you want a printer "device" that produces PDF? Isn't that what CUPS-PDF is? If that's not what you want, please explain how what you want differs from CUPS-PDF, and exactly how CUPS-PDF failed to produce the desired result. Be specific.

    You've described what you want as output: PDF. That's clear enough. Unfortunately, I don't see any description of the input or the processing tool. So two of the three elements of a standard Input:process:Output chain are missing. All we know is you want some tool to process some input and produce PDF.

    It's possible some command-line tools might do what you want, like enscript, but without knowing the input or the processing tool, that's just a wild guess.
  3. xStep macrumors 68000

    Jan 28, 2003
    Less lost in L.A.
    As chown33 mentioned, more information is needed. Are you writing a OS X app using Objective-C, or writing a script that processes some data through several other steps and apps? Details matter.

    In the meantime, check out the very first paragraph here.

    If you are writing a script and Preview isn't appropriate, perhaps installing Ghostscript is a solution. It can convert PS to PDF.

    chown33. Around 2005 I have had one scenario where PS was needed before producing a PDF. It was a strange work related one where I converted an existing text report to include graphics. I had a pre-writtten header block of PS, dynamically included pre-written blocks of EPS code for each required graphic per report, and calculated each graphic rendering position and reuse of graphic where needed. Once that PS creation was completed, I rendered to PDF for email and use half way around the world to reduce mis-printing on computer chips. Given a time constraint, this path was much easier than learning the more complicated setup of PDF that I ran into. The report is still in use today. :D
  4. Ianarchy thread starter macrumors newbie

    May 20, 2012
    Thanks for the replies, guys, I will be happy to explain more.

    I have several company documents that are in Pages and these have to be altered and saved as PDFs very frequently. The standard Mac print to PDF puts out a file size that is insanely big for my purposes and/or the quality is too poor to show a client. The only way I have found to make a PDF with both a decent resolution and a small file size is to first save it as a .ps then through Adobe Distiller convert it to PDF. This is the only method I've found to consistently give me good results. I've tried tweaking the Pages file in many different ways, and I've tried many different methods of saving/exporting to PDF, but at the end of the day, the version that looks the best across all platforms is .ps to .pdf through Distiller.

    So, in a perfect world, what I'd like is for this to be a one step process. The same way in Print I can choose "Save As PDF", "Save As Postscript", "Save As Adobe PDF", etc. I would like to be able to "Save As PS/PDF" or some such thing where the file first goes out as .ps then converts through Distiller and deletes the .ps giving me the .pdf file rendered in the way that I want.

    Clown33 & xStep - thank you for the links you provided, I will have a careful read through them and see what I can pick out. I appreciate your help.
  5. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    I suggest a folder action.

    Create a folder with a folder action. It can be any folder. Use Automator to make the folder action. In the action, have it run or Distiller to open the Postscript, convert to PDF, then save in another output folder.

    Now you can save a whole bunch of Pages documents to Postscript, then move the whole lot of .ps files to your actionized folder. That moving of files triggers the folder action. If that doesn't make sense, then read about folder actions (google search terms: mac folder actions).

    I recommend Automator over raw AppleScripts because Automator has a bunch of conversion actions builtin.

    To find more options, google search terms: postscript to pdf mac
  6. Ianarchy thread starter macrumors newbie

    May 20, 2012
    Thanks Clown33, that's good advice.

    Yes, I looked at Automator when I first wanted to do this project and coincidentally started coming back to it today.

    Could you tell me where I might find the action for saving as a postscript? I see lots of Automator options for saving as a PDF, so surely there must be a way to save as a postscript. If I can find, or create, that action then couldn't I run a print->PDF option the same as "Save As Adobe PDF" in the PDF menu that would save as a postscript, run the postscript through distiller and delete the .ps file?

Share This Page