What you can do as well is to pause the printing and see in the print queue the name of the print job file.
The situation you have described may occur when the Amyuni PDF Converter is used in multi-threaded environments. However, the PDF Converter exposes API calls that the developer can use to resolve this situation.
The Lock\Unlock functions can be used in multi-threading situations to avoid conflicts between multiple applications or multiple threads requesting simultaneous access to the Converter products.
The CDIntf library uses the registry to interact with the printer drivers. When the Lock function is used, the output file name and options are set using the SetDocFileProps function and not from the SetDefaultFileName and SetFileNameOptions functions which manipulate registry entries that are common to all users. The Lock function works by locking the process based on the document name used in the print spooler. You can pause the printer spooler and check that the document name you are passing the lock function is the correct document name. The Unlock function is used after printing has ended to make sure another printout can start. The call to Unlock is needed only in the case where an error occurs; the printer will otherwise call Unlock internally as soon as printing starts to allow another printout to occur in parallel. The Timeout value represents the Timeout in milliseconds after which the function returns.
I have included below a link to our online documentation which explains this in greater detail.
https://www.amyuni.com/WebHelp/Amyuni_D ... s/Lock.htm
Please take a look at the code below which illustrates this.
#DEFINE printer_name "Amyuni PDF Converter Sample" &&define printer name
**Create Object
PDFconverter = CREATEOBJECT("CDIntf.CDIntf.4.5")
SET DEFAULT TO "CPDFConverterActiveX" && modify this line to point to the real application location ** Handle errors
LOCAL oErr as Exception
TRY
** Attaches to Existing Printer
PDFconverter.DriverInit (printer_name)
SET PRINTER TO NAME (printer_name)
&&Must use unique Document name
&& The document name is the report name
PDFconverter.Lock("shirt.frx")
PDFconverter.SetDocFileProps("shirt.frx", 3, "c:\temp", "c:\temp\vfp.pdf")
REPORT FORM shirt.frx NOEJECT NOCONSOLE TO PRINTER
PDFconverter.Unlock("shirt.frx", 1000)
PDFConverter.FileNameOptions = 0 && reset options
** Free Object
PDFConverter = 0
CATCH TO oErr
MESSAGEBOX( oErr.Message )
CANCEL
ENDTRY