I am having some trouble getting the printer activated with version 2.50 of the Driver. I did the initial install of the printer named "AutoSoft PDF Printer" during the demo install.
I am receiving the following error message on the 'Printer.Print "TEST"' line: "Printer not activated, error code -22"
Can anyone take a look at this code (its in VB 6.0) to see what I'm doing wrong?
Private Sub btnPrint_Click()
Dim AVAILPRNTR As Printer
For Each AVAILPRNTR In Printers
If AVAILPRNTR.DeviceName = "AutoSoft PDF Printer" Then
Set Printer = AVAILPRNTR
Exit For
End If
Next
Call EnablePrinter(m_PrinterHandle, "Evaluation Version Developer", "07EFCDAB01000100584F82962DEADB671CE2564605558C4039AEB6BDBA542926639B79ECC556F310DB8592F1C68BF146A4D4E86EB8C0E7824CE83E1E8DC2244449F2A2A71D89169AADABA03407F0B8DD4CD2302DE1F785F2D63118A06BF1C960C809115DDFF8EE5320AF3C4C33539D8EC6E6E6")
Printer.Print "TEST"
Printer.EndDoc
End Sub
Private Sub Form_Load()
m_PrinterHandle = DriverInit("AutoSoft PDF Printer")
Call EnablePrinter(m_PrinterHandle, "Evaluation Version Developer", "07EFCDAB01000100584F82962DEADB671CE2564605558C4039AEB6BDBA542926639B79ECC556F310DB8592F1C68BF146A4D4E86EB8C0E7824CE83E1E8DC2244449F2A2A71D89169AADABA03407F0B8DD4CD2302DE1F785F2D63118A06BF1C960C809115DDFF8EE5320AF3C4C33539D8EC6E6E6")
Call SetDefaultDirectory(m_PrinterHandle, "C:\ASITEXT")
Call SetDefaultFileName(m_PrinterHandle, "C:\ASITEXT\REPORT.PDF")
Call SetFileNameOptions(m_PrinterHandle, 3)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Call DriverEnd(m_PrinterHandle)
End Sub
Printer Not Activated Errors
Hello,
Your code seems fine and the activation code you are using seems fine.
Please check that you are not trying to activate an older version of the driver, maybe an older version is stuck in memory.
Please completely install the older version of the printer, reboot your system and install the new version again.
Hope this helps.
Your code seems fine and the activation code you are using seems fine.
Please check that you are not trying to activate an older version of the driver, maybe an older version is stuck in memory.
Please completely install the older version of the printer, reboot your system and install the new version again.
Hope this helps.