Class AttachedFile

Class AttachedFile

이름 공간 : Aspose.Note 모임: Aspose.Note.dll (25.4.0)

첨부된 파일을 나타냅니다.

public class AttachedFile : Node, IPageChildNode, IOutlineElementChildNode, ITaggable, INode
   {
      private string _path;
      public string Path
      {
         get { return this._path; }
         set { this._path = value; }
      }
   }

Inheritance

object Node AttachedFile

Implements

IPageChildNode , IOutlineElementChildNode , ITaggable , INode

상속 회원들

Node.Accept(DocumentVisitor) , Node.Document , Node.IsComposite , Node.NodeType , Node.ParentNode , Node.PreviousSibling , Node.NextSibling , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

첨부 파일의 콘텐츠를 얻는 방법을 보여줍니다.

string dataDir = RunExamples.GetDataDir_Attachments();
   Document oneFile = new Document(dataDir + "Sample1.one");
   IList<attachedfile> nodes = oneFile.GetChildNodes<attachedfile>();
   foreach (AttachedFile file in nodes)
   {
       using (Stream outputStream = new MemoryStream(file.Bytes))
       {
           using (System.IO.FileStream fileStream = System.IO.File.OpenWrite(String.Format(dataDir + file.FileName)))
           {
               CopyStream(outputStream, fileStream);
           }
       }
   }

파일 패드를 사용하여 문서에 파일을 추가하는 방법을 보여줍니다.

string dataDir = RunExamples.GetDataDir_Attachments();
   Document doc = new Document();
   Aspose.Note.Page page = new Aspose.Note.Page(doc);
   Outline outline = new Outline(doc);
   OutlineElement outlineElem = new OutlineElement(doc);
   AttachedFile attachedFile = new AttachedFile(doc, dataDir + "attachment.txt");
   outlineElem.AppendChildLast(attachedFile);
   outline.AppendChildLast(outlineElem);
   page.AppendChildLast(outline);
   doc.AppendChildLast(page);
   dataDir += "AttachFileByPath_out.one";
   doc.Save(dataDir);

흐름에서 파일을 문서에 추가하는 방법을 보여줍니다.

string dataDir = RunExamples.GetDataDir_Attachments();
   Document doc = new Document();
   Aspose.Note.Page page = new Aspose.Note.Page(doc);
   Outline outline = new Outline(doc);
   OutlineElement outlineElem = new OutlineElement(doc);
   using (var stream = File.OpenRead(dataDir + "icon.jpg"))
   {
       AttachedFile attachedFile = new AttachedFile(doc, dataDir + "attachment.txt", stream, ImageFormat.Jpeg);
       outlineElem.AppendChildLast(attachedFile);
   }
   outline.AppendChildLast(outlineElem);
   page.AppendChildLast(outline);
   doc.AppendChildLast(page);
   dataDir += "AttachFileAndSetIcon_out.one";
   doc.Save(dataDir);

Constructors

스트링 ( String )

Aspose.Note.AttachedFile 클래스의 새로운 예를 시작합니다.

public AttachedFile(string path)
   {
   }

Parameters

path string

Aspose.Note.AttachedFile을 만들 수 있는 파일로 가는 경로를 포함하는 라인입니다.

AttachedFile( 스트링, 스트림, 이미지 형식)

Aspose.Note.AttachedFile 클래스의 새로운 예를 시작합니다.

public AttachedFile(string path, Stream icon, ImageFormat iconFormat)
   {
   }

Parameters

path string

Aspose.Note.AttachedFile을 만들 수 있는 파일로 가는 경로를 포함하는 라인입니다.

icon Stream

첨부된 파일에 대한 아이콘입니다.

iconFormat ImageFormat

첨부 파일 아이콘의 형식입니다.

액세서리(String, Stream)

Aspose.Note.AttachedFile 클래스의 새로운 예를 시작합니다.

public AttachedFile(string fileName, Stream attachedFileStream)
   {
   }

Parameters

fileName string

첨부된 파일의 이름입니다.

attachedFileStream Stream

첨부된 파일 바이트를 포함하는 스트림.

AttachedFile( 스트리밍, 스트림, 흐름, 이미지 형식)

Aspose.Note.AttachedFile 클래스의 새로운 예를 시작합니다.

public AttachedFile(
       string fileName,
       Stream attachedFileStream,
       Stream icon,
       ImageFormat iconFormat)
   {
   }

Parameters

fileName string

첨부된 파일의 이름입니다.

attachedFileStream Stream

첨부된 파일 바이트를 포함하는 스트림.

icon Stream

첨부된 파일에 대한 아이콘입니다.

iconFormat ImageFormat

첨부 파일 아이콘의 형식입니다.

첨부 파일( )

Aspose.Note.AttachedFile 클래스의 새로운 예를 시작합니다.

public AttachedFile()
   {
   }

