Class AttachedFile

Class AttachedFile

İsim alanı : Aspose.Note Toplama: Aspose.Note.dll (25.4.0)

Bir eklenen dosyayı temsil eder.

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

Inheritance

object Node AttachedFile

Implements

IPageChildNode , IOutlineElementChildNode , ITaggable , INode

mirasçı üyeleri

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

Bir eklenen dosyadan içeriği nasıl elde edeceğini gösterir.

// 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>

Dosya yolu kullanarak bir belgeye bir dosya nasıl eklendiğini gösterir.

// 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);

Bir dosyayı bir akımdan bir belgeye nasıl ekleyeceğinizi gösterir.

// 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(Sırt)

Aspose.Note.AttachedFile sınıfının yeni bir örneğini başlatır.

public AttachedFile(string path)

Parameters

path string

Aspose.Note.AttachedFile oluşturmak için hangi dosyaya giden yolu içeren bir çubuk.

AttachedFile(String, Stream ve ImageFormat)

Aspose.Note.AttachedFile sınıfının yeni bir örneğini başlatır.

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

Parameters

path string

Aspose.Note.AttachedFile oluşturmak için hangi dosyaya giden yolu içeren bir çubuk.

icon Stream

eklenen dosya için bir simge.

iconFormat ImageFormat

Eklenen dosya simgesinin bir biçimi.

AttachedFile(akış, akış)

Aspose.Note.AttachedFile sınıfının yeni bir örneğini başlatır.

public AttachedFile(string fileName, Stream attachedFileStream)

Parameters

fileName string

eklenen dosyanın adıdır.

attachedFileStream Stream

Bağlantılı dosya baytlarını içeren bir akım.

AttachedFile(String, Stream, Akış ve Görüntüleme)

Aspose.Note.AttachedFile sınıfının yeni bir örneğini başlatır.

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

Parameters

fileName string

eklenen dosyanın adıdır.

attachedFileStream Stream

Bağlantılı dosya baytlarını içeren bir akım.

icon Stream

eklenen dosya için bir simge.

iconFormat ImageFormat

Eklenen dosya simgesinin bir biçimi.

AttachedFile()

Aspose.Note.AttachedFile sınıfının yeni bir örneğini başlatır.

public AttachedFile()

Properties

Alignment

Birleştirme veya düzeltme yapılır.

public HorizontalAlignment Alignment { get; set; }

Mülkiyet Değer

HorizontalAlignment

AlternativeTextDescription

Bir vücudu eklenen dosya simgesine alternatif bir metin alır veya ayarlar.

public string AlternativeTextDescription { get; set; }

Mülkiyet Değer

string

AlternativeTextTitle

Bağlantılı dosya simgesine alternatif bir metin başlığı alır veya ayarlar.

public string AlternativeTextTitle { get; set; }

Mülkiyet Değer

string

Bytes

Bir yerleşik dosya için ikili verileri alır.

public byte[] Bytes { get; }

Mülkiyet Değer

byte […]

Examples

Bir eklenen dosyadan içeriği nasıl elde edeceğini gösterir.

// 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

Yerleşik bir dosyanın uzantısını alır.

public string Extension { get; }

Mülkiyet Değer

string

FileName

Yerleşik dosyanın adını alır.

public string FileName { get; }

Mülkiyet Değer

string

FilePath

Orijinal dosyaya doğru ilerliyor.

public string FilePath { get; }

Mülkiyet Değer

string

Height

Yerleşik dosya simgesinin orijinal yüksekliğini alır.

public float Height { get; }

Mülkiyet Değer

float

HorizontalOffset

Orjinal ödemeyi alır veya ayarlar.

public float HorizontalOffset { get; set; }

Mülkiyet Değer

float

Icon

Yerleşik dosyaya bağlı olan simge için ikili verileri alır.

public byte[] Icon { get; }

Mülkiyet Değer

byte […]

IconExtension

Ikonun uzantısını alır.

public string IconExtension { get; }

Mülkiyet Değer

string

IsPrintout

Dosya görüntüsünün basılı olup olmadığını gösteren bir değer alır veya ayarlar.

public bool IsPrintout { get; set; }

Mülkiyet Değer

bool

IsSizeSetByUser

Kullanıcı tarafından simge boyutunun değerinin açıkça güncellenmiş olup olmadığını gösteren bir değer alır veya ayarlar.

public bool IsSizeSetByUser { get; set; }

Mülkiyet Değer

bool

LastModifiedTime

Son değiştirilmiş zaman alır veya ayarlar.

public DateTime LastModifiedTime { get; set; }

Mülkiyet Değer

DateTime

MaxHeight

Entegre dosya simgesini görüntülemek için maksimum yüksekliği alır veya ayarlar.

public float MaxHeight { get; set; }

Mülkiyet Değer

float

MaxWidth

Entegre dosya simgesini görüntülemek için maksimum genişliği alır veya ayarlar.

public float MaxWidth { get; set; }

Mülkiyet Değer

float

ParsingErrorInfo

Dosyaya erişirken meydana gelen hata ile ilgili verileri alır.

public ParsingErrorInfo ParsingErrorInfo { get; }

Mülkiyet Değer

ParsingErrorInfo

Tags

Bir paragrafın tüm etiketlerinin listesini alır.

public List<itag> Tags { get; }

Mülkiyet Değer

List &lt için; ITag >

Text

Belirlenmiş dosyanın metin görüntüsünü alır veya ayarlar. satır 10 (line feed) veya 13 (carriage return) değerinin herhangi bir karakterini içermemelidir.

public string Text { get; set; }

Mülkiyet Değer

string

VerticalOffset

Vertikal ödemeyi alır veya ayarlar.

public float VerticalOffset { get; set; }

Mülkiyet Değer

float

Width

Yerleşik dosya simgesinin orijinal genişliğini alır.

public float Width { get; }

Mülkiyet Değer

float

Methods

Accept(DocumentVisitor)

Ziyaretçi düğümünü kabul eder.

public override void Accept(DocumentVisitor visitor)

Parameters

visitor DocumentVisitor

Bir sınıfın nesnesi Aspose.Note.DocumentVisitor’dan kaynaklanmaktadır.

 Türkçe