Skip to main content

PdfFileAttachment.CreationDate Property

Gets or sets date when the file attachment was created in the document.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v23.2.Core.dll

NuGet Package: DevExpress.Pdf.Core

Declaration

public DateTimeOffset? CreationDate { get; set; }

Property Value

Type Description
Nullable<DateTimeOffset>

A nullable DateTimeOffset structure that is a valid date-time offset.

Example

View Example

using DevExpress.Pdf;
using System;
using System.IO;

using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
{
    // Load a document.
    processor.LoadDocument("..\\..\\Document.pdf");

    // Attach a file to the PDF document. 
    processor.AttachFile(new PdfFileAttachment() {
        CreationDate = DateTime.Now,
        Description = "This is my attach file.",
        FileName = "MyAttach.txt",
        Data = File.ReadAllBytes("..\\..\\FileToAttach.txt")
    });

    // The attached document.
    processor.SaveDocument("..\\..\\Result.pdf");
}
See Also