public class Attachment extends Paragraph
Represents an attachment Paragraph
in a Pdf document. Attachment
can be file attachment. stream attachment or note annotation.
[C#] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.Sections.Add(); Attachment fileAttachment = new Attachment(); sec1.Paragraphs.Add(fileAttachment); fileAttachment.AttachmentType = AttachmentType.File; fileAttachment.AttachedFileName = "c:/images/ccitt.tif"; fileAttachment.AttachedFileType = "tif"; fileAttachment.FileIconType = FileIconType.Graph; fileAttachment.IconColor = new Aspose.Pdf.Generator.Color("Brown"); Attachment noteAttachment = new Attachment(); sec1.Paragraphs.Add(noteAttachment); noteAttachment.AttachmentType = AttachmentType.Note; noteAttachment.NoteContent = "This is a note."; noteAttachment.NoteHeading = "this is a heading"; noteAttachment.IsNoteOpen = true; pdf1.Save("test.pdf"); [Visual Basic] Dim pdf1 As Pdf = New Pdf() Dim sec1 As Section = pdf1.Sections.Add() Dim fileAttachment As Attachment = New Attachment() sec1.Paragraphs.Add(fileAttachment) fileAttachment.AttachmentType = AttachmentType.File fileAttachment.AttachedFileName = "c:/images/ccitt.tif" fileAttachment.AttachedFileType = "tif" fileAttachment.FileIconType = FileIconType.Graph fileAttachment.IconColor = New Aspose.Pdf.Generator.Color("Brown") Dim noteAttachment As Attachment = New Attachment() sec1.Paragraphs.Add(noteAttachment) noteAttachment.AttachmentType = AttachmentType.Note noteAttachment.NoteContent = "This is a note." noteAttachment.NoteHeading = "this is a heading" noteAttachment.IsNoteOpen = True pdf1.Save("test.pdf") [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section> <Attachment AttachmentType="File" AttachedFileName="c:/images/flower.jpg" AttachedFileType="jpeg" FileIconType="Graph" IconColor="Brown"> </Attachment> <Attachment AttachmentType="Note" IsNoteOpen="true" NoteContent="This is a note."> </Attachment> </Section> </Pdf>
Paragraph.VerticalPositionInfo
absolutePosX, absolutePosY, ClippingArea, FixedHeight, FixedWidth, isAbsoluteLayout, isFixedLayout, IsNeedAddToPage, IsPositionGot, IsPositionProcessed, isRelativeLayout, MayNeedReprocess, NextParagraph, posBottom, posLeft, posRight, posTop, RefPara, relativePosX, relativePosY, VerticalPosInfo
Constructor and Description |
---|
Attachment()
Initializes a new instance of the
Attachment class. |
Modifier and Type | Method and Description |
---|---|
Object |
completeClone()
Clones a new
Attachment object. |
String |
getAttachedFileName()
Gets or sets a string that indicates the attach file name.
|
String |
getAttachedFileType()
Gets or sets a string that indicates the MIME type of the attached
file.
|
InputStream |
getAttachedStream() |
com.aspose.ms.System.IO.Stream |
getAttachedStreamInternal() |
int |
getAttachmentType()
Gets or sets a
AttachmentType that indicates the attachment
type. |
int |
getFileIconType()
Gets or sets a
FileIconType that indicates the file
attachment icon type. |
Color |
getIconColor()
Represents a
Color object that indicates the color of the
icon. |
String |
getNoteContent()
Gets or sets a string that indicates the content of the attached
note.
|
String |
getNoteHeading()
Gets or sets a string that indicates the heading (title) of the
attached note.
|
int |
getNoteIconType()
Gets or sets a
NoteIconType that indicates the note icon
type. |
RectangleArea |
getNoteWindowPosition()
Gets or sets a
RectangleArea object that indicates the
position of the note's popup window. |
int |
getNoteWindowPositioningType()
Gets or sets a
NoteWindowPositioningType object that
indicates the note window's positioning type. |
TextInfo |
getTextInfo()
Gets or sets a
TextInfo that indicates the attachment text
info. |
boolean |
isNoteOpen()
Gets or sets a bool value that indicates whether the note is open or
not when the Pdf document is opened.
|
void |
isNoteOpen(boolean value) |
void |
setAttachedFileName(String value) |
void |
setAttachedFileType(String value) |
void |
setAttachedStream(InputStream value) |
void |
setAttachedStreamInternal(com.aspose.ms.System.IO.Stream value) |
void |
setAttachmentType(int value) |
void |
setAutoPlay(boolean value) |
void |
setFileIconType(int value) |
void |
setIconColor(Color value) |
void |
setLoop(boolean value) |
void |
setNoteContent(String value) |
void |
setNoteHeading(String value) |
void |
setNoteIconType(int value) |
void |
setNoteWindowPosition(RectangleArea value) |
void |
setNoteWindowPositioningType(int value) |
void |
setTextInfo(TextInfo value) |
copyTo, getBookmarked, getComposer, getFootNoteProcessed, getHeight, getID, getLeft, getMargin, getNeedReprocess, getNextParagraphInHeading, getPageNumber, getParentCell, getPositioningType, getPosX, getPosY, getRealPageNumber, getReferencedParagraphWidth, getReferenceParagraphID, getRefPageNumber, getSection, getTop, getWidth, isDisabled, isDisabled, isEndNote, isFirstParagraph, isFirstParagraph, isFirstParagraphInColumn, isFirstParagraphInColumn, isFootNote, isFootNote, isInHeaderFooter, isInHeaderFooter, isInList, isInList, isKeptTogether, isKeptTogether, isKeptWithNext, isKeptWithNext, isOnOddPage, isOnOddPage, setBookmarked, setFootNoteProcessed, setHeight, setID, setLeft, setMargin, setNeedReprocess, setNextParagraphInHeading, setPageNumber, setParentCell, setParentIsTable, setPositioningType, setPosX, setPosY, setRealPageNumber, setReferencedParagraphWidth, setReferenceParagraphID, setRefPageNumber, setSection, setTop, setWidth
public Attachment()
Initializes a new instance of the Attachment
class.
public TextInfo getTextInfo()
Gets or sets a TextInfo
that indicates the attachment text
info.
public void setTextInfo(TextInfo value)
public int getAttachmentType()
Gets or sets a AttachmentType
that indicates the attachment
type.
public void setAttachmentType(int value)
public String getAttachedFileName()
Gets or sets a string that indicates the attach file name.
public void setAttachedFileName(String value)
public com.aspose.ms.System.IO.Stream getAttachedStreamInternal()
public InputStream getAttachedStream()
public void setAttachedStreamInternal(com.aspose.ms.System.IO.Stream value)
public void setAttachedStream(InputStream value)
public String getAttachedFileType()
Gets or sets a string that indicates the MIME type of the attached file.
public void setAttachedFileType(String value)
public int getFileIconType()
Gets or sets a FileIconType
that indicates the file
attachment icon type.
public void setFileIconType(int value)
public int getNoteWindowPositioningType()
Gets or sets a NoteWindowPositioningType
object that
indicates the note window's positioning type. Default is Auto.
public void setNoteWindowPositioningType(int value)
public RectangleArea getNoteWindowPosition()
Gets or sets a RectangleArea
object that indicates the
position of the note's popup window.
public void setNoteWindowPosition(RectangleArea value)
public String getNoteContent()
Gets or sets a string that indicates the content of the attached note.
public void setNoteContent(String value)
public String getNoteHeading()
Gets or sets a string that indicates the heading (title) of the attached note.
public void setNoteHeading(String value)
public int getNoteIconType()
Gets or sets a NoteIconType
that indicates the note icon
type.
public void setNoteIconType(int value)
public boolean isNoteOpen()
Gets or sets a bool value that indicates whether the note is open or not when the Pdf document is opened.
public void isNoteOpen(boolean value)
public Color getIconColor()
Represents a Color
object that indicates the color of the
icon.
public void setIconColor(Color value)
public void setAutoPlay(boolean value)
public void setLoop(boolean value)
public Object completeClone()
Clones a new Attachment
object.
completeClone
in class Paragraph
Copyright © 2016 Aspose. All Rights Reserved.