public class HtmlBookmarks extends AbstractTool
arguments, internalFrame, MENU_EXECUTE, MENU_EXECUTE_PRINT, MENU_EXECUTE_PRINT_SILENT, MENU_EXECUTE_SHOW, menuoptions, versionsarray| Constructor and Description |
|---|
HtmlBookmarks()
Constructs an HtmlBookmarks object.
|
| Modifier and Type | Method and Description |
|---|---|
private static void |
addBookmark(java.lang.String pdf,
Section section,
java.util.HashMap<java.lang.String,java.lang.Object> bookmark)
Recursive method to write Bookmark titles to the System.out.
|
private static Section |
createBookmark(java.lang.String pdf,
Section section,
java.util.HashMap<java.lang.String,java.lang.Object> bookmark)
Adds a line with the title and an anchor.
|
protected void |
createFrame()
Creates the internal frame.
|
void |
execute()
Executes the tool (in most cases this generates a PDF file).
|
protected java.io.File |
getDestPathPDF()
Gets the PDF file that should be generated (or null if the output isn't a PDF file).
|
static void |
main(java.lang.String[] args)
Allows you to generate an index file in HTML containing Bookmarks to an existing PDF file.
|
void |
valueHasChanged(AbstractArgument arg)
Indicates that the value of an argument has changed.
|
actionPerformed, addVersion, getArguments, getInternalFrame, getMenubar, getUsage, getValue, setArguments, setInternalFrame, setMainArguments, setMenubarprotected void createFrame()
AbstractToolcreateFrame in class AbstractToolAbstractTool.createFrame()public void execute()
AbstractToolexecute in class AbstractToolAbstractTool.execute()private static void addBookmark(java.lang.String pdf,
Section section,
java.util.HashMap<java.lang.String,java.lang.Object> bookmark)
pdf - the path to the PDF filesection - the section to which the bookmarks should be addedbookmark - a HashMap containing a Bookmark (and possible kids)private static Section createBookmark(java.lang.String pdf, Section section, java.util.HashMap<java.lang.String,java.lang.Object> bookmark)
pdf - the link to the PDF filesection - the section that gets the linebookmark - the bookmark that has the data for the linepublic void valueHasChanged(AbstractArgument arg)
AbstractToolvalueHasChanged in class AbstractToolarg - StringArgumentAbstractTool.valueHasChanged(com.lowagie.toolbox.arguments.AbstractArgument)public static void main(java.lang.String[] args)
args - String[]protected java.io.File getDestPathPDF()
throws java.lang.InstantiationException
AbstractToolgetDestPathPDF in class AbstractTooljava.lang.InstantiationExceptionAbstractTool.getDestPathPDF()