I am looking for some help from the few of you who have experience printing to PDF995 through code. I’ve reviewed all the threads and didn’t find one to specifically answer my needs.
My users are needing to save a report to PDF format for email purposes. I want to save the PDF file to a specific filename and path based upon variables I’m already using in the report. Sounds easy enough so far.
I have PDF995 and PDFEdit995 installed. According to the PDF995 people, I have configured PDFEdit995 with Option #3 for the Autoname. This should allow me to edit the INI file (manually or through code) to bypass the Save As dialog box. To make this just that much more interesting, this is sitting on a Citrix server.
The procedure I’ve written for altering the INI file has been attached. I include it in case someone else is trying to do this. As far as I can tell, it works well.
However, when I run the report, which has its printer set to PDF995, the Save As dialog box appears. Save As should be bypassed and the path and filename taken from the INI file. Interestingly, though, the dialog box appears immediately upon opening the report. The report takes about 45 seconds to complete, and it runs in the background behind the Save As dialog box. If I do nothing with the dialog box, it goes away on it’s own and no PDF file is written anywhere. If I supply a name to the Save As dialog box, a PDF file is created, but with data from the last time the report was run. And again, no PDF file created with the new data.
Changing the procedure that prints the report to acViewPreview instead of acViewNormal, sends the report to the screen with the correct data. Something’s not right with this, but I don’t know what.