BasicPlugin

Location
Plugins/Samples/BasicPlugin

Description

Provides the minimum code required to enable developers to get started. The code adds a new menu item under the Acrobat SDK menu and displays a simple message. Recall that in the Acrobat viewers, the Acrobat SDK submenu is installed on the Advanced menu; in Adobe Reader it is installed on the Tools menu.

With the basic plug-in framework set up in the sample, users can quickly make a plug-in of their own by modifying and adding the code in the BasicPlugin.cpp file to set up their own menu item and menu function.

BatesNumbering

Location
Plugins/Samples/BatesNumbering

Description

Demonstrates Acrobat 9 Bates Numbering features exposed to third-party developers:

Usage

Follow these steps to test the functionality of the sample:

Open a PDF document.

CapiSamples

Location
Plugins/Samples/CapiSamples

Description

There are two samples in this demonstration. One is SampleCsp. It is a DLL, and it is the actual Cryptographic Service Provider (CSP). The other one is SampleRegistrar that uses the services provided by SampleCsp.

The purpose of SampleCsp is to provide a reference implementation which can be used with Acrobat 6+. The cryptographic functionality of this CSP is all passed through to the Microsoft Enhanced Crypto Provider. This implementation currently works on PFX files. SampleCsp opens the PFX files and uses the credential within them.

SampleRegistrar is a separate application allowing users to manage the certificates bound to SampleCsp. This application interacts with SampleCsp to do the following:

Usage

To be able to run on Microsoft operating systems, a CSP must be digitally signed by Microsoft. A Microsoft signed version of SampleCsp can be located under the MsSignedSampleCsp directory. The test signing utility cspSign.exe can be downloaded from Microsoft website http://www.microsoft.com/downloads/details.aspx?familyid=0F436C75-2304-42BB-B81A-BA0C2C47BAC2&displaylang=en

To manage certificates by SampleRegistrar, follow these steps:

1. Compile SampleRegistrar.

2. Register SampleCsp by doing the following:

3. At Dos prompt, go to the directory where SampleRegistrar.exe resides.

4. Use the following commands to manage certificates:

There are some easy tests you can run to check the CSP is working with Acrobat:

1. Register a digital ID via the CSP. It must show up in the Security Settings under "Windows Digital IDs".

2. Try to make a digital signature with the registered digital ID.

3. Encrypt a file for this certificate and then try to decrypt it. You need to close the document and reopen it.

If all of these tests pass, then the CSP is working. The effect should be to un-register the digital ID, not to actually delete the file.

Note

This plug-in is Windows only.

DdeServer

Location
PluginSupport/Samples/DdeServer

Description

Demonstrates how to establish communication between an external application and an Acrobat plug-in using DDE. This allows a plug-in to expose functionality to external applications that are not present in the standard IAC interfaces.

Usage

A sample client application is provided with the DdeServer plug-in. The application communicates with the plug-in to obtain the page number associated with the active page view and to add a text annotation to the page associated with the active page view. Acrobat must be running for the client application to function correctly.

Note

This plugin will not work in Adobe Reader since it accesses annotations. It is possible to use this technique to communicate with an Adobe Reader plugin.

Windows only.

DMSIntegration

Location
Plugins/Samples/DMSIntegration

Description

Demonstrates how a DMS system can integrate with Acrobat. This sample demonstrates the following three steps needed for DMS systems to integrate with Acrobat:

1. Write an ASFileSys for the DMS system.

2. Replace the Acrobat dialogs using Acrobat 9 APIs.

Note

This plug-in is updated to show Acrobat 9 dialog replacement.

DocSign

Location
Plugins/Samples/DocSign

Description

Demonstrates how to use the PubSec API. It is more a "skeleton" plug-in than a fully functional sample, since it has no encryption library. The plug-in assumes a plug-in author knows how to generate public/private key pairs, store them, use them to encrypt data, etc. This skeleton sample demonstrates how to hook into Acrobat. plug-in does.

