I installed the dll by running Setup.exe, adding a reference to cdintf.dll in my .NET project and then calling it per examples posted in this forum:
Code: Select all
Dim printerName As String = "Amyuni PDF Converter"
Dim license As String = "07EF... "
Dim cdi As New CDIntfEx.CDIntfEx()
cdi.PDFDriverInit(printerName)
cdi.EnablePrinter(printerName, license)
cdi.SetDefaultPrinter()
cdi.DefaultDirectory = "C:\amyuni"
cdi.FileNameOptionsEx = &H1&
cdi.EnablePrinter(printerName, license)
cdi.BatchConvert("C:\MyFile.doc")
cdi.FileNameOptions = 0
After BatchConvert(), MSWord is opened, with the file loaded. Word then pops up the error message:
When I click OK it adds:Windows cannot print due to a problem with the current printer setup. Try one or more of the following:
*Check the printer by printing a test page from Windows.
*make sure the printer is turned on and online.
*Reinstall the printer driver.
When I kill the Word app, my program remains hung [it times out and BatchConvert() returns if I leave it running long enough].Runtime Error '1046'
I have a feeling I'm missing something very basic.
I get the same results if I use the AxCDIntfEx control.
Any help appreciated.
Thanks.
Charu