TX Text Control .NET for Windows Forms

GetFromFile Method

Method|Introduced in 33.0
Namespace
TXTextControl.DocumentServer.PDF
Package
TXTextControl.TextControl.WinForms.SDK as TXDocumentServer.dll from the private NuGet feed or Text Control Offline Packages

Description

Returns an array of EmbeddedFile objects that represent all embedded files in the specified PDF document.

Syntax

public static EmbeddedFile[] GetFromFile(string fileName);

Parameters

ParameterDescription
fileName

The complete file path of the PDF document.

Return Value

Returns an array of EmbeddedFile objects.

Examples

The following example retrieves from file from the attachments.

TXTextControl.DocumentServer.PDF.EmbeddedFile[] results = TXTextControl.DocumentServer.PDF.Attachments.GetFromFile("document.docx");
foreach (TXTextControl.DocumentServer.PDF.EmbeddedFile embeddedFile in results)
{
    Console.WriteLine(embeddedFile);
}