Hi,
I am using WordPerfect 5.1 for DOS to merge information from a database (WP
secondary file) with a WP form file (WP Primary file), then print it from
WP5.1 using a PostScript printer driver to a PostScript File. After exiting
DOSEMU I run ps2pdf to convert the previous output to a PDF file, and
deliver the result back to the browser.
I am using Fedora Core 4, Apache 2.0.54, Perl 3.5.8.
The operation was taking a long time to merge and print a very simple
document so I did some timings. By way of comparison on the same hardware:
Windows 2000 0.7 seconds
Linux/DOSEMU 6.8 seconds
Linux/Perl/DOSEMU 125 seconds
Although the program runs considerably faster under Windows, my main concern
here in this forum is the 20 times longer it takes to run it from Perl.
The Perl script I am using to run the program is:
#!/usr/bin/perl -w
my $home = "/home/www/web1" ;
my $doshome = "/home/www/web1/dosemu/freedos" ;
$cmd = "dosemu.bin -D-a -I 'keystroke \"\\rwpw.bat test\\rexitemu\\r\"'
>errors-dpweb.log 2>&1;" ;
$ENV{'TERM'} = "xterm";
$ENV{'HOME'} = $home ;
$ENV{'DOSDRIVE_D'} = $doshome ;
#print "Content-type:text/html\n\n";
system ("$cmd") ;
print "Content-type:application/pdf\n\n";
my $epsfile = $doshome."/output/test.eps" ;
my $pdffile = $doshome."/output/test.pdf" ;
system ("ps2pdf $epsfile $pdffile") ;
open(TXT, "<".$pdffile) ;
my @text = <TXT> ;
close(TXT) ;
print @text ;
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Many thanks
Brian
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>