Zentyal Forum, Linux Small Business Server

Zentyal Server => Installation and Upgrades => Topic started by: Joao Correia on April 16, 2010, 07:18:53 pm

Title: eBox 1.4 - PDF Printing Support
Post by: Joao Correia on April 16, 2010, 07:18:53 pm
Hello,

This worked for me, I have managed to config a PDF Printer on eBox to all users. I think this could be a possibility on eBox Printer Sharing UI.

Changed /usr/share/ebox/stubs/samba/smb.conf.mas and add:
Code: [Select]
[PDF_Printer]
 comment = PDF Printer
 path  = /var/spool/samba
 printing = lprng
 read only = yes
 printable = yes
 guest ok = yes
 print command = /usr/sbin/pdfprint %s %U %G %m %I %H

Then created /usr/sbin/pdfprint with this content:
Code: [Select]
#!/bin/bash
#convert to pdf
#$1=spool file $2=uid $3=gid $4=machinename $5=ip $6=homedir
FILENAME=pdf-$2-`date +%d%m%H%M%S`.pdf
OUTPUTPATH=$6/PDF
mkdir $OUTPUTPATH
/usr/bin/ps2pdf $1 $OUTPUTPATH/$FILENAME >> $OUTPUTPATH/pdfcreate.log 2>> $OUTPUTPATH/pdfcreate.log
rm $1
rm $OUTPUTPATH/pdfcreate.log

This file must be owned by root and permission must be '755', otherwise it will not work.

The PDF file will be created on the PDF dir on home dir drive.

This script can be changed to send the PDF to user email, eBox team place this as a controlled printer.

On Windows Machines (Tested on XP), configure this with the "HP Color LaserJet 8500 PS Driver" in order to be able to print B&W and COLOR.

Hope this is helpfull.

Best regards from Portugal.
Title: Re: eBox 1.4 - PDF Printing Support
Post by: J. A. Calvo on April 17, 2010, 06:09:32 am
Thanks for sharing this!
Title: Re: eBox 1.4 - PDF Printing Support
Post by: dangerbock on April 30, 2010, 10:54:44 am
tnkx :) ou Obrigado como nós por cá dizemos
Title: Re: eBox 1.4 - PDF Printing Support
Post by: pleandro on May 26, 2010, 01:14:16 pm
Thanks / Obrigado João.
Title: Re: eBox 1.4 - PDF Printing Support
Post by: Marcus on May 31, 2010, 01:24:19 pm
Thanks a bunch !   :)