Registry Overview

Top  Previous  Next

Win2PDF looks for registry values at the following locations and in the following order:

 

"HKEY_CURRENT_USER\Software\VB and VBA Program Settings\Dane Prairie Systems\Win2PDF"

"HKEY_CURRENT_USER\Software\Dane Prairie Systems\Win2PDF" and

"HKEY_LOCAL_MACHINE\Software\Dane Prairie Systems\Win2PDF"

 

The first registry location is used for the Visual Basic "SaveSetting" function.  From Visual Basic, you can call SaveSetting with the following parameters to control Win2PDF:

 

SaveSetting "Dane Prairie Systems", "Win2PDF", Value Name, Value

 

Where "ValueName" and "Value" will depend on the Win2PDF setting to control.  The SaveSetting command only works with Win2PDF registry settings that use a string type.

 

The HKEY_CURRENT_USER registry location is useful if you want the setting to apply only to the current user.  This is especially important when using Win2PDF in a multi-user environment such as Windows Terminal Services.

 

The HKEY_LOCAL_MACHINE location is useful if you want the setting to apply to all users, or if your application is only going to be used with a single user.

 

After the document is created, the registry value will be deleted by Win2PDF.  If you would like the setting to apply to all documents without having to add the registry value for each document, you can create a non-zero registry value named "persistent" to one of the locations listed above.  This will prevent Win2PDF from deleting the value after each document.

 

The following Win2PDF settings can be controlled from the registry:

 

Value Name

Type

Description

PDFFileName

String

Controls the output file name  Is automatically deleted after each document.

PDFDefaultFileName

String

Controls the output file name.  Is not automatically deleted after each document.

PDFPostFileName

String

Same as PDFFileName, but is deleted after the document has been created

persistent

Dword

Prevents registry values from being deleted when it is set to a non-zero value

PDFTitle

String

Sets the document title

PDFAuthor

String

Sets the document author

PDFSubject

String

Sets the document subject

PDFKeywords

String

Sets the document keywords

file options

Dword

Enables encryption, e-mail, view, and print PDF options

disabled options

Dword

Disables options from the file save dialog

Post Action

String

Automatically executes the application specified after PDF creation.

user password

String

Sets the user password (Win2PDF Pro)

master password

String

Sets the master password (Win2PDF Pro)

PDFMailRecipients

String

Sets the email "To:"recipient addresses when the "Send PDF" option is enabled

PDFMailCCRecipients

String

Sets the email "CC:" recipient addresses when the "Send PDF" option is enabled

PDFMailBCCRecipients

String

Sets the email "BCC:" recipient addresses when the "Send PDF" option is enabled

PDFMailSubject

String

Sets the email subject when the "Send PDF" option is enabled

PDFMailNote

String

Sets the email body text when the "Send PDF" option is enabled

PDFMailHTML

String

Sets the email body HTML text when the "Send PDF" option is enabled

PDFMailResolveNames

String

Verifies email addresses using the default address book

PDFWatermarkFile

String

Sets the watermark PDF file

PDFDefaultWatermarkFile

String

Sets the default watermark PDF file for all users.

PDFExcludeWatermarkPre

Dword

Prevents the watermark from being applied to the first number of pages of a document.

PDFExcludeWatermarkPost

Dword

Prevents the watermark from being applied to the last number of pages of a document.

PDFPrintToName

String

Sets a specific printer instead of the Windows default printer with "print file" file_options are set.

PDFDefaultPrintToName

String

Sets a default specific printer instead of the Windows default printer with "print file" file_options are set.

PDFDocumentScaling

Dword

Sets a document scaling percent (1-999).  100 indicates no scaling.

auto merge interval

Dword

Time in milliseconds between documents for auto-merge feature.  Set to 0 to disable auto-merge.

disable autoname keyboard check

Dword

Disables the shift key checking when the auto-name feature is enabled.

formats

Dword

Controls which save formats are displayed in the Win2PDF file save window.

post action checkbox label

Dword

Adds an option to the Win2PDF file save window to selectively execute "post action".

 

If you create the any of the string registry values as a REG_EXPAND_SZ instead of a REG_SZ type, the value will be expanded from environment variables.  The environment variables are specified with "%" characters at the beginning and end of the variables as in "%HOMEPATH%".  The REG_EXPAND_SZ option is not available from the Visual Basic SaveSetting command.  The %DATE% and %TIME% environment variables are not expanded by this option.

 

The registry methods are not safe when used with programs that have multiple threads or multiple processes that access Win2PDF.  For these types of programs, you need to ensure that only one thread or process has access to Win2PDF at a time by using a Windows critical section or mutex.  The Windows printer interfaces do not have these limitations.

 

When multiple instances of Win2PDF are installed, Win2PDF first looks in the registry locations based on the instance name of Win2PDF.  This allows separate settings for different instance of Win2PDF.  For example, if the current instance of Win2PDF is named "Win2PDF (Copy 1)" the following registry locations would be checked before the standard registry locations:

 

"HKEY_CURRENT_USER\Software\VB and VBA Program Settings\Dane Prairie Systems\Win2PDF (Copy 1)"

"HKEY_CURRENT_USER\Software\Dane Prairie Systems\Win2PDF (Copy 1)" and

"HKEY_LOCAL_MACHINE\Software\Dane Prairie Systems\Win2PDF (Copy 1)"

 

If a setting doesn't exist under the instance name section of the registry, then Win2PDF checks the standard locations.