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 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)
Extract the attachments of a PDF.
|
static void |
unpackFile(PdfReader reader,
PdfDictionary filespec,
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(String[] args)
args - String[]protected File getDestPathPDF() throws InstantiationException
AbstractToolgetDestPathPDF in class AbstractToolInstantiationExceptionAbstractTool.getDestPathPDF()public static void unpackFile(PdfReader reader, PdfDictionary filespec, String outPath) throws IOException
reader - The object that reads the PDF documentfilespec - The dictionary containing the file specificationsoutPath - The path where the attachment has to be writtenIOExceptionCopyright © 2015. All rights reserved.