Please enable JavaScript to view this site.

Navigation: Developer Information > Using the Windows registry

Win2PDF Plug-In Interface

Scroll Prev Top Next More

Win2PDF supports extending features using a plug-in interface that is enabled through a registry setting. You can write plug-ins to extend the features of Win2PDF by interfacing with external applications such as Outlook, by using the command line interface to perform additional PDF operations (multiple watermarks, flattening, split pages, etc.), or by uploading the PDF to a content management system or cloud service such as Slack, FileStack, or Amazon S3.

 

Plug ins are standard Windows executables that are called by Win2PDF with a single parameter containing the PDF file name. They can be written in any language, and can utilize the Win2PDF command line interface. Sample plug-ins are available in the Win2PDF GitHub samples repository.

 

You can automatically execute a Win2PDF plug-in when the document is created by adding one of the following string registry values in any of the standard registry locations.

 

Setting

Description

Post Action

Executes the plug-in for one document and waits for the plug-in to complete, then deletes the plug-in registry setting

Default Post Action

Always Executes the plug-in and waits for the plug-in to complete

Post Action Nowait

Executes the plug-in for one document without waiting for it to complete, then deletes the plug-in registry setting

Default Post Action Nowait

Always executes the plug-in without waiting for it to complete

Post Action Secure

Executes the plug-in for one document passing the master password as an argument, waits for the plug-in to complete, then deletes the plug-in registry setting

Default Post Action Secure

Always Executes the plug-in passing the master password as an argument and waits for the plug-in to complete

Post Action Secure Nowait

Executes the plug-in for one document passing the master password as an argument without waiting for it to complete, then deletes the plug-in registry setting

Default Post Action Secure Nowait

 

Always executes the plug-in passing the master password as an argument without waiting for it to complete

 

The plug-in must be specified using the full path name, and the document can be passed to the application by using a "%s" in the command line. For example, setting "Default Post Action" to:

 

"C:\Program Files\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe" "%s"

 

would launch Acrobat Reader after the document is created. It is important to enclose the file name with quotation marks since the file may contain spaces.

 

The "Secure" variations of the "Post Action" settings pass a second argument which is the master password used to create the encrypted PDF.  This can be used to modify an encrypted PDF in the plug-in.  If the PDF is not encrypted, the argument is always set to an empty string ("").

 

You can optionally allow users to enable or disable plug-ins by Adding a plug-in configuration to the Win2PDF file save window.