com.lowagie.toolbox.plugins

Class ExtractAttachments

public class ExtractAttachments extends AbstractTool

This tool lets you extract the attachments of a PDF.

Since: 2.1.1 (imported from itexttoolbox project)

Constructor Summary
ExtractAttachments()
Constructs a ExtractAttachements object.
Method Summary
protected voidcreateFrame()
voidexecute()
protected FilegetDestPathPDF()
static voidmain(String[] args)
Extract the attachments of a PDF.
static voidunpackFile(PdfReader reader, PdfDictionary filespec, String outPath)
Unpacks a file attachment.
voidvalueHasChanged(AbstractArgument arg)

Constructor Detail

ExtractAttachments

public ExtractAttachments()
Constructs a ExtractAttachements object.

Method Detail

createFrame

protected void createFrame()

See Also: createFrame

execute

public void execute()

See Also: execute

getDestPathPDF

protected File getDestPathPDF()

Returns: File

Throws: InstantiationException

See Also: getDestPathPDF

main

public static void main(String[] args)
Extract the attachments of a PDF.

Parameters: args String[]

unpackFile

public static void unpackFile(PdfReader reader, PdfDictionary filespec, String outPath)
Unpacks a file attachment.

Parameters: reader The object that reads the PDF document filespec The dictionary containing the file specifications outPath The path where the attachment has to be written

Throws: IOException

valueHasChanged

public void valueHasChanged(AbstractArgument arg)

Parameters: arg StringArgument

See Also: valueHasChanged