Gets or sets the name of the file associated with this PDFPageRange. It can be null.
public string FileName { get; set; }
public String getFileName();
public void setFileName(
java.lang.String string
);
FileName (PDFPageRange)
A System.String that contains the optional name of the source file that contains the pages to merge using PDFFile.MergeFiles.
If FileName is null, the source file is indicated by PDFFile.FileName instead. Also, if FileName is null, PDFPageRange.Password is ignored and PDFFile.Password is used instead.
using Leadtools.WinForms;
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Controls;
using Leadtools.Drawing;
using Leadtools.ImageProcessing;
using Leadtools.Pdf;
using Leadtools.Svg;
public void MergeFiles()
{
// This example will extract two pages from the current file and one page from another (encrypted) file into a single output file.
// All the pages in the output file will be unencrypted.
string srcFile = Path.Combine(LEAD_VARS.ImagesDir, "leadtools.pdf");
string dstFile = Path.Combine(LEAD_VARS.ImagesDir, "leadtools 4-5 1.pdf");
PDFFile pdfFile = new PDFFile(srcFile);
PDFPageRange[] srcPages = new PDFPageRange[2];
srcPages[0].FirstPageNumber = 4;
srcPages[0].LastPageNumber = 5;
/* Leave srcPages[0] set to null, so pages 4 and 5 are extracted from leadtools.pdf */
srcPages[1].FileName = Path.Combine(LEAD_VARS.ImagesDir, "Encrypted.pdf"); // Encrypted.pdf file must exist. If none exists, provide one.
srcPages[1].Password = "LEAD";
srcPages[1].FirstPageNumber = 1;
srcPages[1].LastPageNumber = 1;
pdfFile.MergeFiles(srcPages, dstFile);
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";
}
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