Search Results for

    Show / Hide Table of Contents

    FlexCelPdfExport.AttachFile Method

    Overloads

    • FlexCelPdfExport.AttachFile(String, String, String, TPdfAttachmentKind)
    • FlexCelPdfExport.AttachFile(String, String, String, DateTime, TPdfAttachmentKind, TPdfAttachmentDataProviderDelegate)

    FlexCelPdfExport.AttachFile(String, String, String, TPdfAttachmentKind)

    Attachs a file to the pdf file. You can attach files at any time while creating the pdf, but the file will be read only when you call EndExport. The files that are in the list at the moment of calling EndExport are the ones that will be saved, and they contents of the files will be read then.

    You can remove all the attachments in the file by calling ClearAttachments.

    Syntax

    Namespace: FlexCel.Render

    public void AttachFile(String fileName, String mimeType, String description, TPdfAttachmentKind attachmentKind)

    Parameters

    <-> Parameter Type Description
    fileName String Name on disk of the file to attach. This will also be the name of the file in the pdf. If you want to specify a different name in the pdf than the name on disk, use AttachFile(String, String, String, DateTime, TPdfAttachmentKind, TPdfAttachmentDataProviderDelegate)
    mimeType String Mime type of the file being attached.
    You can use StandardMimeType for predefined types.
    Note that while this might be null or Empty for standard pdf files, for PDF/A3 mime type is required.
    If you don't know the mime type, you must specify StandardMimeType.OctectStream.
    description String Description of the file that the pdf reader will show in the attachment pane.
    While not required by PDF/A-3, it is recommended to provide a description for the file.
    attachmentKind TPdfAttachmentKind How the attachment relates to the pdf file. This is required by PDF/A-3.

    See also

    • FlexCelPdfExport

    FlexCelPdfExport.AttachFile(String, String, String, DateTime, TPdfAttachmentKind, TPdfAttachmentDataProviderDelegate)

    Attachs a file to the pdf file. You can attach files at any time while creating the pdf, but the file will be read only when you call EndExport. The files that are in the list at the moment of calling EndExport are the ones that will be saved, and they contents of the files will be read then.

    You can remove all the attachments in the file by calling ClearAttachments.

    Syntax

    Namespace: FlexCel.Render

    public void AttachFile(String fileName, String mimeType, String description, DateTime modificationTimeLocalTimeZone, TPdfAttachmentKind attachmentKind, TPdfAttachmentDataProviderDelegate dataProvider)

    Parameters

    <-> Parameter Type Description
    fileName String Name that will be used for the file in the pdf.
    mimeType String Mime type of the file being attached.
    You can use StandardMimeType for predefined types.
    Note that while this might be null or Empty for standard pdf files, for PDF/A3 mime type is required.
    If you don't know the mime type, you must specify StandardMimeType.OctectStream.
    description String Description of the file that the pdf reader will show in the attachment pane.
    While not required by PDF/A-3, it is recommended to provide a description for the file.
    modificationTimeLocalTimeZone DateTime Modification date of the attachment file in the local time zone.
    Use DateTime.MinValue to not write a modification date for the file.
    attachmentKind TPdfAttachmentKind How the attachment relates to the pdf file. This is required by PDF/A-3.
    dataProvider TPdfAttachment​Data​Provider​Delegate This can be a delegate or lambda expression that will load the data for the file when actually embedding it. This action will be called at the moment of embedding and must provide the data for the file.

    See also

    • FlexCelPdfExport
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com