Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

cups-pdf does not work

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
Aquous
l33t
l33t
Posts: 700
Joined: Sat Jan 08, 2011 1:10 pm

cups-pdf does not work

  • Quote

Post by Aquous » Sat Feb 04, 2012 10:54 am

From /var/log/cups-pdf_log:

Code: Select all

[DEBUG] switching to new gid (aquous)
[DEBUG] initialization finished (v2.6.1)
[DEBUG] user identified (aquous)
[DEBUG] output directory name generated (/home/aquous)
[DEBUG] user information prepared
[DEBUG] spoolfile name created (/var/spool/cups-pdf/SPOOL/cups2pdf-2864)
[DEBUG] source stream ready
[DEBUG] destination stream ready (/var/spool/cups-pdf/SPOOL/cups2pdf-2864)
[DEBUG] owner set for spoolfile (/var/spool/cups-pdf/SPOOL/cups2pdf-2864)
[DEBUG] using traditional fgets
[DEBUG] found beginning of postscript code (%!PS-Adobe-3.0)
[DEBUG] now extracting postscript code
[DEBUG] found title in ps code ((print.ps))
[DEBUG] found end of postscript code (%%EOF)
[DEBUG] all data written to spoolfile (/var/spool/cups-pdf/SPOOL/cups2pdf-2864)
[DEBUG] trying to use PS title ((print.ps))
[DEBUG] removing trailing newlines from title ((print.ps))
[STATUS] ***Experimental Option: DecodeHexStrings
[DEBUG] checking for hex strings ((print.ps))
[DEBUG] not a hex string, has no start marker ((print.ps))
[DEBUG] removing enclosing parentheses () from full title ((print.ps))
[DEBUG] removing file name extension (.ps)
[DEBUG] calling alternate_replace_string
[DEBUG] removing alternate special characters from title (print)
[DEBUG] title successfully retrieved (print)
[DEBUG] input data read from stdin
[DEBUG] output filename created (/home/aquous/print.pdf)
[DEBUG] ghostscript commandline built (/usr/bin/gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="/home/aquous/print.pdf" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f /var/spool/cups-pdf/SPOOL/cups2pdf-2864)
[DEBUG] output file unlinked (/home/aquous/print.pdf)
[DEBUG] TMPDIR set for GhostScript (/var/tmp)
[DEBUG] waiting for child to exit
[DEBUG] entering child process
[DEBUG] GID set for current user
[DEBUG] supplementary groups set for current user
[DEBUG] UID set for current user (aquous)
[DEBUG] ghostscript has finished (256)
[ERROR] failed to set file mode for PDF file (non fatal) (/home/aquous/print.pdf)
[DEBUG] ERRNO: 2
[DEBUG] no postprocessing
[DEBUG] spoolfile unlinked (/var/spool/cups-pdf/SPOOL/cups2pdf-2864)
[DEBUG] all memory has been freed
[STATUS] PDF creation successfully finished (aquous)
But when I run the supposedly problematic /usr/bin/gs command on my .ps file myself, it works just fine.
How should I be debugging this?
Top
BigBox37
n00b
n00b
User avatar
Posts: 23
Joined: Sat Dec 25, 2010 6:07 am

Re: cups-pdf does not work

  • Quote

Post by BigBox37 » Thu Feb 09, 2012 3:20 pm

Aquous wrote:From /var/log/cups-pdf_log:

Code: Select all

[DEBUG] switching to new gid (aquous)
...
But when I run the supposedly problematic /usr/bin/gs command on my .ps file myself, it works just fine.
How should I be debugging this?
Consider using the standard print to file ability of cups instead of cups-pdf.

Print to file - Output as PDF
http://ompldr.org/vY3B4MA
Top
jlandru
n00b
n00b
Posts: 8
Joined: Wed Aug 27, 2003 4:08 pm

[ERROR] failed to set file mode for PDF file (non fatal)

  • Quote

Post by jlandru » Thu Feb 09, 2012 4:18 pm

[ERROR] failed to set file mode for PDF file (non fatal) (/path/to/myfile.pdf)

Error is generated by cups-pdf but is relative to ghostscript rights. Ghostscript seems to need full rights in its temp work dir.

Setting "GSTmp /tmp" instead of "GSTmp /var/tmp" in /etc/cups/cups-pdf.conf solves the problem for me.

hope this can help.

Jacques Landru
Top
penetrode
Apprentice
Apprentice
Posts: 286
Joined: Mon Dec 29, 2003 7:44 am
Location: Calgary, Alberta

Re: [ERROR] failed to set file mode for PDF file (non fatal)

  • Quote

Post by penetrode » Fri Mar 23, 2012 10:42 am

jlandru wrote:[ERROR] failed to set file mode for PDF file (non fatal) (/path/to/myfile.pdf)

Error is generated by cups-pdf but is relative to ghostscript rights. Ghostscript seems to need full rights in its temp work dir.

Setting "GSTmp /tmp" instead of "GSTmp /var/tmp" in /etc/cups/cups-pdf.conf solves the problem for me.
I get a similar error, but changing GSTmp had no effect. Also, the directories in question already have the necessary permissions:

Code: Select all

1896833 drwxrwxrwt  14 root    root     12K 23. Mär 11:03 tmp
and in /var:

Code: Select all

302516 drwxrwxrwt 10 root root 4,0K 23. Mär 09:19 tmp
Moreover, my error message seems to be saying that the problem is in the spool directory:

Code: Select all

Fri Mar 23 08:30:03 2012  [ERROR] failed to set file mode for PDF file (non fatal) (/var/spool/cups-pdf/root/Test_Page.pdf)
Except that spools always have the appropriate permissions...

