Hi Rick,
We are using the latest version - I think it's 3.02.
Thanks again.
Matt.
>You're welcome, Matt. I agree it's better to install the printer with the app when that's an option. Just curious, are you using the new Amyuni 3.0 or the older 2.5x?
>
>>Thanks Rick.
>>
>>That code was very useful, but I think the user would have to have the ability to install a printer in order for the code to run successfully.
>>
>>This is what I eventually did:
>>
>>Amyuni supply a file called install.exe which can be run from our application's Wise install script. The syntax we are using is:
>>
>>
>>install.exe -s "My PDF Printer"
>>
>>
>>Which installs the printer silently. The software is installed with Administrator privileges, so there are no problems with user rights.
>>
>>In the main program of our app, we do the following:
>>
>>
>>*// Create the activeX object to control the PDF printer
>>cdi = CREATEOBJECT("CDIntfEx.CDIntfEx")
>>cdi.DriverInit("My PDF Printer")
>>cdi.Resolution = 600
>>cdi.PaperSize = 9
>>cdi.FontEmbedding = .T.
>>*//cdi.HorizontalMargin = 0
>>*//cdi.VerticalMargin = 0
>>cdi.JpegCompression = .T.
>>cdi.JpegLevel = 7
>>cdi.SetDefaultConfig()
>>*// End of PDF printer settings
>>
>>
>>
>>When we need to create a pdf file, we do this:
>>
>>
>>SET PRINTER TO 'My PDF Printer'
>>
>>Licensee = "My Company Limited"
>>ActivationCode = "My Activation Code"
>>cdi.EnablePrinter(Licensee, ActivationCode)
>>
>>*// do not prompt for file name
>>#DEFINE NoPrompte 0x00000001
>>*// use file name set by SetDefaultFileName else use document name
>>#DEFINE UseFileName 0x00000002
>>
>>cdi.filenameoptions = NoPrompte + UseFileName
>>
>>m.myfilename = "c:\pdf\My PDF File.pdf"
>>cdi.DefaultFileName = m.myfilename
>>
>>REPORT FORM myreport TO PRINTER NOCONSOLE
>>
>>SET PRINTER TO DEFAULT
>>
>>
>>Hopefully someone else will find this useful. Our future projects will use .Net and SQL Server Reporting Services, which can produce PDFs etc.