Hi,
I recently migrated from samba3 to samba4.
On the samba3 server I had a "printer" that converted pcl6 to pdf. I
tried to make a similar printer in samba4, but it's not working.
Not working means the printed document is nowhere to be found.
This is the section in smb.conf :
[papyrusPDF]
comment = Papyrus-to-PDF printer
path = /var/spool/samba
# guest ok = Yes
printable = Yes
# printing = lprng
# print command = /usr/bin/pcl2pdf %s %u %H "%J"
print command = /usr/bin/pcl2pdf /var/spool/samba/%s %u %H "%J"
# lpq command = lpq -P'%p'
lpq command # lprm command = lprm -P'%p' %j
lprm command # lppause command = lpc hold '%p' %j
# lpresume command = lpc release '%p' %j
# queuepause command = lpc stop '%p'
# queueresume command = lpc start '%p'
Commented out lines were there in samba3.
pcl2pdf is a script that uses pcl6 to renter pcl6 to pdf. I can use
pcl2pdf as a regular user.
This is pcl2pdf :
#!/bin/sh
# Simple script to convert a specified pcl file into a PDF document
# and place it in a location that is shared by the Samba server.
#
# Arguments:
# 1st - The name of the spool file
#
# John Bright, 2001, jbright at winfordeng.com
# We will create the pdf into a temporary file based upon the current
date and time.
# After we are finished, we'll rename it to a file with the same date,
but ending
# in .pdf. We do this because if a user tries to open a PDF that is
still being written,
# they will get a message that it is corrupt, when it is actually just
not done yet.
DATE=`date +%b%d-%H%M%S`
# Directory in which to place the output
# Be sure this directory exists and is writable by the user that Samba
# is running as (for example, the nobody user)
#OUTDIR=/home/samba/shares/pdf
OUTDIR=/home/temp
echo $1 $2 $3 $4 >> $OUTDIR/log.txt
export PCLFONTSOURCE=/usr/share/urwfonts
/usr/bin/pcl6 -dNOPAUSE -sDEVICE=pdfwrite
-sOutputFile="$OUTDIR/pap$DATE.tmp" $1
if ! [ -d $OUTDIR/papyrus ]; then mkdir -p $OUTDIR/papyrus
fi
mv "$OUTDIR/pap$DATE.tmp"
"$OUTDIR/papyrus/papyrus-$DATE.pdf"
#rm $1
How can I debug this ? In what log-files should errors show up, because
I can't find any in the existing log-files of samba ?
In pcl2pdf there are some debug-lines, but these do nothing when
"used"
by samba4, which makes me believe the script is not executed.
I did restart samba after I added the section in smb.conf.
Thanks,
Koenraad
Hi, I'm still trying, with no success. Is the following example still valid : https://wiki.samba.org/index.php/Virtual_PDF_Printer It dates from 19 August 2014, so I expect it should work with samba4, although it's not working for me. I tried logging with the help of this wiki-page : https://wiki.samba.org/index.php/Client_specific_Log I don't see anything I can understand though. Any suggestions what I should look for ? Or how to debug this ? TIA, Koenraad. My samba-version : Version 4.1.17-Zentyal
2015-06-29 9:39 GMT+02:00 Koenraad Lelong <samba.k.lelong at ace-electronics.be>:> Hi, > > I'm still trying, with no success. > Is the following example still valid : > https://wiki.samba.org/index.php/Virtual_PDF_Printer > > It dates from 19 August 2014, so I expect it should work with samba4, > although it's not working for me. > > I tried logging with the help of this wiki-page : > https://wiki.samba.org/index.php/Client_specific_Log > > I don't see anything I can understand though. > Any suggestions what I should look for ? Or how to debug this ? > > TIA, > > Koenraad. > > My samba-version : Version 4.1.17-Zentyal > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >Have Samba4 and Cups permissions to write to /home/temp folder, and to run those commands/scripts?. Greetings!!
On 29/06/15 08:39, Koenraad Lelong wrote:> Hi, > > I'm still trying, with no success. > Is the following example still valid : > https://wiki.samba.org/index.php/Virtual_PDF_Printer > > It dates from 19 August 2014, so I expect it should work with samba4, > although it's not working for me. > > I tried logging with the help of this wiki-page : > https://wiki.samba.org/index.php/Client_specific_Log > > I don't see anything I can understand though. > Any suggestions what I should look for ? Or how to debug this ? > > TIA, > > Koenraad. > > My samba-version : Version 4.1.17-Zentyal >Hi, I checked the Wiki PDF page and the only problem I could see was that the external link to HP didn't work, this is now fixed. Just where is it failing ? what have you got in '/var/log/samba/Pdfprint.log' Rowland
El 22/06/15 a les 09:44, Koenraad Lelong ha escrit:> Hi, > > I recently migrated from samba3 to samba4. > On the samba3 server I had a "printer" that converted pcl6 to pdf. I > tried to make a similar printer in samba4, but it's not working. > Not working means the printed document is nowhere to be found.I'm not sure you can mix cups printing with locally defined printers. If it's possible then, sorry, I have no idea what's happening. If it isn't, maybe you could use the script as a cups filter, something similar to http://www.cups-pdf.de/ I have it setup this way on the cups server and it works both with the current samba 3 setup as well as with my samba 4 test server (unsurprisingly since it's just another printer wrt samba). Bye -- Luca Olivetti Wetron Automation Technology http://www.wetron.es/ Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007
Op 30-06-15 om 09:31 schreef Luca Olivetti:> El 22/06/15 a les 09:44, Koenraad Lelong ha escrit: >> Hi, >> >> I recently migrated from samba3 to samba4. >> On the samba3 server I had a "printer" that converted pcl6 to pdf. I >> tried to make a similar printer in samba4, but it's not working. >> Not working means the printed document is nowhere to be found. > > I'm not sure you can mix cups printing with locally defined printers. > If it's possible then, sorry, I have no idea what's happening. > If it isn't, maybe you could use the script as a cups filter, something > similar to > > http://www.cups-pdf.de/ > > I have it setup this way on the cups server and it works both with the > current samba 3 setup as well as with my samba 4 test server > (unsurprisingly since it's just another printer wrt samba). > > ByeThanks for your input. I'm going to study that. On my samba3 server I had a pdf-printer using cups. But I also had a printer that converts pcl to pdf. And that's what I'm trying to do, utimately : make a pcl to pdf printer (see my first post). Since that did not work I was trying to get that ps-to-pdf-printer to work so I could try modify that printer to convert pcl to pdf in stead of postscript to pdf. Koenraad