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.
Demonstrates Acrobat 9 Bates Numbering features exposed to third-party developers:
Follow these steps to test the functionality of the sample:
Open a PDF document.
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:
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.
This plug-in is Windows only.
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.
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.
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.
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.
This plug-in is updated to show Acrobat 9 dialog replacement.
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.
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.
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.
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.
1. Select "Create PDF with 3D Annotation" from "Advanced-Acrobat SDK".
2. Select the U3D model file when prompted.
3. Choose whether you want to specify a poster for the 3D annotation when prompted.
4. Select the poster PDF file that has the image if you answered "Yes" in step 3.
1. Create a new PDF file with one page.
2. Add a 3D annotation to the page.
3. Create the 3D stream with the input 3D data.
4. Create entries for the 3D stream dictionary.
6. Create optional "VA" entry for the 3D stream.
7. Create optional animation dictionary for the 3D stream.
8. Specify key-value pairs in the annotation dictionary.
9. Create optional activation entry for the 3D annotation.
8. Specify option default initial view entry for the 3D annotation.
9. Create an annotation appearance for the 3D annotation. The code shows two possible ways to create a form XObject for the 3D annotation's appearance. The annotation appearance can come from either a PDF file containing an image or a watermark generated on the fly.
The output PDF file works with Acrobat and Adobe Reader 7.0 or later.
This plug-in does not work in Adobe Reader.
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.
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.
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.
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.
This sample demonstrates how to create a mono-face Brep in using hard-coded values and embed it in a PDF file.
This sample demonstrates how to import STL data to and embed it to .
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.
This sample adds a PDF Binder under the Acrobat SDK submenu. There are two ways to execute it:
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.
Will not work in Adobe Reader.
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.
The replacement file system can be exercised by selecting the Replacement File System menu item on the Acrobat SDK submenu.
The sample only implements the callbacks supported by the default file system.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Stamper annotations can be added to documents by selecting the Stamper tool and dragging a rectangle that defines the desired boundary for the annotation.
Will not work in Adobe Reader.
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.
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.
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.
The sample uses the PDF Consultant framework to locate all of the page content and form XObject streams in the document.
Will not work in Adobe Reader.
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.
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.
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.
Provides a sample on how to integrate a third-party UI framework.
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:
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.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/API_References/Acrobat_API_Reference/Samples/CodeSamples/sample-descriptions.html