BatchConvert hangs

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
cco14277
Posts: 1
Joined: Mon Mar 24 2003

BatchConvert hangs

Post by cco14277 »

I am trying to convert Crystal Reports 6.0 (.rpt) files to PDF and am using batchconvert property to convert it. However, the Visual Basic 5.0 application hangs on the BatchConvert line. Any ideas?
I am using Amyuni PDF Converter Pro v.2.08a.

Here is a code snippet:

strPDFFileName = Trim(FilePath) + Trim(Dest_Document_Name) & ".pdf"
Set fsofile = CreateObject("TMFSO.File")


If Not fsofile.FileExists(strPDFFileName) Then
Set PDFPrinter = CreateObject("CDINTF.CDINTF")

'Adds a new printer
PDFPrinter.DriverInit PDF_PRINTERNAME

'Set Paper Size and Orientation
PDFPrinter.PaperSize = 1 'standard Letter 8 1/2 x 11 inch
PDFPrinter.Orientation = 1 'Portrait

'Compression Range is 1 to 9
PDFPrinter.JPegLevel = 1

'Set Default Configuration for all applications
PDFPrinter.SetDefaultConfig

'Set printer as default
PDFPrinter.SetDefaultPrinter

'Set Default Directory
PDFPrinter.DefaultDirectory = FilePath

'Set Default FileName
PDFPrinter.DefaultFileName = strPDFFileName

'Set Options (NoPrompt + UseFileName)
PDFPrinter.FileNameOptions = 1 + 2

'Printout
'strSourceFileName = strFileName

PDFPrinter.BatchConvert Dest_Document_Name + ".rpt"

'Reset all options before returning
PDFPrinter.FileNameOptions = 0

'Remove PDFPrinter
Set PDFPrinter = Nothing
End If

kamiller42
Posts: 3
Joined: Thu Jun 09 2005

Post by kamiller42 »

If there is a problem printing the file from the host application, BatchConvert will hang. The host application is waiting for user interaction to continue, and that might be in the form of having to end task on the process.
Post Reply