Page 1 of 1

bullzip prints to ps only

Posted: Wed Oct 31, 2012 3:37 pm
by matavulj
Hi,
I have a Perl cgi script that I use to convert .doc files into pdf format.
Inside the script, I start MS Word and send the .doc file for printing to BullZip printer.
As a result I get a .pdf file, however it's content is a PostScript file (headers given below).
When doing a conversion manually through MS Word though, it works fine, the file is correctly converted to pdf.

Can anyone help me ?

Thanks!

This is the code:
--------------------------------
...
$Word->Documents->Open( {
FileName => $doc_in_file,
ConfirmConversions => 0,
ReadOnly => 1,
AddToRecentFiles => 0,
PasswordDocument => "",
PasswordTemplate => "",
Revert => 0,
WritePasswordDocument => "",
WritePasswordTemplate => "",
Format => $wdOpenFormatAuto
});
....
$Word->{'ActivePrinter'} = $::ADOBE_PRINTER_NAME;
$Word->Options->{'PrintBackground'} = 0;
$Word->ActiveDocument->PrintOut({
Background => 0, # setting this true seems to stop any printing.
Range => $wdPrintAllDocument,
Item => $wdPrintDocumentContent,
PageType => $wdPrintAllPages,
Pages => "",
PrintToFile => 1,
OutputFileName => $ps_out_file,
Append => 0
});
...
--------------------

This is the output ps file header:
=======
%!PS-Adobe-3.0
%%Title: Microsoft Word - 18326_File000037_147746.doc
%%Creator: PScript5.dll Version 5.2.2
%%CreationDate: 10/31/2012 12:29:10
%%For: mcj
%%BoundingBox: (atend)
%%Pages: (atend)
%%Orientation: Portrait
%%PageOrder: Special
%%DocumentNeededResources: (atend)
%%DocumentSuppliedResources: (atend)
%%DocumentData: Clean7Bit
%%TargetDevice: (3010) 815
%%LanguageLevel: 2
%%EndComments

%%BeginDefaults
%%PageBoundingBox: 0 0 612 792
%%ViewingOrientation: 1 0 0 1
%%EndDefaults


%%BeginProlog
%%BeginResource: file Pscript_WinNT_VMErrorHandler 5.0 0
=======