VintaSoft Twain .NET SDK 15.4: Руководство для .NET разработчика
Vintasoft.Sane.ImageEncoders Namespace / SanePdfDocumentInfo Class
Класс SanePdfDocumentInfo
В этом разделе
Класс, содержащий информацию о PDF документе.
Объектная модель
SanePdfDocumentInfo
Синтаксис
'Declaration

Public NotInheritable Class SanePdfDocumentInfo

public sealed class SanePdfDocumentInfo

Ремарки

Вы можете указать всю информацию о PDF документе или указать только необходимую информацию. Например, вы можете установить значение свойства ModificationDate, если вы хотите обновить только дату изменения.

Пример


Private Sub SaveLastSaneAcquiredImageToPdf(acquiredImage1 As Vintasoft.Sane.SaneAcquiredImage, productName As String)
    ' set settings of PDF encoder
    Dim pdfEncoderSettings As New Vintasoft.Sane.ImageEncoders.SanePdfEncoderSettings()
    pdfEncoderSettings.PdfDocumentInfo.Author = "VintaSoft LLC"
    pdfEncoderSettings.PdfDocumentInfo.Title = String.Format("Documents acquired from {0}", productName)
    pdfEncoderSettings.PdfDocumentInfo.Creator = "VintaSoft Twain .NET SDK"
    pdfEncoderSettings.PdfDocumentInfo.CreationDate = System.DateTime.Now

    ' save image to PDF document
    acquiredImage1.Save("c:\test.pdf", pdfEncoderSettings)
End Sub


private void SaveLastSaneAcquiredImageToPdf(Vintasoft.Sane.SaneAcquiredImage acquiredImage1, string productName)
{
    // set settings of PDF encoder
    Vintasoft.Sane.ImageEncoders.SanePdfEncoderSettings pdfEncoderSettings =
        new Vintasoft.Sane.ImageEncoders.SanePdfEncoderSettings();
    pdfEncoderSettings.PdfDocumentInfo.Author = "VintaSoft LLC";
    pdfEncoderSettings.PdfDocumentInfo.Title = string.Format("Documents acquired from {0}", productName);
    pdfEncoderSettings.PdfDocumentInfo.Creator = "VintaSoft Twain .NET SDK";
    pdfEncoderSettings.PdfDocumentInfo.CreationDate = System.DateTime.Now;

    // save image to PDF document
    acquiredImage1.Save(@"d:\test.pdf", pdfEncoderSettings);
}

Иерархия наследования

System.Object
   Vintasoft.Sane.ImageEncoders.SanePdfDocumentInfo

Требования

Целевые платформы: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6

Смотрите также