Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Amyuni PDF Convertor
Message
From
20/03/2008 16:26:31
 
 
To
20/03/2008 07:39:07
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01303000
Message ID:
01304101
Views:
21
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 && A4
>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.
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform