Wrong file format

About the programming interface for the virtual PDF printer driver.

Moderator: jr

Post Reply
DaSe
Posts: 1
Joined: Mon Jun 02, 2008 1:16 pm

Wrong file format

Post by DaSe »

Today I downloaded and installed the latest version of the Bullzip PDF Printer on my PC (WinXP SP2).
The goal is to use Bullzip to create PDF-documents from one of our application and set the name of the outputfile from within our Xbase++ -application.

When I try to create a PDF-document from e.g. Word, Excel, Notpad, ..., this product works fine. The filename is asked and the PDF-document is created correctly.

When I try to create the PDF-document from our application and set the name of the outputfile via ActiveX (Bullzip.PDFPrinterSettings => :SetValue('Output', <Filename>'), I can not create a valid PDF-document.
As a result of the SetValue, a file 'runonce@Bullzip PDF Printer.ini' is created, with the correct information.

A PDF-file with the given name is created, but when I try to open that document with Adobe Reader I get the following message:
"Adobe Reader could not open 'xxxxx.PDF' because it is either not a support file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)."

When I open that PDF-file, it looks more like a PostScript-file. The size of the PDF-file is also too big.

I re-installed already the Bullzip PDF Printer, but without any result.

What did I wrong ?
How can I solve this problem ?

Thanks,
Danny



//-----------------------
The file runonce@Bullzip PDF Printer.ini contains the following:

[PDF Printer]
Output=D:\TEMP\TESTRAS.PDF


//-----------------------
The created PDF-files starts with the following:

%!PS-Adobe-3.0
%%Title: H:\RRW10\REPORTS\ADIPLAN\VKP_TAB\Tab_Ras.RRW
%%Creator: PScript5.dll Version 5.2.2
%%CreationDate: 6/2/2008 15:56:29
%%For: dase
%%BoundingBox: (atend)
%%Pages: (atend)
%%Orientation: Portrait
%%PageOrder: Special
%%DocumentNeededResources: (atend)
%%DocumentSuppliedResources: (atend)
%%DocumentData: Clean7Bit
%%TargetDevice: (3010) 815
%%LanguageLevel: 2
%%EndComments

%%BeginDefaults
%%PageBoundingBox: 0 0 595 842
%%ViewingOrientation: 1 0 0 1
%%EndDefaults


%%BeginProlog
%%BeginResource: file Pscript_WinNT_VMErrorHandler 5.0 0
/currentpacking where{pop/oldpack currentpacking def/setpacking where{pop false
setpacking}if}if/$brkpage 64 dict def $brkpage begin/prnt{dup type/stringtype
ne{=string cvs}if dup length 6 mul/tx exch def/ty 10 def currentpoint/toy exch
def/tox exch def 1 setgray newpath tox toy 2 sub moveto 0 ty rlineto tx 0
rlineto 0 ty neg rlineto closepath fill tox toy moveto 0 setgray show}bind def
/nl{currentpoint exch pop lmargin exch moveto 0 -10 rmoveto}def/=={/cp 0 def
typeprint nl}def/typeprint{dup type exec}readonly def/lmargin 72 def/rmargin 72
def/tprint{dup length cp add rmargin gt{nl/cp 0 def}if dup length cp add/cp
exch def prnt}readonly def/cvsprint{=string cvs tprint( )tprint}readonly def
/integertype{cvsprint}readonly def/realtype{cvsprint}readonly def/booleantype
{cvsprint}readonly def/operatortype{(--)tprint =string cvs tprint(-- )tprint}
readonly def/marktype{pop(-mark- )tprint}readonly def/dicttype{pop
(-dictionary- )tprint}readonly def/nulltype{pop(-null- )tprint}readonly def
/filetype{pop(-filestream- )tprint}readonly def/savetype{pop(-savelevel- )
tprint}readonly def/fonttype{pop(-fontid- )tprint}readonly def/nametype{dup
xcheck not{(/)tprint}if cvsprint}readonly def/stringtype{dup rcheck{(\()tprint
tprint(\))tprint}{pop(-string- )tprint}ifelse}readonly def/arraytype{dup rcheck
{dup xcheck{({)tprint{typeprint}forall(})tprint}{([)tprint{typeprint}forall(])
tprint}ifelse}{pop(-array- )tprint}ifelse}readonly def/packedarraytype{dup
rcheck{dup xcheck{({)tprint{typeprint}forall(})tprint}{([)tprint{typeprint}
forall(])tprint}ifelse}{pop(-packedarray- )tprint}ifelse}readonly def/courier
/Courier findfont 10 scalefont def end errordict/handleerror{systemdict begin
$error begin $brkpage begin newerror{/newerror false store vmstatus pop pop 0
ne{grestoreall}if initgraphics courier setfont lmargin 720 moveto errorname
(VMerror)eq{version cvi 2016 ge{userdict/ehsave known{clear userdict/ehsave get
restore 2 vmreclaim}if vmstatus exch pop exch pop PrtVMMsg}if}if systemdict
/showpage get exec(%%[ Error: )print errorname =print(; OffendingCommand: )
print/command load =print( ]%%)= flush}if end end end}dup 0 systemdict put dup
4 $brkpage put bind readonly put/currentpacking where{pop/setpacking where{pop
oldpack setpacking}if}if
%%EndResource
userdict /Pscript_WinNT_Incr 230 dict dup begin put
%%BeginResource: file Pscript_FatalError 5.0 0
userdict begin/FatalErrorIf{{initgraphics findfont 1 index 0 eq{exch pop}{dup
length dict begin{1 index/FID ne{def}{pop pop}ifelse}forall/Encoding
{ISOLatin1Encoding}stopped{StandardEncoding}if def currentdict end

....
NickS
Posts: 1
Joined: Tue May 04, 2010 12:15 am

Re: Wrong file format

Post by NickS »

I'm having the same problem printing from .net using word automation.

I'm using the printto command to have the file print, and it generates a file that is too large and cannot be read by adobe.

I'd be curious if anybody has found a solution to this problem.
Post Reply