[Samba] Re: pdf printer

mwestern at sola.com.au mwestern at sola.com.au
Mon Jun 2 00:08:28 GMT 2003


did you end up figuring this out?  i have a working cups pdf printer.
thanks to some guy who posted to here....

i've modified my pdfprinter to email the user as well, sing out if you want
that script....

-------------------------------------------------------------------
>Using CUPS backend to create PDF virtual printer
>---------------------------------------------------------------
>---------
>
>1. Get a un*x box with CUPS and ghostscript set up on it.
>
>2. Go here: http://printing.kde.org/downloads/ and download 
>this backend 
>script: http://printing.kde.org/downloads/pdfdistiller
>
>3. Log in as root, put it in /usr/lib/cups/backend or wherever 
>cups/backend lives.
>
>4. 'chmod +x' the file (should be 755: rwxr-xr-x).
>
>5. Restart CUPS ('service cups restart' or appropriate).
>
>6. To check if CUPS recognizes it as a usable backend, let root run:
>      'lpinfo -v | grep pdf'
>    should output "direct pdf"
>
>7. Test the pdfdistiller backend:
>     a. '/usr/lib/cups/backend/pdf'
>     	should output 'direct pdf "Unknown" "PDF Writing"'
>     b. "/usr/lib/cups/backend/pdf 1 2 a b"
>       should output: "Usage: pdf job-id user title copies 
>options [file]"
>
>8. Test existence of Ghostscript's ps2pdf with 'which ps2pdf'. Output 
>should be a path like "/usr/bin/ps2pdf" or similar
>
>9. Download a PPD file for cups to print with. An Adobe 
>Distiller PPD is 
>a great choice. I used the one from this page:
> 
>http://www.pentondigitalads.com/PentonDigitalAds/creating_posts
cript_files.h
tm 
("Acrobat Distiller PPD for Windows")
     If this link is dead, search Google/web for "distiller ppd" and 
find a suitable file.

10. Put the PPD file in /usr/share/cups/model or wherever your CUPS 
model PPDs are stored.

11. Restart CUPS.

12. Add the printer to CUPS with the command:
     'lpadmin -p <Chosen Name> -E -v pdf:<out folder> -m <ppd-file>'
      i.e.:
     'lpadmin -p PDFprinter -E -v pdf:/pub/pdf_out -m distiller.ppd'

13. Test the PDF output by manually printing to the new printer:
     'lpr -P PDFprinter test.txt'

Troubleshooting each step:

1. If you're stuck on #1, find a more appropriate howto.

2. If that file is missing, beg someone for a copy.

7. I got stuck on this one. without renaming it "pdf", it didn't work at 
all. No clue why. Try copying the file "pdfdistiller" the file to "pdf" 
in the same folder. ('cp pdfdistiller pdf'). If these aren't working, go 
no further. Make sure CUPS is installed properly and work on this first.

8. If this doesn't work, you'll need to install the latest "ESP 
Ghostscript". It's available at:
	http://www.cups.org/software.php
	
9. Adobe doesn't distribute this file, so it could be tricky to find.

10. Same as #3. PPD files made for Macintosh and Windows computers will 
need to be re-saved in un*x format.

11. There should be a number of PPD files in that folder already. Search 
for "laserjet.ppd" if you have no idea where to find them.

12. If this fails, make sure you're specifying a valid PPD file from the 
model folder in the "-m" part. Alternatively, you may use '-P <ppd>' 
instead of '-m', but you must specify the entire path.

13. No go? Time to start logging everything. After the first line of 
your backend file (pdf or pdfdistiller), add the line "set -x". Edit 
your cupsd.conf and set "LogLevel debug". Restart CUPS and peruse the 
information in /var/log/cups/error_log for good debugging info.

Enjoy!

Thanks to Kurt Pfeifle [kpfeifle (at) danka (dot) de] for all the help, 
comments and editing this mini-howto with me.

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba

---------------------------------------------------------------

-----Original Message-----
From: samba-bounces at lists.samba.org
[mailto:samba-bounces at lists.samba.org]On Behalf Of Norman Zhang
Sent: Saturday, May 31, 2003 9:04 AM
To: samba at lists.samba.org
Subject: [Samba] Re: pdf printer


Hi,

Thank you for your reply.

> Please use this little HOWTO:
>
>     http://lists.samba.org/pipermail/samba/2003-March/093504.html
>
> The "color" all depends on the PPD you are using. If you use a B/W
Laerprinter
> PPD for this, your PDF will be B/W too. The suggested distiller.ppd should
> be alright. Do you get B/W or Color PDFs from Linux/UNIX/CUPS?

I followed the exact procedure as per above URL, except I grabbed the
adist5.ppd from the Adobe Universal PostScript Installer 1.0.6. Is that
okay? CUPS seems to able to read it. I got color PDF when I installed an
arbitrary color laser printer (HP Color LaserJet 8500 PS. I thought I can
get different paper size with this model) and B/W with a B/W laser printer
(HP LaserJet 2200 PS). Do you have a recommendation for a particular model?

> > I have another question, do I need to add a Color Laser Printer Driver
in
> > W2K to the PDF share to generate color PDF in Windows?
>
> If you read the suggested HOWTO, you'll see that the driver installation
> first takes place on CUPS. Then you have a CUPS PDF printer (also
accessible
> to native CUPS clients).

I have setup CUPS to use PDF printing. I guess I just need to add printer
drivers to the queue? I was adding the drivers from W2K using HP's printer
drivers. I know it is better to use CUPS drivers, but I don't know which
model is good and it seems to be difficult to use cupsaddsmb.

> To install it on W2K, simply download the CUPS driver. Before you download
> it, you need to run cupsaddsmb. Before you run cupsaddsmb, you should read
> "man cupsaddsmb". Even more info about it is here:
>
>    http://www.linuxprinting.org/kpfeifle/SambaPrintHOWTO/

I have been reading your document for the last 2 days (excellent document
BTW). I guess I will read it again 8)

Regards,
Norman




-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba



More information about the samba mailing list