*/
public void execute() {
try {
if (getValue("srcfile") == null) throw new InstantiationException("You need to choose a sourcefile");
File src = (File)getValue("srcfile");
PdfReader reader;
if (getValue("ownerpassword") == null) {
reader = new PdfReader(src.getAbsolutePath());
}
else {
reader = new PdfReader(src.getAbsolutePath(), ((String)getValue("ownerpassword")).getBytes());
}
File directory = src.getParentFile();
String name = src.getName();
name = name.substring(0, name.lastIndexOf('.'));
File html = new File(directory, name + "_index.html");
LwgDocument document = new LwgDocument();
HtmlWriter.getInstance(document, new FileOutputStream(html));
Object css = getValue("css");
if (css != null) {
document.add(new Header(HtmlTags.STYLESHEET, css.toString()));
}
Object title = reader.getInfo().get("Title");
if (title == null)
document.addTitle("Index for " + src.getName());
else
document.addKeywords("Index for '" + title + "'");
Object keywords = reader.getInfo().get("Keywords");
if (keywords != null)
document.addKeywords((String)keywords);
Object description = reader.getInfo().get("Subject");
if (keywords != null)
document.addSubject((String)description);
document.open();
Paragraph t;
if (title == null)