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

付属ファイルアイコンのフォーマット。

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

付属ファイルアイコンのフォーマット。

関連記事( )

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

1段落のすべてのタグのリストを取得します。

public List<ITag> Tags { get; }

不動産価値

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

受け入れ(ドキュメント訪問者)

ノードの訪問者を受け入れる。

public override void Accept(DocumentVisitor visitor)
   {
   }

Parameters

visitor DocumentVisitor

クラスのオブジェクトは Aspose.Note.DocumentVisitor から引き出されます。

 日本語