Click or drag to resize

PdfDocumentSeparate Method (String, String, Stream, PdfStreamCreator)

Separates a single PDF into multiple files: one file per page.

Namespace:  Atalasoft.PdfDoc
Assembly:  Atalasoft.PdfDoc (in Atalasoft.PdfDoc.dll) Version: 11.0.0.0.0.297 (.NET 4.5.2, x86)
Syntax
public static void Separate(
	string userPassword,
	string ownerPassword,
	Stream source,
	PdfStreamCreator creator
)

Parameters

userPassword
Type: SystemString
The user password. Set a value to secure the pdf with a password.
ownerPassword
Type: SystemString
The owner password. Set a value to secure the pdf with a password.
source
Type: System.IOStream
The source stream.
creator
Type: Atalasoft.PdfDocPdfStreamCreator
The creator.
Examples
string userPass = "";
string ownerPass = "";
Stream originalPdfStream = ... a stream containing your original PDF ...

public Stream creator(Stream st, int page) 
{ 
    FileStream fs = File.Create(@"C:\Sample Images\devPage" + page.ToString() + ".pdf"); 
    return fs; 
}

PdfDocument.Separate(userPass ,ownerPass, originalPdfStream , creator);
See Also