Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PdfFileAttachment.Description Property

Specifies the description for the attached file shown in the Attachments panel of a PDF Viewer.

Namespace: DevExpress.Pdf

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

NuGet Package: DevExpress.Pdf.Core

#Declaration

public string Description { get; set; }

#Property Value

Type Description
String

A string that is an attached file description.

#Remarks

Use the Description property to specify a description for the attached file, which helps to differentiate between similar files in the Attachments panel of the PDF Viewer.

#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