Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
01-23-2009, 05:02 AM
|
#1
|
Member
Registered: Dec 2008
Posts: 59
Rep:
|
Print to PDF
Hello,
Not sure if this is the right area for my post, so sorry if it is.
I am looking for information on how to setup a printer on my CentOS system so that when I print to it, it will be a PDF stored somewhere on the system.
I have looked at cups-pdf however when I tried it, it installed properly, but I was unable to create a new printer using the PDF printer they specified (Just wasn't there as an option for me).
Does anyone else have any other idea?
Thanks,
|
|
|
01-23-2009, 05:21 AM
|
#2
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
Recent versions of OpenOffice and Firefox on Linux are still able to print to a PDF file. Which is exactly your requirement? Do you want to be able to print to PDF from any application?
|
|
|
01-23-2009, 05:29 AM
|
#3
|
Member
Registered: Dec 2008
Posts: 59
Original Poster
Rep:
|
Quote:
Originally Posted by colucix
Recent versions of OpenOffice and Firefox on Linux are still able to print to a PDF file. Which is exactly your requirement? Do you want to be able to print to PDF from any application?
|
Hi,
thanks for your quick response.
I run a database application on CentOS/RedHat and other OS servers, and currently print various multiple page documents (Sometimes one, sometimes 51 pages) to normal physical printers.
I want these documents (Some sent in raw text, some are sent to postscript printers) to print to a 'pdf printer' where I can then pick the PDF's and email out to email addresses I specify.
Or left on the server for me to FTP into and pick up and place elsewhere.
Hope this helps.
|
|
|
01-23-2009, 05:55 AM
|
#4
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
Yes. It is clear now. Indeed, the multi-client requirement for specific applications makes the cups-pdf software suitable for the situation. How did you install it? Building from source or by a pre-compiled package? Have you restarted cups on the test machine after the set up?
|
|
|
01-23-2009, 06:00 AM
|
#5
|
Member
Registered: Dec 2008
Posts: 59
Original Poster
Rep:
|
Quote:
Originally Posted by colucix
Yes. It is clear now. Indeed, the multi-client requirement for specific applications makes the cups-pdf software suitable for the situation. How did you install it? Building from source or by a pre-compiled package? Have you restarted cups on the test machine after the set up?
|
I am using the source from this website:
http://www.physik.uni-wuerzburg.de/~...download.shtml
Then within the SRC directory (After I have un-tar it) It has the cups-pdf.h
cups-pdf.c
Files in it.
I then do the following command:
gcc -O9 -s -o /usr/lib/cups/backend/cups-pdf cups-pdf.c
With no errors.
|
|
|
01-23-2009, 06:34 AM
|
#6
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
Well, maybe you missed some passage after that. Before going into details about the procedure, why not try to install from the RPM for CentOS? If using CentOS 5.x on a i386 machine, just download the cups-pdf package from here, then:
Code:
# rpm -Uvh cups-pdf-2.4.6-1.el5.i386.rpm
check if the requirements are met (caveats about root permissions of the backend, SElinux not interfering, etc.) and do a restart of the cups daemon.
Code:
# /etc/init.d/cups restart
after that, having accepted all the default values in /etc/cups/cups-pdf.conf, you will have Cups-PDF as a printer to select from applications, and the newly created PDF files will be placed onto the user's Desktop. The spool directory will be /var/spool/cups-pdf/SPOOL.
Last edited by colucix; 01-23-2009 at 06:48 AM.
Reason: Forgotten to post the link
|
|
|
01-23-2009, 07:04 AM
|
#7
|
Member
Registered: Dec 2008
Posts: 59
Original Poster
Rep:
|
Quote:
Originally Posted by colucix
Well, maybe you missed some passage after that. Before going into details about the procedure, why not try to install from the RPM for CentOS? If using CentOS 5.x on a i386 machine, just download the cups-pdf package from here, then:
Code:
# rpm -Uvh cups-pdf-2.4.6-1.el5.i386.rpm
check if the requirements are met (caveats about root permissions of the backend, SElinux not interfering, etc.) and do a restart of the cups daemon.
Code:
# /etc/init.d/cups restart
after that, having accepted all the default values in /etc/cups/cups-pdf.conf, you will have Cups-PDF as a printer to select from applications, and the newly created PDF files will be placed onto the user's Desktop. The spool directory will be /var/spool/cups-pdf/SPOOL.
|
Thanks again for the reply.
I tried using the RPM and got message for missing files:
libc.so.6
Though it might be that I downloaded the incorrect one. Do CentOS themselves offer one?
I did however make a breakthrough doing it the other way. I copied the .ppd files that came with the .tar file into the default .ppd location.
If i then go into Webmin I can see the relevant file, but when I select to make a printer against it (/dev/null as the device) while I can print to it, and the job appears to leave the queue, it apparently should go to /var/spool/cups-pdf/SPOOL and then a subdirectory of the username who printed it. It doesn't.
Last edited by stuaz; 01-23-2009 at 07:15 AM.
|
|
|
01-23-2009, 07:35 AM
|
#8
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
CentOS5.2 , no cups-pdf installed.
Isn't that a build-in function these days ?
When opening a text file with gedit and
clicking "Print", this option is shown :
" Create a PDF document ".
....
Another 'funny' thing : Printers connected
to another computer are shown too, also a
result of an automatic setup, probaly during
the OS install. And they just print via the
network cabling, no setup needed.
....
|
|
|
01-23-2009, 07:39 AM
|
#9
|
Member
Registered: Dec 2008
Posts: 59
Original Poster
Rep:
|
Quote:
Originally Posted by knudfl
CentOS5.2 , no cups-pdf installed.
Isn't that a build-in function these days ?
When opening a text file with gedit and
clicking "Print", this option is shown :
" Create a PDF document ".
....
Another 'funny' thing : Printers connected
to another computer are shown too, also a
result of an automatic setup, probaly during
the OS install. And they just print via the
network cabling, no setup needed.
....
|
Your right, you can do that through gedit but as far as I could tell cups-pdf was not installed before I started this.
|
|
|
01-23-2009, 07:52 AM
|
#10
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
Quote:
Originally Posted by stuaz
Thanks again for the reply.
I tried using the RPM and got message for missing files:
libc.so.6
Though it might be that I downloaded the incorrect one. Do CentOS themselves offer one?
|
CentOS offers the one you would install using yum if you enabled that exact repository I linked in my previous post (Fedora EPEL5). Maybe you've not downloaded the correct version, since libc.so.6 is provided by glibc which should be installed by default. My guess is that you're running on a 64-bit machine, while the link I provided was for 32-bit. In that case just go up to the parents directories until you can select x86_64.
Which CentOS release have you installed on your machine, anyway? If in doubt, post the output of the command lsb_release -a and uname -a.
Quote:
Originally Posted by stuaz
I copied the .ppd files that came with the .tar file into the default .ppd location.
|
This is required if you just want to use the color Postscript driver coming with the package, instead of the system one. You don't really need it to print a colorful PDF. Furthermore, for what I can understand, you don't need to install a new printer via webmin. Just be sure the backend file is properly copied to the correct location with owner root and permissions 700 and the cups-pdf.conf is in place. Than simply restart the cups daemon. For your convenience, here is a list of the relevant files installed by the cups-pdf package on my CentOS box:
Code:
-rw-r--r-- 1 root root 8853 May 7 2007 /etc/cups/cups-pdf.conf
-rwx------ 1 root root 24524 May 7 2007 /usr/lib/cups/backend/cups-pdf
-rw-r--r-- 1 root root 20817 May 7 2007 /usr/share/cups/model/PostscriptColor.ppd
drwxr-xr-x 3 root root 4096 Jan 23 12:58 /var/spool/cups-pdf
drwxr-xr-x 2 root root 4096 Jan 23 14:39 /var/spool/cups-pdf/SPOOL
|
|
|
01-23-2009, 08:26 AM
|
#11
|
Member
Registered: Dec 2008
Posts: 59
Original Poster
Rep:
|
Quote:
Originally Posted by colucix
CentOS offers the one you would install using yum if you enabled that exact repository I linked in my previous post (Fedora EPEL5). Maybe you've not downloaded the correct version, since libc.so.6 is provided by glibc which should be installed by default. My guess is that you're running on a 64-bit machine, while the link I provided was for 32-bit. In that case just go up to the parents directories until you can select x86_64.
Which CentOS release have you installed on your machine, anyway? If in doubt, post the output of the command lsb_release -a and uname -a.
This is required if you just want to use the color Postscript driver coming with the package, instead of the system one. You don't really need it to print a colorful PDF. Furthermore, for what I can understand, you don't need to install a new printer via webmin. Just be sure the backend file is properly copied to the correct location with owner root and permissions 700 and the cups-pdf.conf is in place. Than simply restart the cups daemon. For your convenience, here is a list of the relevant files installed by the cups-pdf package on my CentOS box:
Code:
-rw-r--r-- 1 root root 8853 May 7 2007 /etc/cups/cups-pdf.conf
-rwx------ 1 root root 24524 May 7 2007 /usr/lib/cups/backend/cups-pdf
-rw-r--r-- 1 root root 20817 May 7 2007 /usr/share/cups/model/PostscriptColor.ppd
drwxr-xr-x 3 root root 4096 Jan 23 12:58 /var/spool/cups-pdf
drwxr-xr-x 2 root root 4096 Jan 23 14:39 /var/spool/cups-pdf/SPOOL
|
[root@centos examples]# lsb_release
LSB Version: :core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch
Linux centos.mess 2.6.9-67.ELsmp #1 SMP Fri Nov 16 12:48:03 EST 2007 i686 i686 i
386 GNU/Linux
See above for lsb_release -a and uname -a.
I changed the permissions on the files you specified, restarted cups:
/sbin/service cups restart
Then did
lp -dprinter /etc/hosts
No output
In regards to the rpm this is the error i get when i install it using your command:
[root@centos sdennis]# rpm -Uvh cups-pdf-2.4.6-1.el5.i386\(2\).rpm
warning: cups-pdf-2.4.6-1.el5.i386(2).rpm: V3 DSA signature: NOKEY, key ID 21752
1f6
error: Failed dependencies:
libc.so.6(GLIBC_2.4) is needed by cups-pdf-2.4.6-1.el5.i386
rtld(GNU_HASH) is needed by cups-pdf-2.4.6-1.el5.i386
|
|
|
01-23-2009, 08:42 AM
|
#12
|
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Rep: 
|
Why do people insist on installing the rpms manually?
Use the package management system in your Distribution, that will handle the dependencies automatically.
you also need the libc6 and glibc packages.
yum install cups-pdf
Then when you configure it in CUPS, you setup a Generic Postscript Printer choosing the cups-pdf device.. Done !
|
|
|
01-23-2009, 08:46 AM
|
#13
|
Member
Registered: Dec 2008
Posts: 59
Original Poster
Rep:
|
Quote:
Originally Posted by farslayer
Why do people insist on installing the rpms manually?
Use the package management system in your Distribution, that will handle the dependencies automatically.
you also need the libc6 and glibc packages.
yum install cups-pdf
Then when you configure it in CUPS, you setup a Generic Postscript Printer choosing the cups-pdf device.. Done !
|
When I run your command I get the below:
Code:
[root@centos SPOOL]# yum install cups-pdf
Setting up Install Process
Setting up repositories
epel 100% |=========================| 2.1 kB 00:00
update 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 1.3 MB 00:03
epel : ################################################## 3717/3717
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for cups-pdf to pack into transaction set.
cups-pdf-2.4.6-1.el5.i386 100% |=========================| 10 kB 00:00
---> Package cups-pdf.i386 0:2.4.6-1.el5 set to be updated
--> Running transaction check
--> Processing Dependency: libc.so.6(GLIBC_2.4) for package: cups-pdf
--> Processing Dependency: rtld(GNU_HASH) for package: cups-pdf
--> Finished Dependency Resolution
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package cups-pdf
Error: Missing Dependency: rtld(GNU_HASH) is needed by package cups-pdf
[root@centos SPOOL]#
[root@centos SPOOL]# yum install cups-pdf
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package cups-pdf.i386 0:2.4.6-1.el5 set to be updated
--> Running transaction check
--> Processing Dependency: libc.so.6(GLIBC_2.4) for package: cups-pdf
--> Processing Dependency: rtld(GNU_HASH) for package: cups-pdf
--> Finished Dependency Resolution
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package cups-pdf
Error: Missing Dependency: rtld(GNU_HASH) is needed by package cups-pdf
|
|
|
01-23-2009, 09:12 AM
|
#14
|
Senior Member
Registered: Dec 2005
Distribution: Slackware
Posts: 1,135
|
I realize that you already have at least a couple of contributors offering varying bits of advice, but from my Fedora/yum days, I believe that what's happening is that the attempted installation via yum is finding conflict(s) with the existing manual installation.
The same type of situation often arises when repositories are mixed.
Hence, you should remove your manual install (man rpm - I can quite remember the switches for removal), and then install via yum.
hth,
|
|
|
01-23-2009, 09:18 AM
|
#15
|
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Rep: 
|
Did you configure yum properly ?
http://wiki.centos.org/PackageManagement/Yum/Priorities
mrclisdue has a valid point..
I think it's rpm -e <packagename> to remove a package manually.. man haven't done that in years..
Last edited by farslayer; 01-23-2009 at 09:20 AM.
|
|
|
All times are GMT -5. The time now is 11:20 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|