Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A script to print to distiller folders in 10.2' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to print to distiller folders in 10.2
Authored by: ssevenup on Mar 05, '03 06:28:35PM

Too cool, but your taking a massive amount of detail for granted. I got this to work, but here are just a few missing details...

Finding these "folders" as devices in Print Center requires holding the option key down while clicking the Add button and using the Advanced option.

What printer description to select? I chose a pretty generic Lexmark driver and it failed. The default "generic" driver seems to work, but I'm not sure what functionality (if any) I'm loosing.

What permissions the script and watched folders should use (if that matters).

It appears that the script is supposed to reset the permissions to 666 on the postscript after it moves it. Obviously it gets moved because Distiller is finding it and Distilling it, but the pdf's wind up root:admin with -rw-rw-r-- so I can't move or delete them. The .ps files wind up root:admin with -rw-rw-rw-. The debug line I'm seeing is the one right after the chmod line. So the permissions look like they are getting set by the script, but obviously I must not have permission to delete files that are group admin and 666.

In spite of the name checking, Distiller is overwriting my output files on every attempt. There seems to be no option in Distiller to avoid this either.

Armed with this information I plan to modify this script to work with PStill (if possible), so thank's for the tip.

--MM

---
Mark Moorcroft
ELORET Corp. - NASA/Ames RC
Sys. Admin.



[ Reply to This | # ]
A script to print to distiller folders in 10.2
Authored by: ssevenup on Mar 05, '03 11:21:36PM

A few additions...

I partially solved the permissions problem when I changed the permissions on the folders the watched folders were contained in.

The script was looking in the "watched folder/In" for the existing postscript files, but Distiller moves them into the "watched folder/Out". I tweaked the script to have it look there and it started appending the suffix as expected. PStill uses another scheme that I had to deal with also.

I modified the script to accomodate PStill, but since PStill allows any prefix to the preference file in the watched folder, some allowances had to be made. I could have used globbing to find them, but instead I just standardized the naming myself. This would be less than optimal for general consumption without detailed instructions.

I never figured out how to have both the PStill and Distiller watched folders available without combining the functions in the same shell script. That sounded like too much work to tackle today. I wasn't sure if the name of the shell script was important. In other words I never figured out if I could just have two different scripts in /usr/libexec/cups/backend, but it didn't appear that would work (i.e. the name appeared significant).

I don't have a public folder at my disposal, but if the original author or anyone else would like to see my shell scripts, I can email them. I welcome suggestions on more elegent to accomplish the same thing. I am still learning the art of shell scripting. Also, I would prefer a /bin/sh version of this (not that I actually tried just changing the !#)

I'm not sure how much more useful this is than PDF Services, but I like the idea of the option just appearing in the printer list. The geek quotient is higher ;-) I heard yesterday that OSX limits the "quality" of the output to 72dpi, and that only a few apps manage to force it any higher. Photoshop and Illustrator were mentioned. This makes me wonder just how useful all these cool PDF workflow tools are. This also explains why so many say that they get the best results with PDF if they use something like TexShop, which avoids the OSX print subsystem altogether.

mmoorcroft "at" mail.arc.nasa.gov

---
Mark Moorcroft
ELORET Corp. - NASA/Ames RC
Sys. Admin.



[ Reply to This | # ]
A script to print to distiller folders in 10.2
Authored by: Thomas Kaiser on Mar 06, '03 10:33:45AM
> Finding these "folders" as devices in Print Center requires
> holding the option key down while clicking the Add button
> and using the Advanced option.

I forgot that, thanks for the reminder...

> What printer description to select? I chose a pretty generic
> Lexmark driver and it failed. The default "generic" driver
> seems to work, but I'm not sure what functionality (if any)
> I'm loosing.

I would choose an Acrobat Distiller PPD that matches the version of the
used distiller.

> What permissions the script and watched folders should use
> (if that matters).

I could easily add the ability to change owner & group of the postscript
file. To do this, one would have to add a chown line after the chmod. I'll
add this.

> It appears that the script is supposed to reset the
> permissions to 666 on the postscript after it moves it.

Right.

> Obviously it gets moved because Distiller is finding it and
> Distilling it, but the pdf's wind up root:admin with
> -rw-rw-r-- so I can't move or delete them. The .ps files
> wind up root:admin with -rw-rw-rw-.

That's caused by the CUPS subsystem running under this account. I'll
change that to set the owner to originator of the printjob and the group
to a variable called "GROUP", that defaults to "staff"

> In spite of the name checking, Distiller is overwriting my
> output files on every attempt. There seems to be no option
> in Distiller to avoid this either.

Hmm... I tried the whole thing at a customer's site and this didn't occur
there. Maybe because he's using some custom startup procedures for
distiller. In case, distiller names the PDF derived from the %%Title:
comment in the PS-Job, it should be easy to fix that by preprending the
PostScript file with two lines... I'll look into it later.

> Armed with this information I plan to modify this script to
> work with PStill (if possible), so thank's for the tip.

Why is there a need for that? If you want low-end PDFs just use the ones,
the Quartz engine produces already.

Regards,

Thomas

[ Reply to This | # ]
A script to print to distiller folders in 10.2
Authored by: Stone_Design on Mar 06, '03 01:18:03PM
Actually, Mac OS X's PDF may produce high resolution PDF. For example, Create will print high resolution images at their full resolution, so PStill is very useful for several reasons:
  • You may want to convert the text to outlines
  • You may want to downsample & JPEG compress images
  • You may want to losslessly shrink the bloato PDF
  • You may want to chain various PS/PDF documents
  • You may want to scale a PDF to poster size

Anyway, I prepared a tutorial on how to add automated PDF Workflow - but I'll submit that as a separate hint! Andrew Stone, co-author of PStill

[ Reply to This | # ]