This sample was updated in the Acrobat 8 SDK release to demonstrate how to add a custom signature appearance.

Usage

To use DocSign, change the default signature handler in Acrobat Preferences to the DocSign handler. After that, DocSign will be used through the same user interface points as the standard signature handler.

Implementation

This sample does not provide true digital signatures. It provides a skeleton of a PubSec API-based plug-in. Developers must add your own encryption routines.

Embed3DData

Location
PluginSupport/Samples/Embed3DData

Description

Demonstrates how to programmatically create a 3D annotation in a PDF file. For more information about the process, see the chapter titled "Creating 3D Annotations" in the Developing Plug-ins and Applications Guide (plugin_apps_developer_guide.pdf)

The program output is a new PDF file with the 3D annotation.

Usage
Implementation
Note

This plug-in does not work in Adobe Reader.

ExportFromPRC

Location
Plugins/Samples/ExportFromPRC

Description

This sample demonstrates how to extract PRC data stream from a file and save the basic information contained in the model file into an file.

Usage
  1. Open a file that has at least one 3D annotation represented in format.
  2. Select from the menu.
  3. Check for dumped data when informed the data extraction has finished.
Note
ExternalView

Location
PluginSupport/Samples/ExternalWindow/win32/ExternalView

Description

Simple application that exercises the IAC interface exposed by the ExternalWindow plug-in.

The application communicates with the plug-in through Windows Messaging to have the plug-in open a PDF document in the main window of our application.

Note

Windows only.

ExternalWindow

Location
PluginSupport/Samples/ExternalWindow

Description

Demonstrates an approach for displaying an active view of a PDF document in the window of an external application. Select Open PDF in External Window from the Acrobat SDK submenu to run the plug-in.

Usage

A sample client application is provided with the Windows sample that passes a handle to its main window to the plug-in. The plug-in proceeds to display a PDF file in that window.

Note

Windows only.

ImportToPRCBrep

Location
Plugins/Samples/ImportToPRCBrep

Description

This sample demonstrates how to create a mono-face Brep in using hard-coded values and embed it in a PDF file.

Usage
  1. Select from the menu.
  2. Click on the poster to activate the 3D annotation in the generated file.
ImportToPRCTess

Location
Plugins/Samples/ImportToPRCTess

Description

This sample demonstrates how to import STL data to and embed it to .

Usage
  1. Select from the menu.
  2. Select an at the prompt of the dialog.
  3. Click on the poster to activate the 3D annotation in the generated file.
PDFBinder

Location
PluginSupport/Samples/PDFBinder

Description

Shows how to programmatically implement To-PDF file conversion functionality. It converts multiple files into PDF using AVConversionToPDFHandler and binds the PDFs into one PDF file using PDDocInsertPages. It is designed to be executed from a menu; however, it can be run without a graphical user interface, so it can be executed conveniently from other programs using C IAC, Visual Basic IAC, or JavaScript to meet your enterprise workflow needs.

Most of the test files in the project's Testfiles folder are originally from Acrobat 5: Classroom in a Book with the copyright by Adobe Systems Incorporated and all rights are reserved. The files include: Afables1-3.pdf, Afables4.tif, Afables5.jpg, Afables5.jpn, Afables10-11.xml, Afables12-13.htm, Afables14.pdf, Afables15.txt, and Introduc.jpg. The other three files, bitmap1.bmp, bitmap1.jpg, and giffile.gif, were made by the Adobe Acrobat SDK team.

Usage

This sample adds a PDF Binder under the Acrobat SDK submenu. There are two ways to execute it:

When the hardcoded file location is used, you must put the files to be converted in the location before running the plug-in. A set of test files are provided in the project's Testfiles folder. You may store the files in another directory/folder, and specify the location in the code in the string variable PDFBinderFolder. An output file PDFBinderOutput.pdf in the same location is created when the program succeeds. A text log file PDFBinderLog.txt in the same location records the process and results. You can set bEch = false in the code to turn off any display on the screen. This is necessary when you call the menu function from within other programs written in C IAC, Visual Basic IAC, or JavaScript.

