Class AttachedFile

Class AttachedFile

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

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

public class AttachedFile : Node, IPageChildNode, IOutlineElementChildNode, ITaggable, INode

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

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

// The path to the documents directory.
                                                        string dataDir = RunExamples.GetDataDir_Attachments();

                                                        // Load the document into Aspose.Note.
                                                        Document oneFile = new Document(dataDir + "Sample1.one");

                                                        // Get a list of attached file nodes
                                                        IList<attachedfile> nodes = oneFile.GetChildNodes<attachedfile>();

                                                        // Iterate through all nodes
                                                        foreach (AttachedFile file in nodes)
                                                        {
                                                            // Load attached file to a stream object
                                                            using (Stream outputStream = new MemoryStream(file.Bytes))
                                                            {
                                                                // Create a local file
                                                                using (Stream fileStream = System.IO.File.OpenWrite(String.Format(dataDir + file.FileName)))
                                                                {
                                                                    // Copy file stream
                                                                    CopyStream(outputStream, fileStream);
                                                                }
                                                            }
                                                        }</attachedfile></attachedfile>

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

// The path to the documents directory.
                                                                   string dataDir = RunExamples.GetDataDir_Attachments();

                                                                   // Create an object of the Document class
                                                                   Document doc = new Document();

                                                                   // Initialize Page class object
                                                                   Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                                                   // Initialize Outline class object
                                                                   Outline outline = new Outline(doc);

                                                                   // Initialize OutlineElement class object
                                                                   OutlineElement outlineElem = new OutlineElement(doc);

                                                                   // Initialize AttachedFile class object
                                                                   AttachedFile attachedFile = new AttachedFile(doc,  dataDir + "attachment.txt");

                                                                   // Add attached file
                                                                   outlineElem.AppendChildLast(attachedFile);

                                                                   // Add outline element node
                                                                   outline.AppendChildLast(outlineElem);

                                                                   // Add outline node
                                                                   page.AppendChildLast(outline);

                                                                   // Add page node
                                                                   doc.AppendChildLast(page);

                                                                   dataDir = dataDir + "AttachFileByPath_out.one";
                                                                   doc.Save(dataDir);

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

// The path to the documents directory.
                                                               string dataDir = RunExamples.GetDataDir_Attachments();

                                                               // Create an object of the Document class
                                                               Document doc = new Document();

                                                               // Initialize Page class object
                                                               Aspose.Note.Page page = new Aspose.Note.Page(doc);

                                                               // Initialize Outline class object
                                                               Outline outline = new Outline(doc);

                                                               // Initialize OutlineElement class object
                                                               OutlineElement outlineElem = new OutlineElement(doc);

                                                               using (var stream = File.OpenRead(dataDir + "icon.jpg"))
                                                               {
                                                                   // Initialize AttachedFile class object and also pass its icon path
                                                                   AttachedFile attachedFile = new AttachedFile(doc, dataDir + "attachment.txt", stream, ImageFormat.Jpeg);

                                                                   // Add attached file
                                                                   outlineElem.AppendChildLast(attachedFile);
                                                               }

                                                               // Add outline element node
                                                               outline.AppendChildLast(outlineElem);

                                                               // Add outline node
                                                               page.AppendChildLast(outline);

                                                               // Add page node
                                                               doc.AppendChildLast(page);

                                                               dataDir = dataDir + "AttachFileAndSetIcon_out.one";
                                                               doc.Save(dataDir);

Constructors

AttachedFile(스트리트)

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

public AttachedFile(string path)

Parameters

path string

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

AttachedFile(링크, 스트림, ImageFormat)

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

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

Parameters

path string

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

icon Stream

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

iconFormat ImageFormat

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

AttachedFile(스트리밍, 스트리밍)

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

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

AttachedFile()

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

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

// The path to the documents directory.
                                                        string dataDir = RunExamples.GetDataDir_Attachments();

                                                        // Load the document into Aspose.Note.
                                                        Document oneFile = new Document(dataDir + "Sample1.one");

                                                        // Get a list of attached file nodes
                                                        IList<attachedfile> nodes = oneFile.GetChildNodes<attachedfile>();

                                                        // Iterate through all nodes
                                                        foreach (AttachedFile file in nodes)
                                                        {
                                                            // Load attached file to a stream object
                                                            using (Stream outputStream = new MemoryStream(file.Bytes))
                                                            {
                                                                // Create a local file
                                                                using (Stream fileStream = System.IO.File.OpenWrite(String.Format(dataDir + file.FileName)))
                                                                {
                                                                    // Copy file stream
                                                                    CopyStream(outputStream, fileStream);
                                                                }
                                                            }
                                                        }</attachedfile></attachedfile>

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; set; }

부동산 가치

string

VerticalOffset

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

public float VerticalOffset { get; set; }

부동산 가치

float

Width

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

public float Width { get; }

부동산 가치

float

Methods

Accept(DocumentVisitor)

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

public override void Accept(DocumentVisitor visitor)

Parameters

visitor DocumentVisitor

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

 한국어