Hi Paul,
I understand your frustration. Believe me, we didn't want to pull the PDF driver from R&R, but Amyuni was pretty adamant that their license potential not be diluted by our policy of royalty-free runtime distribution (which is a big selling point for R&R to many ISVs and internal developers). Our policy implied that developers would be able to distribute whatever components that R&R needed to make their reports work and Amyuni said that people had to purchase individual licenses.Like Tom, I've generally gone over to CutePDF for my day-to-day needs for generating PDFs from R&R. For programming, as you've noted, I've had to discover some workarounds and new techniques.
Unique to Amyuni, when you print to a named file from R&R, you get an actual PDF file. If you try this with any other PDF generator, you get a PostScript file. To verify this, pick CutePDF as your printer and send to a .PS file and edit the result with Notepad.
You have a couple of options here. One is that you can pass this file into the Acrobat distiller and have it create your PDF. The other is that you can use a component of CutePDF called GhostScript to do this. After a ton of research, I've found the necessary specs to make this work.
Both techniques are shown here (code fragments are FoxPro):
Acrobat Distiller:
==================
oPDF = CREATEOBJECT("PdfDistiller.PdfDistiller.1")
nStatus = oPDF.FileToPDF(fPSFile1, fPDFTarget, "standard.joboptions")
RELEASE oPDF
--------
This technique requires that the distiller resides on the computer that the job is being run. In my program, this is a server routine that periodically searches a set of locations for .PS files, adds them to a queue for processing and then deletes them when finished. I've left out a lot, but you can probably figure out the particulars you'd need in your implementation.
---------
GhostScript:
============
CutePDF generates a PS file that it feeds into GhostScript. GhostScript will by default be in the c:\program files\gplgs\ folder (c:\program files (x86)\gplgs\) on Windows 7 systems). The actual executable is gswin32c.exe
The structure of the command is below:
c:\program files (x86)\gplgs\gswin32c -sDEVICE=pdfwrite -sOutputFile=Target.PDF -dBATCH -dNOPAUSE Source.PS
If you can call an external EXE from your program, you can build this command within your system and pass in the appropriate Source and Target files and make it do what you want. In my program, I've added this command to a button that generates a complex graphics-intensive flyer on demand.
I call R&R using a runtime table. I have to check for the presence of the rrunout.dbf file, the .PS and then kick off GhostScript when ready. I also have to check to see if the .PDF has been generated and post an appropriate message for that as well.
As an aside, I also use this technique to create JPGs from PS files that R&R generates, although this only works with single-page reports).
I'll admit, it's a lot of work to get the same results that used to be incorporated within R&R, but cost-wise, it's free and for many developers, that's an important consideration.
=====================
As to whether we'll embed support for another distiller in R&R, we're thinking about it, but we're afraid that we'll run into the same or similar licensing issues. And with a product like CutePDF, we're fuzzy as to whether we're allowed to use it within a commercial product.