Extracts an embedded file (attachment) from a PDF document file and saves it to disk.
public static void ExtractEmbeddedFile(
string fileName,
string password,
int fileNumber,
string outputFileName
)
public static void extractEmbeddedFile(
java.lang.String string,
java.lang.String string2,
int intValue,
java.lang.String string3
);
fileName
Name of the owner PDF document file.
password
The password to use when loading this PDF file (if the file is encrypted); otherwise, use null.
fileNumber
Embedded file number. This value must be between 1 and the total number of embedded files in the owner PDF document.
outputFileName
Name of the file that will contain the embedded file binary data.
ExtractEmbeddedFile is used to extract one embedded file (attachment) from a PDF document.
The attachment to extract is identified using the fileNumber variable which must be a value between 1 (for the embedded file) and the total number of attachments in the file (for the last embedded file).
Use GetEmbeddedFileCount to quickly get the number of embedded files in a PDF document.
To find more information regarding the embedded files before extracting them (such as the file name and size), the application can perform the following:
For an example refer to GetEmbeddedFileCount or PDFDocument.EmbeddedFiles.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document