Link to home
Start Free TrialLog in
Avatar of grampian-vjb
grampian-vjbFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Solaris 10 acroread failed to commit job

Hi, I’m experiencing an error when using acroread to print a PDF file via the command line within Solaris 10.
Acroread is verion 8.1.7 freshly installed.
Printing postscript and text files not using acroread to the printer work okay.

>> acroread -toPostScript ERR_TCF2_01371.pdf | lp -dwood-ass-lj8-1
>> wood-ass-lj8-1: failed to commit job (101-0): permission denied

Permission denied seems to point to Solaris rather than Adobe as the culprit…. Can you help?
Avatar of sentner
sentner
Flag of United States of America image

Have you tested to ensure that you can print to that printer using simple text files?  And tested that you can save the PS rendered file out locally?

Try:  

acroread -toPostScript ERR_TCF2_01371.pdf >/tmp/test.out

If you don't get perm denied, then try:

echo hello | lp -dwood-ass-lj8-1

Avatar of grampian-vjb

ASKER

I have tested printing plain text and postscript files from the command line and via HP's jetadmin management program all work without error. When I redirect the acroread output to tmp it produces an empty file, however I don't get any errors using the redirect.

-rw-r--r--   1 oracle   dba            0 Oct 18 08:52 test.out
Likely the error your getting is because the acrocread output is generating an empty file, thus the lp command is getting an immediate end of file marker with no data.  

Your problem appears to be with the acroread command.  

Looks like someone else had this problem and the solution was to upgrade acroread to 8.1.7.

http://forums.adobe.com/thread/615549
Have already stated in my initial question that this is a fresh 8.1.7 install. I found the link you suggest last week. Any other thoughts?

Ah, sorry I'd missed that in your original question.

It's possible that the PDF file is either not standard, or has some security settings enabled.  

Note: If a PDF file has been secured with an Open password or does not allow printing, you will not be able to print from the command line.


It's also unclear to me from the acroread man page whether it supports converting a file directly to stdout when the input filename is specified.  Everything I've found suggests the proper way to print using acroread is to pipe the output to acroread using cat, like:

    cat  ERR_TCF2_01371.pdf | acroread -toPostScript | lp -dwood-ass-lj8-1

http://www.sathyasai.org/songs/sheetmusic/Print%20Instructions.htm

Tried to cat ... no print came of the printer and lpstat showed no queued prints.

$     cat  ERR_TCF2_01371.pdf | acroread -toPostScript | lp -dwood-ass-lj8-1
request id is wood-ass-lj8-1-104 (standard input)

then tried to redirect then print:
cat  ERR_TCF2_01371.pdf | acroread -toPostScript > /tmp/dy

this produced a file!
then tried:
$ acroread dy |lp -dwood-ass-lj8-1
 
(acroread:27145): Gtk-WARNING **: cannot open display:
wood-ass-lj8-1: failed to commit job (106-0): permission denied

Is that an X windows warning? We're using command line only..... no display on server.






The error is because you used acroread to try and open that PS file that was created, which then will try and open the file for reading.  

Is there any content in that /tmp/dy file?  Do an ls -l /tmp/dy to see.

If it does, try to print it directly, using lp -dwood-ass-lj8-1 /tmp/dy

If it generated an empty file, or one that is very small, then the conversion is not working for some reason (possibly due to settings used on the PDF itself as I said in the last post).
There is content in the file. Cating the file shows that a PDF file has been produced, however lp to any printer produces nothing. The print scheduler is up and nothing is showing in the print queue.

If the file is empty, then it means that the acroread command is not successfully converting the file.  Can you try opening the file on another box and printing from there?  

Alternatively, you can try other utilites to convert the file to postscript, such as pdf2ps.

As I said in my last reply... there is content in the file... the file is not empty. Looks like acroread is doing it's job. I've ftp'd the file across to another box (running Solaris 9) and successfully printed the file.

Tried using the pdf2ps utility this doesn't print either.
I've built another Solaris (sparc) ver 10 box and ran a recommended patch cluster to bring everything up to date. This also doesn't print postscript files. I've got two HP laserjet 9050DN printers. Both print postscript files form my Solaris (sparc) ver 9 box.

Could this be the Solaris 10 printing system causing the problem??
UPDATE: turned on ps and pdf error printing on the HP LJ 9050.

acroread -toPostScript -size a4 < ERR_TCF2_01371.pdf | lp -dwood-ass-lj8-2

produced the following:

ERROR: undefined
OFFENDING COMMAND: @PJL "@PJL" COMMAND TYPE: nametype

OPERAND STACK: (0 total entries)

DICTIONARY STACK: (3 total entries)
--top of stack===
userdict
globaldict
systemdict

EXECUTION STACK: (6 total entries)
=top of stack--=
@PJL
-filestream-
{ --exitjob-- }
--@stopped--
{ --interrupts_no-- { false --setglobal-- --interrupts_reset-- { --cleardictstack-- -dictionary- --begin--
dictionary- --begin-- } --exec-- 000 } --stopped-- { -dictionary-/endjob true --put-- } --if-- ... }
--@exec--

BYTES FROM CURRENTFILE BEFORE ERROR:
@PJL

BYTES FROM CURRENTFILE AFTER ERROR:
SET PAPER=LETTERAJ%!PS-Adobe-3.1AJ%ADO_DSC_Encoding: MacOS RomanAJ%%Ti
tIe: AcroAAA9Nayfp.pdfAJ%%Creator: Adobe Acrobat 8.0AJ%%For: oracleAJ%
%CreationDate: 21/10/2011, 14:49:53AJ%%BoundingBox: 0 0 595 842AJ%%HiR
esBoundingBox: 0 0 595 842AJ%%CropBox: 0 0 595 842AJ%%LanguageLeveI: 2
AJ%%DocumentNeededResources: (atend)AJ%%DocumentSupp

At least I'm now getting something out of the printer!
Will investigate further.

So, to clarify:  The solaris 10 boxes can print text files, but fail when printing PS files?  Or do they fail when printing any files?  Can you check /var/log/syslog and /var/adm/messages to see if there are any errors about the printouts?  Are any files being created in the print queue directory?

Also, check out this page, where someone blogged about his difficulties getting solaris 10 printing working:

http://www.markwilson.co.uk/blog/2006/01/configuring-solaris-10-client-to-print.htm




Ah, cross-posted... Ok, so we know that the jobs are getting sent.  Seems like the solaris 10 box is just sending the job in the wrong format.  I'd investigate the differences in the solaris 10 vs 9 configurations if the same (converted PS) file works on 9 but not 10.
ASKER CERTIFIED SOLUTION
Avatar of grampian-vjb
grampian-vjb
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
.