Ptah: HTML map generator written in Java/Swing Ptah

Presentation Demo Download Documentation



Ptah is a simple HTML map generator.

Maps are a useful function of HTML adopted since the HTML 3.2 recommendation.

A MAP is the containing element of a grouping of shape-link identification pairs (AREA elements) used to identify image map linking destinations with geometric regions on an image.

Here is an example of map:

<img src="pola.jpg" usemap="#pola" title="Screenshot of Polaris A client" />

<map name="pola">

<area shape="rect" coords="20,276,217,392" href="../polaris/pol-pola.html#toc2" alt="Login control" target="_blank" />

<area shape="rect" coords="243,277,741,457" href="../polaris/pol-pola.html#toc7" alt="ShoppingBasket control" target="_blank" />

<area shape="rect" coords="16,484,202,506" href="../polaris/pol-pola.html#toc4" alt="Commit control" target="_blank" />


If you code your pages by hand the problem is to determine the coordinates of an area.

Many tools include a mapping facility. You can also find sharewares like MapEdit ($25).

For Cuckoo we needed a map generator generating XHTML because we post-process the documents with XSL We chose to release Ptah in Open Source (GPL license) because we believe that the best tool is the tool that you can adapt to your needs because you have its source.

Ptah is free.


Ptah is written in Java Swing (Swing). We tested it with an early (1999) version of JDK 1.2 and with JDK 1.3. The binary version you can find here has been compiled with jdk1.3.1_03.

Ptah is a minimalist tool. It generates the XHTML code in a TextArea. You can change the text, for instance to set URLs or alternate text. Then it copies the text in the clipboard. Next you can paste wherever you want, for instance in a Cuckooed Word document.

Ptah 0.0.1 only generates rectangular coordinates. It has no configuration and it writes no file.


To start Ptah, assuming that the JDK binaries are on your path, just enter:

java -classpath ptah.jar Ptah.Ptah

You should get this:

Click on the Select image menu. You are displayed a FileChooser where you select the file.

Then you are displayed this:

Image area. Press and release a mouse button to select an area TextArea. You can modify the text File name

Press a mouse button on one corner and release the mouse button on the opposite corner. A yellow rectangle is displayed (thinner than on the screen shot). Then select File | Add area. The corresponding area is added in the bottom TextArea. Repeat the process for each other area. Then select File | End Map to write the ending </map>. Next select File | Copy to clipboard and paste the map area in your application.


  • You can also select the TextArea text (Ctrl-A) and copy into the clipboard (Ctrl-C) at any time.

  • This page has been processed by Ptah and then the generated map has been pasted in a Word/Cuckoo document. When you move slowly you mouse on the picture you should see that the mouseover text changes.

Use with Cuckoo

Before pasting the clipboard into the Word document, set the style of the current line to Ditto.


You can use the Word version of this document as an example.


The Ptah documentation includes:
2001-2004 Alexis Grandemange. Last modified .