[Sussex] Printing problems
Brendan Whelan
b_whelan at mistral.co.uk
Tue Aug 14 11:45:33 UTC 2007
As you can see from my earlier email I have encountered a number of problems when trying to setup a printing regime that meets our needs. The problem is now very detailed and is therefore no one best suited to user group help.
Would anyone in the group like a small amount of paid consultancy to work with me to resolve the problem? If so, please will you email me directly ( b_whelan at mistral.co.uk ) with a brief overview of your skills and your hourly rate. I am based in Steyning but can happily take the server to anywhere within a reasonable distance.
Brendan
----- Original Message -----
From: Brendan Whelan
To: LUG email list for the Sussex Counties
Sent: Monday, August 13, 2007 12:54 PM
Subject: [Sussex] Printing problems
Using Fedora Core 6 and Samsung SCX-4200 - I need to be able to create files with dynamic content which I can then print. I am testing the printout mechanisms that I will need but I am encountering various problems when using both "lpr", for pdf files, or "ooffice", for odt files. Below is PHP script which I have used to record the ways I have attempted - most of the problems appear to be with X-server. All suggestions welcome. Many thanks, Brendan
<?php
print "Started dud_print_pdf.php<br>\n";
// lpr command for a pdf file
// If I run this command in a terminal window it works but I am prompted to press an "OK" button
// When run in program I get error_code -1
//$command = "lpr -# 1 /home/db/support/support_application/dud.pdf";
// lpr in command script
// Using script containing the above command......
// If I run this shell script in a terminal window it works but I am prompted to press an "OK" button
// When run via this program - gives error code -1
// and the log produced "lpr: cannot connect to X server"
// I also get this same error if I run the shell script on the cron queue
//$command = "bash /home/db/support/support_application/dud.sh";
// oofice command for odt file
// If I run the command in a terminal window it works but I am prompted to press an "OK" button
// When run viA this program it gives error code 0 (i.e. no error) but no printout appears
//$command = "/usr/bin/ooffice -headless -pt scx4200 /home/bu/belfast/ni_reports/screen_report.odt";
// ooffice in command script
// Using script containing the above command......
// If I run this shell script in a terminal window it works AND I am NOT prompted to press an "OK" button
// If I run it via a cron job I get:
//Set DISPLAY environment variable, use -display option
// or check permissions of your X-Server
// (See "man X" resp. "man xhost" for details)
$command = "bash /home/db/support/support_application/dud1.sh";
print ">>>command>$command<<br>\n";
$result = exec($command, $output, $error_code);
if ($error_code > 0)
{
print "Unable to execute command - code was >$error_code<";
}
else
{
print "No error reported<br>\n";
}
print "Finished<br>\n";
?>
------------------------------------------------------------------------------
__
Sussex mailing list
Sussex at mailman.lug.org.uk
E-mail Address: sussex at mailman.lug.org.uk
Sussex LUG Website: http://www.sussex.lug.org.uk/
https://mailman.lug.org.uk/mailman/listinfo/sussex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/sussex/attachments/20070814/02fbf3a8/attachment.htm
More information about the Sussex
mailing list