Alaska Software Inc. - PDFCreator activex
Username: Password:
AuthorTopic: PDFCreator activex
CarlosPDFCreator activex
on Thu, 26 Nov 2009 19:03:29 +0000
Hi,
I'm trying to use PDFCreator printer activex but have a problem I hope you 
can help:

In PDFCreator documentation:
Public Property Get cOption(ByVal PropertyName As String) As Variant
Public Property Let cOption(ByVal PropertyName As String, ByVal Value As 
Variant)

In VBasic sample:
With pdfjob
   .cOption("UseAutosave") = 1
End With

My xBase++ Test function:
*****************************
Function ToPDF
   LOCAL oPdf, cPDFPath, cPDFName
   oPdf := CreateObject( "PDFCreator.clsPDFCreator" )
   IF oPdf == NIL
      ? "PDFCreator not instaled."
      RETURN .F.
   ENDIF
   If !oPdf:cStart( "/NoProcessingAtStartup" )
      oPdf:Destroy()
      ? "Not possible initialize PDFCreator."
      RETURN .F.
   ENDIF

?   oPdf:cOption("UseAutosave")
?   oPdf:cOption("UseAutosaveDirectory")
?   oPdf:cOption("AutosaveDirectory")
?   oPdf:cOption("AutosaveFormat")

   cPDFPath := "C:\XXX\"
   cPDFName := "Test.PDF"
   oPdf:cOption( "UseAutosave", 1 )          XBASE++ ERROR: Error 
Automation/6500
   oPdf:cOption( "UseAutosaveDirectory", 1 )
   oPdf:cOption( "AutosaveDirectory", cPDFPath )
   oPdf:cOption( "AutosaveFilename", cPDFName )
   oPdf:cOption( "AutosaveFormat", 0 )    0=PDF
   oPdf:cClearCache()
 ...
   oPdf:Destroy()
RETURN .T.
**************************************


In this xBase++ function I get the error "Error Automation/6500" in line 
oPdf:cOption( "UseAutosave", 1 )

Xbase++ version     : Xbase++ (R) Version 1.90.355
Operating system    : Windows Vista 06.00 Build 06002 Service Pack 2
------------------------------------------------------------------------------
oError:args         :
          -> VALTYPE: C VALUE: cOption
          -> VALTYPE: C VALUE: UseAutosave
          -> VALTYPE: C VALUE: 1
oError:canDefault   : S
oError:canRetry     : N
oError:canSubstitute: S
oError:cargo        : NIL
oError:description  : Invalid number of parameters.
Parameter is missing
oError:filename     : NIL
oError:genCode      : NIL
oError:operation    : cOption
oError:osCode       :          -2147352562
oError:severity     :          2
oError:subCode      :       6500
oError:subSystem    : Automation
oError:thread       :          1
oError:tries        : NIL

Any idea how assign a value to "UseAutoSave" propoerty?
Thanks,
Carlos