Skip to main content

PdfDocumentProcessor.SaveDocument(String) Method

Saves the current document to the specified file path.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Docs.v23.2.dll

NuGet Package: DevExpress.Document.Processor

Declaration

public void SaveDocument(
    string path
)

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 PdfDocumentProcessor removes existing signatures from a document when it is saved. However, if you use PdfDocumentProcessor to apply a signature, it is retained.

The code sample below rotates document pages and saves the result:

View Example

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");
        }
     }
  }
}

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.

See Also