Prompting can be turned off programmatically by modifying the
Windows registry. This method applies to the creatiion of only one
PDF document by a specific application for the current user. To do
this, entries are added under the Windows Registry key:
HKEY_CURRENT_USER\Software\Adobe\Adobe Distiller\PrinterJobControl
This key takes as subkeys:
(Default)
application
The (Default) entry is reserved for possible future use and should not
be used. The application subkey is the full path of the application
that is to have prompting turned off. The value of the application
subkey is a REG_SZ value that is the full path of the output file. For
example, the following registry script would turn off prompting for
the next printing perform by wordpad.exe, printing to the file
c:\MyPDFoutputFileName.pdf:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Adobe\Acrobat Distiller\PrinterJobControl]
"C:\Program Files\Windows NT\Accessories\wordpad.exe" =
"c:\MyPDFoutputFileName.pdf"
Note: though the programming language may require that your
backslashes are escaped (for example, "c:\\MyPDFoutputFileName.pdf"),
the value of the registry entry must end up with just a single slash
as shown above. The key, once established, remains until used and is
removed once the Windows API function StartDoc (HDC hdc, CONST
DOCINFO* lpdi) has successfully completed. Also note that the output
folder path must already exist with read and write access for the
current user and the destination file must not exist."