Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.faceless.pdf2
Class AnnotationFile

    java.lang.Object
      org.faceless.pdf2.PDFAnnotation
          org.faceless.pdf2.AnnotationFile

All Implemented Interfaces:
  Cloneable

    public final class AnnotationFile

extends PDFAnnotation

A subtype new `PDFAnnotation` that allows files to be attached to the PDF. File attachments do not work in the free Acrobat Reader - they require the full version of Acrobat. Currently the "encrypt separately" option added in Acrobat 7 is not supported, although if the document is encrypted the attachment will be encrypted with it.

Note in revisions prior to 2.6 this class dealt with the file internally. In 2.6 the EmbeddedFile handling was moved to a separate class, `EmbeddedFile`, which now handles all the details of the actual file.

Since:
  2.4.4

Constructor Summary
`AnnotationFile()` Create a new File annotation.

Method Summary
`EmbeddedFile` | `getFile()` Return the file embedded in this annotation
`void` | `rebuild()`
`void` | `setFile(EmbeddedFile file)` Set the contents of this annotation to the specified embedded file.
`void` | `setType(String type, Color color)` Set the type of attachment - the physical appearance on the page.
`String` | `toString()`

Methods inherited from class org.faceless.pdf2.PDFAnnotation
`addPropertyChangeListener, addReview, flatten, getAuthor, getColor, getContents, getCreationDate, getInReplyTo, getMetaData, getModifyDate, getOpacity, getPage, getPopup, getRectangle, getReplies, getReviews, getSubject, getType, getUniqueID, hasAppearanceState, isContentLocked, isPositionLocked, isPrintable, isReadOnly, isVisible, removePropertyChangeListener, setAuthor, setColor, setContents, setCreationDate, setInReplyTo, setLocked, setMetaData, setModifyDate, setOpacity, setPage, setPrintable, setReadOnly, setRectangle, setSubject, setUniqueID, setVisible`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AnnotationFile

    public AnnotationFile()

  Create a new File annotation. To actually set the attachment, the `setFile()` method must be called.

Method Detail

### setType

    public void setType(String type,
                        Color color)

  Set the type of attachment - the physical appearance on the page. The type must be one of the four pre-defined types (PushPin, Graph, Paperclip or Tag) or an `IllegalArgumentException` will be thrown.

  Parameters:
    `type` - the type of attachment - one of the four values listed above.
    `color` - the color of the attachment

### setFile

    public void setFile(EmbeddedFile file)

  Set the contents of this annotation to the specified embedded file.

  Parameters:
    `file` - the EmbeddedFile object to attach
  Since:
    2.6

### getFile

    public EmbeddedFile getFile()

  Return the file embedded in this annotation

  Since:
    2.6

### rebuild

    public void rebuild()

### toString

    public String toString()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Big Faceless Organization