Package com.lowagie.toolbox.plugins
Class HtmlBookmarks
- java.lang.Object
-
- com.lowagie.toolbox.AbstractTool
-
- com.lowagie.toolbox.plugins.HtmlBookmarks
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.util.EventListener
public class HtmlBookmarks extends AbstractTool
Allows you to generate an index file in HTML containing Bookmarks to an existing PDF file.- Since:
- 2.1.1 (imported from itexttoolbox project)
-
-
Field Summary
-
Fields inherited from class com.lowagie.toolbox.AbstractTool
arguments, internalFrame, MENU_EXECUTE, MENU_EXECUTE_PRINT, MENU_EXECUTE_PRINT_SILENT, MENU_EXECUTE_SHOW, menuoptions, versionsarray
-
-
Constructor Summary
Constructors Constructor Description HtmlBookmarks()
Constructs an HtmlBookmarks object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static void
addBookmark(java.lang.String pdf, Section section, java.util.Map<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.Map<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.-
Methods inherited from class com.lowagie.toolbox.AbstractTool
actionPerformed, addVersion, getArguments, getInternalFrame, getMenubar, getUsage, getValue, setArguments, setInternalFrame, setMainArguments, setMenubar
-
-
-
-
Method Detail
-
addBookmark
private static void addBookmark(java.lang.String pdf, Section section, java.util.Map<java.lang.String,java.lang.Object> bookmark)
Recursive method to write Bookmark titles to the System.out.- Parameters:
pdf
- the path to the PDF filesection
- the section to which the bookmarks should be addedbookmark
- a Map containing a Bookmark (and possible kids)
-
createBookmark
private static Section createBookmark(java.lang.String pdf, Section section, java.util.Map<java.lang.String,java.lang.Object> bookmark)
Adds a line with the title and an anchor.- Parameters:
pdf
- the link to the PDF filesection
- the section that gets the linebookmark
- the bookmark that has the data for the line- Returns:
- a subsection of section
-
main
public static void main(java.lang.String[] args)
Allows you to generate an index file in HTML containing Bookmarks to an existing PDF file.- Parameters:
args
- String[]
-
createFrame
protected void createFrame()
Description copied from class:AbstractTool
Creates the internal frame.- Specified by:
createFrame
in classAbstractTool
- See Also:
AbstractTool.createFrame()
-
execute
public void execute()
Description copied from class:AbstractTool
Executes the tool (in most cases this generates a PDF file).- Specified by:
execute
in classAbstractTool
- See Also:
AbstractTool.execute()
-
valueHasChanged
public void valueHasChanged(AbstractArgument arg)
Description copied from class:AbstractTool
Indicates that the value of an argument has changed.- Specified by:
valueHasChanged
in classAbstractTool
- Parameters:
arg
- StringArgument- See Also:
AbstractTool.valueHasChanged(com.lowagie.toolbox.arguments.AbstractArgument)
-
getDestPathPDF
protected java.io.File getDestPathPDF() throws java.lang.InstantiationException
Description copied from class:AbstractTool
Gets the PDF file that should be generated (or null if the output isn't a PDF file).- Specified by:
getDestPathPDF
in classAbstractTool
- Returns:
- File
- Throws:
java.lang.InstantiationException
- on error- See Also:
AbstractTool.getDestPathPDF()
-
-