Hello,
I've just upgraded to the latest version of the Foxit reader. I'd like to be able to create PDF files by printing from an Excel macro. (I can only use an older version of Excel, so the ability to export directly from Excel to a PDF is unfortunately not an option.) I'm currently printing to the Foxit Reader PDF printer. This works fine, but I'd like to be able to direct the output to variable directories and set the file name without user input.
Looking at the printer preferences I can set a default folder for Generated PDF Files, and there are options to overwrite, use a default filename, open after creating, etc. If I could change these settings automatically I think it would do exactly what I want. From what I read, I think these values are set in the registry. So my thought is to read the original registry values, change them to whatever's needed for the current print job, print, and then rewrite the registry values to the original.
So am I barking up the right tree, and if so, which registry key(s) should I be looking at that have these values? Or is there a better way to do it? (Via a command line, for example? I haven't found anything that indicates that that would be possible, though it seems it would be cleaner.)
My other option is to have my users set this as their default printer, and set the output to a fixed directory. Then I'll move and rename the file after it is created. It's possible since I only have 5 users to worry about. But this seems ugly. To be honest, I wish it were possible to manipulate the parameters via an .ini file, but I think that has been out since version 3 or so. It was certainly easier for non-programmers.
Thoughts are appreciated.
Thanks,
Dan
I've just upgraded to the latest version of the Foxit reader. I'd like to be able to create PDF files by printing from an Excel macro. (I can only use an older version of Excel, so the ability to export directly from Excel to a PDF is unfortunately not an option.) I'm currently printing to the Foxit Reader PDF printer. This works fine, but I'd like to be able to direct the output to variable directories and set the file name without user input.
Looking at the printer preferences I can set a default folder for Generated PDF Files, and there are options to overwrite, use a default filename, open after creating, etc. If I could change these settings automatically I think it would do exactly what I want. From what I read, I think these values are set in the registry. So my thought is to read the original registry values, change them to whatever's needed for the current print job, print, and then rewrite the registry values to the original.
So am I barking up the right tree, and if so, which registry key(s) should I be looking at that have these values? Or is there a better way to do it? (Via a command line, for example? I haven't found anything that indicates that that would be possible, though it seems it would be cleaner.)
My other option is to have my users set this as their default printer, and set the output to a fixed directory. Then I'll move and rename the file after it is created. It's possible since I only have 5 users to worry about. But this seems ugly. To be honest, I wish it were possible to manipulate the parameters via an .ini file, but I think that has been out since version 3 or so. It was certainly easier for non-programmers.
Thoughts are appreciated.
Thanks,
Dan
Comment