Class PdfAttachmentRelationship
Specifies the file relationship of attachment.
Inheritance
System.Object
PdfAttachmentRelationship
Namespace: Syncfusion.Pdf
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public sealed class PdfAttachmentRelationship : Enum
Examples
//Creates a new PDF document.
PdfDocument doc = new PdfDocument(PdfConformanceLevel.Pdf_A3B);
//Add a page.
PdfPage page = doc.Pages.Add();
//Set the ZugferdProfile.
doc.ZugferdConformanceLevel = ZugferdConformanceLevel.Basic;
//Create the PdfTrueTypeFont
PdfFont font = new PdfTrueTypeFont(new Font("arial", 12f, FontStyle.Regular), true);
page.Graphics.DrawString("Hello World", font, PdfBrushes.Black, PointF.Empty);
//Creates an attachment
PdfAttachment attachment = new PdfAttachment("ZUGFeRD-invoice.xml");
//Set the file relationship
attachment.Relationship = PdfAttachmentRelationship.Alternative;
attachment.ModificationDate = DateTime.Now;
attachment.Description = "About Syncfusion";
attachment.MimeType = "application/xml";
//add attachment to the doucment
doc.Attachments.Add(attachment);
doc.Save("output.pdf");
'Creates a new PDF document.
Dim doc As New PdfDocument(PdfConformanceLevel.Pdf_A3B)
'Add a page.
Dim page As PdfPage = doc.Pages.Add()
'Set the ZugferdProfile.
doc.ZugferdConformanceLevel = ZugferdConformanceLevel.Basic
'Create the PdfTrueTypeFont
Dim font As PdfFont = New PdfTrueTypeFont(New Font("arial", 12F, FontStyle.Regular), True)
page.Graphics.DrawString("Hello World", font, PdfBrushes.Black, PointF.Empty)
'Creates an attachment
Dim attachment As New PdfAttachment("ZUGFeRD-invoice.xml")
'Set the file relationship
attachment.Relationship = PdfAttachmentRelationship.Alternative
attachment.ModificationDate = DateTime.Now
attachment.Description = "About Syncfusion"
attachment.MimeType = "application/xml"
'add attachment to the doucment
doc.Attachments.Add(attachment)
doc.Save("output.pdf")
Fields
Alternative
Alternative representation of the PDF contents
Declaration
public const PdfAttachmentRelationship Alternative
Field Value
Type |
---|
PdfAttachmentRelationship |
Data
Represents information used to derive a visual presentation
Declaration
public const PdfAttachmentRelationship Data
Field Value
Type |
---|
PdfAttachmentRelationship |
Source
The original source material for the associated content
Declaration
public const PdfAttachmentRelationship Source
Field Value
Type |
---|
PdfAttachmentRelationship |
Supplement
supplemental representation of the original source or data that may be more easily consumable
Declaration
public const PdfAttachmentRelationship Supplement
Field Value
Type |
---|
PdfAttachmentRelationship |
Unspecified
Relationship is not known or cannot be described using one of the other values
Declaration
public const PdfAttachmentRelationship Unspecified
Field Value
Type |
---|
PdfAttachmentRelationship |