Releasecom not working in VFP 9

I succeeded in printing to pdf using the com object. Releasing it doesn’t work:
PDF.ReleaseCom()
PDF=.null.
RELEASE PDF
And even after “Release all” and “clear all” it still shows up in Process Explorer. The only way to get rid of it is closing foxpro.

I don't seem to have the problem (PDFCreator 2.2.1 - windows 10 - VFP 9). Release works after successful print.

However I cannot get it to print without having the printer prompt and choosing PDFCreator as the printer. Have you managed to do a print without the "PROMPT". I need to print to pdf about 200 times in rapid succession. Worked fine with earlier version .

Annoyingly, it works just fine with the windows test page.

This is the code that works for me. (g_usrd(2) contains a path)

PDF=CREATEOBJECT(“PDFCreator.JobQueue”)
PDF.Initialize()
SELECT factuit
SCAN
    SELECT fact_uit2
    L_filt=factuit.jaar+factuit.dbnr+factuit.dcl
    l_prjname = [Factuur_]+STRT(factuit.dbnr+"-"+factuit.jaar+"-"+factuit.dcl," ")
    SET FILTER TO jaar+dbnr+dcl = l_filt
    REPORT FORM factuur TO PRINTER OFF NODIALOG
    PDF.WaitForJob(2)
    pd_job = PDF.NextJob
    pd_job.ConvertTo(STRT(UPPER(g_usrd(2)),“DATA”,“FACTUREN”)+l_prjname)
    SELECT factuit
ENDSCAN
PDF.WaitForJob(2)
PDF.ReleaseCom()
PDF=.null.
RELEASE PDF

Thank you very much. Examples are so much easier for me.

The report I am using has all the select code in the dataenvironment and just needs a single parameter to run normally perfectly OK, I will try a simpler example and see if that does it.

Best wishes for the new year.