# Tuesday, October 16, 2007
« CPTec Layer Plugin für Acrobat | Main | Live Search Maps v2 »

(Deutsche Version)

In my article Acrobat PDF Form Felder auf Ebenen I have explained the problem in detail: I want to create layers in a PDF file and put Form Fields or Annotations into these layers or Optional Content Groups (OCG).

Back then, I solved the problem by means of Acrobat SDK Snippet Runner. An architecture that enables you to run individual Snippets as a plug-in in Acrobat. Quite nice for a first try, but in the end not a solution that should be distributed. Developery only.

For this reason, I took a closer look at the SDK and built a proper plug-in:

Acrobat CPTec Layer Plugin Menu

The plug-in links into the Advanced menu of Acrobat and is only active when a document is loaded. When called, it asks for a text file. This file determines which annotations are put into which layers. Layers that are not present will be created.

The structure of the text file is very simple. Each line contains the name of an annotation, the | character, and then the name of the related layer:

TestAnnotation1|TestLayer1
TestAnnotation2|TestLayer2

When editing in Acrobat, it is possible that the layer information for the Annotations gets lost. In this case, simply run the same text file again. Assigning fields that are already present does not have any negative effect.

Disclaimer:

  • I am not much of a C++ programmer.
  • This is my first Adobe Acrobat plug-in.
  • The plug-in has only been tested with Acrobat 8.1 Professional.
  • I do not assume responsibility for anything: If Acrobat crashes or all PDF files are destroyed, it is not my fault.
  • Use at your own risk.
  • Please pay attention to the MIT/X11 License in the Zip file.

Have fun with the plug-in, and maybe you want to send me a feedback:

CPTecLayerPlugin.zip (180 KB)

Wednesday, December 05, 2007 3:56:31 AM (W. Europe Standard Time, UTC+01:00)
Sorry! I do not quite understand it, you can say some more detail?
Comments are closed.