Link to home
Start Free TrialLog in
Avatar of jturpin
jturpinFlag for United States of America

asked on

PDF printing - setting FN

I am using QuickReports.

I set the printer to the Adobe distiller, and then print.

But I need to be able to set the filename that the distiller will use, instead of the default dialog appearing to prompt for a filename.

Does anyone know how to do this ?

Thanks in advance,

John.
Avatar of twalgrave
twalgrave

Note: If you're not prompted for a filename and location, configure Acrobat Distiller to prompt you for a filename and location before saving:
-- In Acrobat Distiller 4.x, choose File > Preferences, deselect Ask For PDF File Destination, and then click OK.
-- In Acrobat Distiller 5.x, do the following:
1. Choose Start > Settings > Printers (Windows 2000) or Start > Settings > Printers and Faxes (Windows XP), right-click the Distiller printer, and choose Printing Preferences.
2. Click the Adobe PDF Settings tab, deselect Prompt for the PDF Filename, and then click OK.
Avatar of jturpin

ASKER


Thanks for the try, but that is not what I want to know.

I am trying to prevent the distiller prompting me for the filename. (I understand the checkbox setting)

Do you know how I can programatically set the filename so the dialog box does not show?



John.
I don't have the distiller on this machine right now.  However, the setting is saved somewhere (most likely in the registry).  Have you tried to run RegMon, manually set the distiller options, and find out where in the registry the changes are?  That would be how I would approach it.  You could then write to the registry before printing to the distiller and write it back to the prev value after printing.
Avatar of jturpin

ASKER


Thanks again for the info. I downloaded RegMon, filtered out everything that didn't have Adobe in it.

However, the filename was never read, or written.

do you have any other suggestions?

Thanks again for the help.
Are you trying to always Distill to the same [filename].pdf?  Or are you trying to set the [filename] in your application and then launching the Distiller process with the [filename] input in the application?

I'm not familiar with Quick Reports, but I solved a similar issue I had with the Acrobat Scan function and its launch of scanner dialogs.  

The technique is to write a monitoring function (or application) that, on a timer, uses API functions to retrieve a handle to the Window of the dialog that pops up, then programtically set it to be the Active Window and set focus to the dialog's controls, then Send messages to populate the filename text box and click the Save button.

I also tried setting the Distiller file properties, but the results aren't desireable.  If Quick Reports can be VB scripted, you could use the SendKeys() function to submit answers to the prompts.

jturpin,
I wasn't speaking of looking for where the filename is written as I don't believe the filename will be written to the registry.  I was speaking of where the programmatic setting for "Ask For PDF File Destination" was located in the registry.
Avatar of jturpin

ASKER

I am generating multiple reports based on several datasets. Reports are grouped by worker. I need to be able to write each grouping out to a specific directory ready for the worker to collect.

So just before I call the distiller I would like to set the destination filename so that the dialog box does not need to be manualy updated for each worker.

Thanks,

John.
Unfortunately, I do not know how to do this in QuickReports.  However, you might look at the following:

http://www.llion.net/llpdflibtestimonial.php

I can give you example links for how to do it using VBA, and other languages if this is would help you.
Avatar of jturpin

ASKER


Yes please give me those links.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of twalgrave
twalgrave

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial