PdfDocumentProcessor.SaveDocument(String) Method
Saves the current document to the specified file path.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Docs.v24.2.dll
NuGet Package: DevExpress.Document.Processor
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
path | String | A String value, specifying the location of the saved document. |
#Remarks
The PDF Document API component locks a file while a document is saved (since the SaveDocument method uses the detachStream parameter set to false). To unlock the file, call another overloaded SaveDocument method with the detachStream parameter enabled.
Important
The Pdf
The code sample below rotates document pages and saves the result:
using DevExpress.Pdf;
namespace PdfPageRotationExample
{
class Program
{
static void Main(string[] args)
{
using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor())
{
pdfDocumentProcessor.LoadDocument("..\\..\\docs\\TextRotate.pdf");
int angle = 0;
foreach (PdfPage page in pdfDocumentProcessor.Document.Pages) {
angle = (angle + 90) % 360;
page.Rotate = angle;
}
pdfDocumentProcessor.SaveDocument("..\\..\\docs\\Rotated.pdf");
}
}
}
}
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the SaveDocument(String) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.