Properties

Alignment

그것을 얻거나 조정합니다.

public HorizontalAlignment Alignment
   {
      get;
      set;
   }

부동산 가치

HorizontalAlignment

AlternativeTextDescription

첨부 파일의 아이콘에 대체 텍스트를 얻거나 설정합니다.

public string AlternativeTextDescription
   {
      get;
      set;
   }

부동산 가치

string

AlternativeTextTitle

첨부 파일의 아이콘에 대체 텍스트의 제목을 얻거나 설정합니다.

public string AlternativeTextTitle
   {
      get;
      set;
   }

부동산 가치

string

Bytes

삽입 된 파일에 대한 바이너리 데이터를 얻습니다.

public byte[] Bytes
   {
      get;
   }

부동산 가치

byte [ ] [ [ ]

Examples

첨부 파일의 콘텐츠를 얻는 방법을 보여줍니다.

string dataDir = RunExamples.GetDataDir_Attachments();
   Document oneFile = new Document(dataDir + "Sample1.one");
   IList<attachedfile> nodes = oneFile.GetChildNodes<attachedfile>();
   foreach (AttachedFile file in nodes)
   {
       using (Stream outputStream = new MemoryStream(file.Bytes))
       {
           using (System.IO.FileStream fileStream = System.IO.File.OpenWrite(String.Format(dataDir + file.FileName)))
           {
               CopyStream(outputStream, fileStream);
           }
       }
   }

Extension

삽입 된 파일의 확장을 얻습니다.

public string Extension
   {
      get;
   }

부동산 가치

string

FileName

삽입된 파일의 이름을 얻습니다.

public string FileName
   {
      get;
   }

부동산 가치

string

FilePath

원본 파일으로 가는 길을 찾습니다.

public string FilePath
   {
      get;
   }

부동산 가치

string

Height

삽입된 파일 아이콘의 원래 높이를 얻습니다.

public float Height
   {
      get;
   }

부동산 가치

float

HorizontalOffset

수평 혜택을 받거나 설정합니다.

public float HorizontalOffset
   {
      get;
      set;
   }

부동산 가치

float

Icon

삽입 된 파일과 관련된 아이콘에 대한 바이너리 데이터를 얻습니다.

public byte[] Icon
   {
      get;
   }

부동산 가치

byte [ ] [ [ ]

IconExtension

아이콘의 확장을 얻습니다.

public string IconExtension
   {
      get;
   }

부동산 가치

string

IsPrintout

파일의 표시가 인쇄되었는지 여부를 나타내는 값을 얻거나 설정합니다.

public bool IsPrintout
   {
      get;
      set;
   }

부동산 가치

bool

IsSizeSetByUser

이 아이콘의 크기의 값이 사용자가 명시적으로 업데이트되었는지 여부를 나타내는 가치를 얻거나 설정합니다.

public bool IsSizeSetByUser
   {
      get;
      set;
   }

부동산 가치

bool

LastModifiedTime

마지막으로 변경된 시간을 얻거나 설정합니다.

public DateTime LastModifiedTime
   {
      get;
      set;
   }

부동산 가치

DateTime

MaxHeight

삽입된 파일 아이콘을 표시하기 위해 최대 높이를 얻거나 설정합니다.

public float MaxHeight
   {
      get;
      set;
   }

부동산 가치

float

MaxWidth

삽입된 파일 아이콘을 표시하기 위해 최대 폭을 얻거나 설정합니다.

public float MaxWidth
   {
      get;
      set;
   }

부동산 가치

float

ParsingErrorInfo

파일에 액세스하는 동안 발생한 오류에 대한 데이터를 얻습니다.

public ParsingErrorInfo ParsingErrorInfo
   {
      get;
   }

부동산 가치

ParsingErrorInfo

Tags

한 단락의 모든 태그 목록을 얻습니다.

public List<ITag> Tags { get; }

부동산 가치

List &lt에 대한 정보 ITag >

Text

삽입된 파일의 텍스트 표현을 얻거나 설정합니다.줄에는 10 (선화) 또는 13 (충전 반환) 값의 문자가 포함되어서는 안됩니다.

public string Text
   {
      get { return this._text; }
      set { this._text = value; }
   }
   private string _text;

부동산 가치

string

VerticalOffset

수직 혜택을 받거나 수직 혜택을 받는다.

public float VerticalOffset
   {
      get;
      set;
   }

부동산 가치

float

Width

삽입된 파일 아이콘의 원래 폭을 얻습니다.

public float Width
   {
      get;
   }

부동산 가치

float

Methods

서류 방문자 (DocumentVisitor)

노드의 방문자를 받아들인다.

public override void Accept(DocumentVisitor visitor)
   {
   }

Parameters

visitor DocumentVisitor

클래스의 개체는 Aspose.Note.DocumentVisitor에서 유래합니다.

 한국어