Implementation

An optional file filter is used to pre-process the files. The filter allows only the files with predefined types to be processed. You can change the file type list if you like. Using a filter can ensure a smooth automation process, since you can put the file types to be tested in the filter. To turn off the filter, you can set gPDFBinderFileFilter = "" or do not define USE_FILE_FILTER.

Note

Will not work in Adobe Reader.

RplcFileSystem

Location
Plugins/Samples/RplcFileSystem

Description

Demonstrates how to create a custom file system. The sample is basically a wrapper around the default file system. The point is to demonstrate the mechanism for adding a new file system without becoming bogged down with complex implementation considerations.

Usage

The replacement file system can be exercised by selecting the Replacement File System menu item on the Acrobat SDK submenu.

Implementation

The sample only implements the callbacks supported by the default file system.

SelectionServer

Location
PluginSupport/Samples/SelectionServer

Description

Demonstrates how to implement a minimal selection server. The SelectionServer plug-in implements a selection server to handle images. The image selection tool allows users to select images by calling AVDocSetSelection() with a selection type of "Image". The selection server functionality is limited to getting, showing, and losing a selection.

Usage

The plug-in registers an Image Selection tool that allows users to select image XObjects on the page.

Installs the Advanced > Acrobat SDK > Image Selection Tool menuitem and the associated AVToolButton. You can use either to toggle the state of the selection server.

Notes

Will display various messages using the SnippetRunner plug-in HFT in the CommonInterface.air. You must compile and run the SnippetRunner sample and CommonInterface.air prior to running this sample.

Will not work in Adobe Reader.

ShowPermissionsSDK

Location
PluginSupport/Samples/ShowPermissionsSDK

Description

Calls the PDDocPermRequest function to check operation permissions for the active PDF file under the current Acrobat product. The results will be saved to text files. This sample is a plug-in developed with Acrobat 7 SDK, and it can be Reader-enabled.

This plug-in will add a Show Permissions item under the Tools menu. When clicked, it will save the operation permission list to a plain text file and a tab-delimited text file in the location the user selects. The output's file names are the PDF file name plus -permissions.txt or .xls. The tab-delimited file can be opened by Microsoft Excel.

Acrobat products have different versions ( 7.x, 8.x, 9.x ) and variations (Adobe Reader, Acrobat Standard, Acrobat Professional, Approval, Extended Pro and so on), and a PDF may have a certain level of Reader-enabled usage-rights, so this plug-in can provide useful information about the Acrobat functionality, API availabilities and the PDF-permitted operations.

Snippet Runner

Location
PluginSupport/Samples/SnippetRunner

Description

The SnippetRunner plug-in provides infrastructure and utility functions to support execution of Acrobat plug-in code snippets. A snippet is a small complete portion of Acrobat plug-in code.

More than 100 sample code snippets are provided in the SnippetRunner project to demonstrate Acrobat API methods. However, the SnippetRunner plug-in also allows developers to quickly prototype Acrobat API calls without the overhead of writing and verifying a complete plug-in.

While this document includes information on the SnippetRunner environment and use, for more details on writing and loading original snippets, see the SnippetRunner Cookbook document, SnippetRunnerCookbook.pdf, provided in the "Intro to SDK documents" directory.

Usage

Some snippets will require external "files". These can either be sample files for input, or resources (for UI artifacts). Example files are delivered within the directory of the SnippetRunner plug-in.

When starting Common Interface for the first time, the user is prompted for the root of the folder. This persists between application instantiations. Note that for security measure, the root SnippetRunner folder needs to reside in the same partition as the boot partition.

On occasions when there's a PDF document open in a browser prior to explicitly starting up Acrobat, subsequent connection attempts from the Common Interface will be made with the SnippetRunnerServer plug-in associated with the Acrobat browser plug-in process, not the Acrobat process you just started. If for no obvious reason your Common Interface suddenly fails to connect with the SnippetRunnerServer, or changes you made to a snippet are not reflected after rebuilding the plug-in and restarting Acrobat, try to first quit your browser, then restart Acrobat and Common Interface to resolve the issue.

