What I ended up doing was writing a class to implement IReportGenerator and then print directly to the Microsoft Print to PDF driver. Print it to a temp folder and then do want you want with the file.
I went through a number of other solutions that didn’t work for various reasons.
The Premiere Previewer imports a procedure into your app called PremiereCreatePDFFromQueue. This supports the popular Clarion/PDF engines.
It does as you suggest; it’s a simple source procedure that wraps your preferred class and just consumes the WMF files into a PDF.
That said, I’m still using the Tracker one myself. (But I created a “virgin folder” for it, which I just copy into my Clarion folder.) That’s easy enough to do one-time, and then you have it forever.
I use Klarisoft wPDFControl template to view Clarion reports as PDF documents.
It also lets me add metadata to the document properties, like this:
KS_wPDFControl.Author = CLIP(Glo:MunicipalityName)
KS_wPDFControl.Title = 'Vendor Invoice Checks'
KS_wPDFControl.Subject = 'Wisconsin Municipal Accounting Program: Report 20'
KS_wPDFControl.ThumbNails = TRUE ! Color
KS_wPDFControl.EnhancedOptions = 8
IF Glo:VerticalAdjustment = 0
Loc:VerticalAdjustment = ' with no vertical adjustment of the address.'
ELSIF Glo:VerticalAdjustment > 0
Loc:VerticalAdjustment = '. The address is moved down ' & Glo:VerticalAdjustment * 0.001 & ' of an inch.'
ELSE
Loc:VerticalAdjustment = '. The address is moved up ' & (- Glo:VerticalAdjustment * 0.001) & ' of an inch.'
END
KS_wPDFControl.Keywords = 'The check is at the bottom' & Loc:VerticalAdjustment & '<13,10>' & | CHOOSE(Glo:EFT = 'Yes', 'EFT notice = Yes.', 'EFT notice = No.') & '<13,10>Sorted by: Payee, Due Date.'
…, so the user can view this metadata within the program at a later time.
I’ve been using it for more than 10 years. It works great. It is definitely not clunky or slow.
It is an efficient way to do it. It’s very seamless to the user.
wPDFControl is a Clarion template wrapper around the wPDF from WPCubed GmhH which also has emf conversion to PDF, whenever Clarion starts using EMF.