PdfDocumentSeparate Method (String, String, String, Boolean, SecureString, SecureString, RepairOptions, PdfPageSavedHandler) |
Separates a single PDF into multiple files: one file per page.
Namespace:
Atalasoft.PdfDoc
Assembly:
Atalasoft.PdfDoc (in Atalasoft.PdfDoc.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax public static void Separate(
string source,
string destFolder,
string fileNameFormat,
bool overwrite,
SecureString userPassword,
SecureString ownerPassword,
RepairOptions repairOptions = null,
PdfPageSavedHandler pageSavedHandler = null
)
Public Shared Sub Separate (
source As String,
destFolder As String,
fileNameFormat As String,
overwrite As Boolean,
userPassword As SecureString,
ownerPassword As SecureString,
Optional repairOptions As RepairOptions = Nothing,
Optional pageSavedHandler As PdfPageSavedHandler = Nothing
)
Parameters
- source
- Type: SystemString
The source file name. - destFolder
- Type: SystemString
The destination folder. - fileNameFormat
- Type: SystemString
The file name format. - overwrite
- Type: SystemBoolean
if set to true [overwrite]. - userPassword
- Type: System.SecuritySecureString
The user password. Set a value to secure the pdf with a password. - ownerPassword
- Type: System.SecuritySecureString
The owner password. Set a value to secure the pdf with a password. - repairOptions (Optional)
- Type: Atalasoft.PdfDoc.RepairRepairOptions
An object that specifies features for handling PDF document repair. This value may be null. - pageSavedHandler (Optional)
- Type: Atalasoft.PdfDocPdfPageSavedHandler
A handler that is called when the single-page document is saved. This value may be null.
Remarks
Separated documents will not contain a portfolio, even if the source document contains a portfolio.
Examples string sourceFile = "Example_02403.pdf";
string destFolder = @"C:\myOutputFolder";
string nameFormat = "{0}.pdf";
bool overwriteExisting = true;
PdfDocument.Separate(sourceFile , destFolder , nameFormat , overwriteExisting );
See Also