PDF Snake Scripting Tutorial

 

PDF Snake home

scripting reference

table of contents

Adding a Menu Item

The file format for the menu file is very simple. You can find the menu.txt file in the PDFSnake subdirectory where you installed PDF Snake. Just append a few lines as shown, and then restart Acrobat.

PDFSna&ke
	*&Make a Booklet...:booklet.py
	*&Nup...:Nup.py
	*&Free Rotate...:freeRotate.py
	*&Scale...:scale.py
	*Stam&p...:stamp.py
	*&Watermark...:watermark.py
	-
	&Register...:register.py
	Report a &Bug:Support.pdf
	&About PDFSnake:About.py
	
- M&y Scripts &Data Mailer Demo:d:\pdfer\wwwroot\tutorial\datamailer6.py

Let's look at the lines we have added:

	
-

This adds a separator to the menu.

	
M&y Scripts

This line adds a new submenu to the PDFSnake menu. The ampersand before the y means that the letter y will be the menu shortcut.

		
&Data Mailer Demo:d:\pdfer\wwwroot\tutorial\datamailer6.py

This adds the menu item which calls our demo file. Notice how it is indented further then it's parent menu, My Scripts. The path to the script file must be a full path name. A colon (:) separates the title of the menu item from its script.

The End