com.lowagie.toolbox.plugins
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(String pdf,
Section section,
HashMap<String,Object> bookmark)
Recursive method to write Bookmark titles to the System.out.
|
private static Section |
createBookmark(String pdf,
Section section,
HashMap<String,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 File |
getDestPathPDF()
Gets the PDF file that should be generated (or null if the output isn't a PDF file).
|
static void |
main(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, setMenubar
protected void createFrame()
AbstractTool
createFrame
in class AbstractTool
AbstractTool.createFrame()
public void execute()
AbstractTool
execute
in class AbstractTool
AbstractTool.execute()
private static void addBookmark(String pdf, Section section, HashMap<String,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(String pdf, Section section, HashMap<String,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)
AbstractTool
valueHasChanged
in class AbstractTool
arg
- StringArgumentAbstractTool.valueHasChanged(com.lowagie.toolbox.arguments.AbstractArgument)
public static void main(String[] args)
args
- String[]protected File getDestPathPDF() throws InstantiationException
AbstractTool
getDestPathPDF
in class AbstractTool
InstantiationException
AbstractTool.getDestPathPDF()