PDFConverter printing to the real printer

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
cmorant
Posts: 10
Joined: Fri Sep 27 2002

PDFConverter printing to the real printer

Post by cmorant »

Hi all,

I have a problem with the PDF Converter

I'm printing from a VB Outlook addin, the I print the email to be sent to the PDFConverter using this code :

Public Function PrintMailToPDF(InMail As MailItem, OutPath As String, Password As String, bCanCopy As Boolean, bCanPrint As Boolean) As String
Dim ErrorText As String
Dim Rights As Long

Rights = &HFFFFFFFF
If bCanCopy Then Rights = Rights - EnableCopying
If bCanPrint Then Rights = Rights - EnablePrinting
ErrorText = "1021µ" & kVeridisPDFPrinterName
On Error GoTo ErrorAbortNoReset

If SetDefaultPrinter(pdf) <> 1 Then GoTo ErrorAbortNoReset ' set this printer as default

On Error GoTo ErrorAbort
If SetResolution(pdf, 600) <> 1 Then GoTo ErrorAbort ' set 600 DPI as default for all printouts
If SetDefaultConfig(pdf) <> 1 Then GoTo ErrorAbort
If SetFileNameOptions(pdf, NoPrompt + UseFileName) <> 1 Then GoTo ErrorAbort
If SetDefaultFileName(pdf, OutPath) <> 1 Then GoTo ErrorAbort
If EnablePrinter(pdf, kLicencePDF, kActivationCode) <> 1 Then GoTo ErrorAbort

InMail.PrintOut
Printer.EndDoc
RestoreDefaultPrinter pdf

If EncryptPDFDocument128(OutPath, Password, Password, Rights) <> 1 Then GoTo ErrorAbort
ErrorText = ""
GoTo ErrorAbortNoReset

ErrorAbort:
RestoreDefaultPrinter pdf
ErrorAbortNoReset:
Err.Clear
PrintMailToPDF = ErrorText
End Function


My problem is this, very regularly (NOT ALLWAYS) the print job is sent to the DEFAULT PRINTER, (the real paper printer).
Then the Encrypt fails because the Temp PDF file doesn't exists

Does this sound normal to you ?

Did anybody have that ?

Can someone help ?

Thank you

Christian

Version used : 2.1e PDFConverter Pro
jkurian
Posts: 1
Joined: Tue Nov 11 2003

Re:PDFConverter printing to the real printer

Post by jkurian »

Our clients also experienced the similar problem from powerbuilder application.
But we are unable to recreate this problem.
We are also looking for a solution.

Thanks,

J Kurian

Version used : 2.1d PDFConverter Pro
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Post by Jose »

Hello,

The situation you are encountering is related to the fact that Outlook tends not to recognize changes to the default printer when the changes occur when Outlook is running and in order to resolve this situation you will need to change the default printer when Outlook is not running.

In the case of PowerBuilder, we have found that occasionally PowerBuilder doesn't print to the system’s default printer.
In this case we suggest that you modify the datawindow’s active printer. I have included a code snippet to illustrate this.
dw_datawidow1.Modify('DataWindow.Printer="Amyuni PDF Converter" ')

Hope this helps.
Post Reply