is there any way to make this error message more informative?
Top
penetrode
Apprentice
Apprentice
Posts: 286
Joined: Mon Dec 29, 2003 7:44 am
Location: Calgary, Alberta

hilarious

  • Quote

Post by penetrode » Fri Mar 23, 2012 11:15 am

Even with 'LogType=4' set in cups-pdf_log, cups-pdf fails to mention that gs isn't even executing properly:

Code: Select all

Fri Mar 23 11:57:51 2012  [DEBUG] switching to new gid (lp)
Fri Mar 23 11:57:51 2012  [DEBUG] initialization finished (v2.4.8)
Fri Mar 23 11:57:51 2012  [DEBUG] user identified (whumpus)
Fri Mar 23 11:57:51 2012  [DEBUG] output directory name generated (/home/whumpus)
Fri Mar 23 11:57:51 2012  [DEBUG] user information prepared
Fri Mar 23 11:57:51 2012  [DEBUG] spoolfile name created (/var/spool/cups-pdf/SPOOL/cups2pdf-14730)
Fri Mar 23 11:57:51 2012  [DEBUG] source stream ready
Fri Mar 23 11:57:51 2012  [DEBUG] destination stream ready (/var/spool/cups-pdf/SPOOL/cups2pdf-14730)
Fri Mar 23 11:57:51 2012  [DEBUG] owner set for spoolfile (/var/spool/cups-pdf/SPOOL/cups2pdf-14730)
Fri Mar 23 11:57:51 2012  [DEBUG] found beginning of postscript code (%!PS-Adobe-3.0)
Fri Mar 23 11:57:51 2012  [DEBUG] now extracting postscript code
Fri Mar 23 11:57:51 2012  [DEBUG] found title in ps code ((Falser Words Were Never Spoken - NYTimes.com))
Fri Mar 23 11:57:55 2012  [DEBUG] found end of postscript code (%%EOF)
Fri Mar 23 11:57:55 2012  [DEBUG] all data written to spoolfile (/var/spool/cups-pdf/SPOOL/cups2pdf-14730)
Fri Mar 23 11:57:55 2012  [DEBUG] trying to use PS title ((Falser Words Were Never Spoken - NYTimes.com))
Fri Mar 23 11:57:55 2012  [DEBUG] removing trailing newlines from title ((Falser Words Were Never Spoken - NYTimes.com))
Fri Mar 23 11:57:55 2012  [DEBUG] removing enclosing parentheses () from full title ((Falser Words Were Never Spoken - NYTimes.com))
Fri Mar 23 11:57:55 2012  [DEBUG] removing file name extension (.com)
Fri Mar 23 11:57:55 2012  [DEBUG] removing special characters from title (Falser Words Were Never Spoken - NYTimes)
Fri Mar 23 11:57:55 2012  [DEBUG] title successfully retrieved (Falser_Words_Were_Never_Spoken_-_NYTimes)
Fri Mar 23 11:57:55 2012  [DEBUG] input data read from stdin
Fri Mar 23 11:57:55 2012  [DEBUG] output filename created (/home/whumpus/Falser_Words_Were_Never_Spoken_-_NYTimes.pdf)
Fri Mar 23 11:57:55 2012  [DEBUG] ghostscript commandline built (/usr/bin/gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="/home/whumpus/Falser_Words_Were_Never_Spoken_-_NYTimes.pdf" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f /var/spool/cups-pdf/SPOOL/cups2pdf-14730)
Fri Mar 23 11:57:55 2012  [DEBUG] output file unlinked (/home/whumpus/Falser_Words_Were_Never_Spoken_-_NYTimes.pdf)
Fri Mar 23 11:57:55 2012  [DEBUG] TMPDIR set for GhostScript (/var/tmp)
Fri Mar 23 11:57:55 2012  [DEBUG] entering child process
Fri Mar 23 11:57:55 2012  [DEBUG] GID set for current user
Fri Mar 23 11:57:55 2012  [DEBUG] UID set for current user (whumpus)
Fri Mar 23 11:57:55 2012  [DEBUG] ghostscript has finished (32512)
Fri Mar 23 11:57:55 2012  [DEBUG] waiting for child to exit
Fri Mar 23 11:57:55 2012  [DEBUG] spoolfile unlinked (/var/spool/cups-pdf/SPOOL/cups2pdf-14730)
Fri Mar 23 11:57:55 2012  [DEBUG] all memory has been freed
Everything looks fine, right? (Note the absence of any error message.)

Well...

Code: Select all

cups # /usr/bin/gs -q -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile="/home/whumpus/Falser_Words_Were_Never_Spoken_-_NYTimes.pdf" -dAutoRotatePages=/PageByPage -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -dPDFSETTINGS=/prepress -c .setpdfwrite -f /var/spool/cups-pdf/SPOOL/cups2pdf-14730
/usr/bin/gs: error while loading shared libraries: libtiff.so.3: cannot open shared object file: No such file or directory
I wonder why cups-pdf doesn't catch this error and at least log it.
Top
hika
Apprentice
Apprentice
User avatar
Posts: 234
Joined: Fri Mar 13, 2009 5:55 pm
Location: Utrecht

  • Quote

Post by hika » Mon Apr 14, 2014 7:15 pm

Changing the rights on the directory containing the homedirectories (owned by root.users) from 700 to 770 solved it. I have cups-pdf printing to $HOME/pdf-print.

Hika
Top
hika
Apprentice
Apprentice
User avatar
Posts: 234
Joined: Fri Mar 13, 2009 5:55 pm
Location: Utrecht

  • Quote

Post by hika » Mon Apr 14, 2014 7:19 pm

Weirdly enough the home directories themselfs are still on 700!
Top
Post Reply

7 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic