VintaSoft Imaging .NET SDK 15.1: Documentation for .NET developer
Vintasoft.Imaging.Pdf Namespace / PdfDocumentRevision Class
Members Object Syntax Remarks Example Hierarchy Requirements SeeAlso
In This Topic
PdfDocumentRevision Class
In This Topic
Contains information about PDF document revision.
Object Model
PdfDocument PdfDocumentRevision
Syntax
'Declaration

Public Class PdfDocumentRevision

public class PdfDocumentRevision

Remarks

PDF document revision is a state of PDF document at the moment when PDF document was signed using digital certificate.

Example

Here is an example that shows how to save all revisions of PDF document to the separate files:


''' <summary>
''' Saves the revisions of PDF document to the separate files.
''' </summary>
''' <param name="filename">The filename of PDF document.</param>
Public Shared Sub SaveRevisions(filename As String)
    ' open PDF document
    Using document As New Vintasoft.Imaging.Pdf.PdfDocument(filename)
        Dim revisionFilename As String = String.Format("{0}\{1}_rev{{0}}.pdf", System.IO.Path.GetDirectoryName(filename), System.IO.Path.GetFileNameWithoutExtension(filename))

        ' if PDF document has revisions
        If document.Revisions IsNot Nothing Then
            ' for each revision
            For Each revision As Vintasoft.Imaging.Pdf.PdfDocumentRevision In document.Revisions
                ' save revision to a file
                revision.CopyRevisionTo(String.Format(revisionFilename, revision.RevisionNumber))
            Next
        End If
    End Using
End Sub


/// <summary>
/// Saves the revisions of PDF document to the separate files.
/// </summary>
/// <param name="filename">The filename of PDF document.</param>
public static void SaveRevisions(string filename)
{
    // open PDF document
    using (Vintasoft.Imaging.Pdf.PdfDocument document = new Vintasoft.Imaging.Pdf.PdfDocument(filename))
    {
        string revisionFilename = string.Format(@"{0}\{1}_rev{{0}}.pdf",
            System.IO.Path.GetDirectoryName(filename),
            System.IO.Path.GetFileNameWithoutExtension(filename));

        // if PDF document has revisions
        if (document.Revisions != null)
        {
            // for each revision
            foreach (Vintasoft.Imaging.Pdf.PdfDocumentRevision revision in document.Revisions)
                // save revision to a file
                revision.CopyRevisionTo(string.Format(revisionFilename, revision.RevisionNumber));
        }
    }
}

Inheritance Hierarchy

System.Object
   Vintasoft.Imaging.Pdf.PdfDocumentRevision

Requirements

Target Platforms: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

See Also