Pseudo PDF Printer
am 07.12.2005 18:43:29 von Scott Taylor
Hello all,
I built a pseudo printer on my Samba server, so users can print their
ExHel documents (from Windoze) and receive an email with a PDF attachment.
However, even using a Colour PS Printer in Windows, "HP Color Laserjet
5/5M PS", the PDF comes out in greyscale.
I'm using Ghostscript 7.05 with it's ps2pdf to generate the PDF, does
anyone know of a way, or other software to use, that can generate the PDF
in colour?
Cheers.
--
Scott
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Pseudo PDF Printer
am 07.12.2005 19:27:12 von Scott Taylor
David Fierbaugh said:
> On Wednesday 07 December 2005 12:43, Scott Taylor wrote:
>> Hello all,
>>
>> I built a pseudo printer on my Samba server, so users can print their
>> ExHel documents (from Windoze) and receive an email with a PDF
>> attachment.
>> However, even using a Colour PS Printer in Windows, "HP Color Laserjet
>> 5/5M PS", the PDF comes out in greyscale.
>>
>> I'm using Ghostscript 7.05 with it's ps2pdf to generate the PDF, does
>> anyone know of a way, or other software to use, that can generate the
>> PDF in colour?
> Why not just have them install PDFCreator, which basically makes a psuedo
> printer for windows that creates pdf files.
Have who do what? Are you suggesting that my users should be allowed
install stuff on their workstations? That's absurd.
BTW, if you use the reply-to-all function of your email and then just
remove the redundant address so only linux-admin@vger.kernel.org is in the
To: field, then the rest of the list will also benifit from your reply.
Much easier for my users to just print something and have the work done
for them, then have to open and use some other software. Thanks for the
suggestion though.
--
Scott
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Pseudo PDF Printer
am 07.12.2005 20:53:31 von urgrue
At 20:27 7.12.2005, you wrote:
>Have who do what? Are you suggesting that my users should be allowed
>install stuff on their workstations? That's absurd.
people who reply to your questions cant possibly know what sorts of
policies you have in place at work. if you dont want to allow users to
install stuff, then your options are to install it for them or implement
some kind of central management/installation service if you dont have one
already. or install pdfcreator on one windows computer and share it from
there.
>Much easier for my users to just print something and have the work done
>for them, then have to open and use some other software. Thanks for the
>suggestion though.
in case you didnt get it pdfcreator IS a virtual printer driver, so is for
example win2pdf. you just print to the "printer" and it asks you where you
want to save the pdf. exactly like the linux system you have in place
except its on their own machine. this is in fact even easier for your users
than them having to then go open their mail client and save the attachment
from there.
sadly, ive not yet encountered a linux printer->pdf filter that is as good
as win2pdf.
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Pseudo PDF Printer
am 07.12.2005 21:03:05 von Scott Taylor
urgrue said:
> At 20:27 7.12.2005, you wrote:
>>Have who do what? Are you suggesting that my users should be allowed
>>install stuff on their workstations? That's absurd.
>
> people who reply to your questions cant possibly know what sorts of
> policies you have in place at work.
It's still absurd. =P
--
Scott
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Pseudo PDF Printer
am 07.12.2005 21:21:04 von Scott Taylor
Scott Taylor said:
>
> Hello all,
>
> I built a pseudo printer on my Samba server, so users can print their
> ExHel documents (from Windoze) and receive an email with a PDF attachment.
> However, even using a Colour PS Printer in Windows, "HP Color Laserjet
> 5/5M PS", the PDF comes out in greyscale.
>
> I'm using Ghostscript 7.05 with it's ps2pdf to generate the PDF, does
> anyone know of a way, or other software to use, that can generate the PDF
> in colour?
Never mind, it works fine, it was just a switch in the print driver
carried over from the monocrome printer I used to have there.
:)
--
Scott
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Pseudo PDF Printer
am 09.12.2005 17:03:34 von Scott Taylor
People replying to messages on a list should reply to the list so everyone
can benifit; not that I mind you sending me private emails...
Andy Davidson said:
> Scott Taylor wrote:
>> I built a pseudo printer on my Samba server, so users can print their
>> ExHel documents (from Windoze) and receive an email with a PDF
>> attachment.
>> However, even using a Colour PS Printer in Windows, "HP Color Laserjet
>> 5/5M PS", the PDF comes out in greyscale.
>
> That's hella cool. Do you have example configs that you're allowed to
> share ?
Sure. It's all on Google.
First you need a *Nix boxen with Samba, and Ghost Script
Then search Google for Print to PDF
I ended up searching a lot of things like Samba.org and used a few others
from google as well, because a lot of the docs are outdated and Samba 3.x
is different then 2.x in a lot of ways; for example, I couldn't find a
way to store the print drivers on Samba 3.x the way I would have on 2.x.
(if anyone has found a good doc on that I would apreciate a link)
Anyhow, after reading and trying many things, the one that helped me most
was at Digital Hermit:
http://www.digitalhermit.com/linux/printing/index.html#SECTI ON05020000000000000000
However, storing the documents on a directory for my users is not wise,
because my users are not all that savvy; they have a hard time
understanding that their mapped drive is a different computer and that is
why they can access their documents from any workstation in the office. =P
So: I wrote a Perl script using MIME::Lite to email the document to them.
In my smb.conf file I added the printer:
[pdf]
comment = PDF File Generator
path = /var/spool/samba
printable = yes ; Makes it a printer
guest ok = yes
; Send document to a script; %s is the print spool file %u is the user id
print command = /usr/local/bin/printpdf %s %u
lpq command =
lprm command =
Those last two lines I got from Samba.org, I forget off hand why they are
needed, but they are for 3.x.
I used the HP Color LaserJet 5M/5MP PS drivers in Win2k and it works
great, outputing colour PDF documents. :)
the script that makes it work:
#!/bin/sh
SPDIR=/var/spool/samba
# OUTDIR=/opt/pdfdropbox # need proper access on this if you use it
# I'm going to use the users ~/ instead
# need $HOME, doesn't come with user info so we'll create it.
HOME=`grep $2 /etc/passwd|cut -d: -f6` # SedNAwk would work too
# drop the new file in the usrs ~/
ps2pdf $1 $HOME/$2.pdf
# Clean up samba spool...
rm $SPDIR/smbprn*
# Pipe the new file through our email program to attach the PDF
/usr/local/bin/mailit.pl $2 $2.pdf $HOME/$2.pdf
#
# clean up after the user (or not if you want to leave a copy there
rm $HOME/$2.pdf
# alternately we could use uuencode, but it's not the greatest
# way to attach a file anymore.
# uuencode $OUTDIR/$2.pdf $2.pdf | mail -s "Your PDF Document is ready" $2
#END
I'm not going to put the MIME Perl script here, that's a thing for perl
hackers, if you are one, all you need it MIME::Lite and it's simple. Be
adventurous (google); there are amny ways to attach files to email.
One thing is wrong with this, there is no file locking, and I'm reusing
the same file name, so if someone were to print many large files, in a
row, it could get clobbered. Already I have found it doesn't like to
create to big of a file, but that will require futher investigation. (not
perfect, but it works great and they all love it)
Enjoy, and Good Luck.
I'm off to work on my new PalmOne thingy, new project. :)
--
Scott
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html