Implementation

Beginning in Acrobat 9 SDK, SnippetRunner interaction is via a common AIR-based graphical user interface for Windows and Mac, replacing the Java-based interface introduced for Acrobat 7.0.5 SDK, PDFL 7.0.5 SDK, and Adobe Reader 7.0 SDK for Linux. The Java-based interface is retained for PDFL and Linux SDKs.

Note that

This Common User Interface acts as a client to its associated SnippetRunner back-end -- the SnippetRunnerServer Acrobat plug-in or SnippetRunner PDF Library application -- and provides Acrobat and PDF Library developers with a common cross-platform GUI. By sending commands to the SnippetRunnerServer back-end and receiving feedback from it, the Common Interface executes snippet commands and provides rich information about snippets, output and document status. It also allows browsing the snippet source code from within the interface.

For details on the new AIR-based SnippetRunner Common interface, please refer to the SnippetRunnerCookbook documentation.

Stamper

Location
PluginSupport/Samples/Stamper

Description

Demonstrates how to implement an AVTool and an annotation handler. It also demonstrates use of the AVUndo API. It is accessed from the Acrobat SDK submenus' Stamper Annotations menu item.

Usage

Stamper annotations can be added to documents by selecting the Stamper tool and dragging a rectangle that defines the desired boundary for the annotation.

Note

Will not work in Adobe Reader.

Starter

Location
PluginSupport/Samples/Starter

Description

A plug-in template that provides a minimal implementation for a plug-in. Developers may use this plug-in as a basis for their own plug-ins.

UncompressPDF

Location
Plugins/Samples/UncompressPDF

Description

A utility that removes all compression from the page content and form XObject streams within a PDF document. The sample illustrates how to implement an AVConversionFromPDFHandler, an object that is used to allow users to save PDF documents in a format other than those supported by Acrobat.

Usage

The functionality of the sample is accessible through a file type filter in the File > Save As dialog box. The filter name is "Uncompressed PDF Files". When any document is saved as that file type, the compression is removed from all of the document's page content and form XObject streams.

Implementation

The sample uses the PDF Consultant framework to locate all of the page content and form XObject streams in the document.

Note

Will not work in Adobe Reader.

WeblinkDemo

Location
PluginSupport/Samples/WeblinkDemo

Description

Demonstrates how to register a new Weblink driver with the Weblink plug-in. This could be used to communicate with a web browser or application that is not included in the standard list, or to send information to the Netscape browser through a different interface than the standard Weblink driver.

Usage

The sample simply highlights the interaction between Acrobat and a Weblink driver. Each callback writes a message to the Common Interface window indicating that it has been called.

Note

This sample requires the CommonInterface.air window in the SnippetRunner plug-in. The SnippetRunner sample must be compiled and running prior to running the WebLinkDemo sample.

wxPlugin

Location
Plugins/Samples/wxPlugin

Description

Provides a sample on how to integrate a third-party UI framework.

Usage

To integrate wxWidgets into your plugin follow the steps for both the platform specific section, and the 'Both' section.

Both platform projects assume there is a NonAdobeSupport directory at the same level as PluginSupport. Inside this would be a wxWidgets/mac/ or wxWidgets/win/ directory containing the sub-directories 'include' and 'libraries', with the include directory having the contents of wxWidgets/include/, and the libraries directory containing the contents of the lib directory, including the lib/wx/ directory.

To create a project using wxWidgets:

WINDOWS:

MAC:

BOTH:

Note

This sample requires the third-party, open-source, cross-platform wxWidgets headers and libraries. The headers and libraries must be downloaded from www.wxwidgets.org prior to creating or compiling a project. This is one open-source, cross-platform UI technology Adobe has tried with Acrobat developer plug-ins. Feel free to investigate alternatives if you would rather not use wxWidgets.