public class ExtractAttachments extends AbstractTool
arguments, internalFrame, MENU_EXECUTE, MENU_EXECUTE_PRINT, MENU_EXECUTE_PRINT_SILENT, MENU_EXECUTE_SHOW, menuoptions, versionsarray| Constructor and Description |
|---|
ExtractAttachments()
Constructs a ExtractAttachements object.
|
| Modifier and Type | Method and Description |
|---|---|
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)
Extract the attachments of a PDF.
|
static void |
unpackFile(PdfReader reader,
PdfDictionary filespec,
java.lang.String outPath)
Unpacks a file attachment.
|
void |
valueHasChanged(AbstractArgument arg)
Indicates that the value of an argument has changed.
|
actionPerformed, addVersion, getArguments, getInternalFrame, getMenubar, getUsage, getValue, setArguments, setInternalFrame, setMainArguments, setMenubarpublic ExtractAttachments()
protected void createFrame()
AbstractToolcreateFrame in class AbstractToolAbstractTool.createFrame()public void execute()
AbstractToolexecute in class AbstractToolAbstractTool.execute()public 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()public static void unpackFile(PdfReader reader, PdfDictionary filespec, java.lang.String outPath) throws java.io.IOException
reader - The object that reads the PDF documentfilespec - The dictionary containing the file specificationsoutPath - The path where the attachment has to be writtenjava.io.IOException