Click or drag to resize

PdfDocumentSeparate Method (String, String, Stream, PdfStreamCreator)

Note: This API is now obsolete.

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
[ObsoleteAttribute("This method is obsolete. Use Separate(Stream source, PdfStreamCreator creator, SecureString userPassword, SecureString ownerPassword) instead.", 
	false)]
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.
Remarks
Separated documents will not contain a portfolio, even if the source document contains a portfolio.
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