Class PdfPortfolioSchemaField
The class represents the creation of schema filed
Inheritance
System.Object
PdfPortfolioSchemaField
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.Pdf
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfPortfolioSchemaField : IPdfWrapper
Examples
//Create a new instance of PdfDocument class.
PdfDocument document = new PdfDocument();
//Create new portfolio.
document.PortfolioInformation = new PdfPortfolioInformation();
//Set the view mode of the portfolio.
document.PortfolioInformation.ViewMode = PdfPortfolioViewMode.Details;
//Create portfolio schema.
PdfPortfolioSchema schema = new PdfPortfolioSchema();
//Create portfolio schema field.
PdfPortfolioSchemaField fromField = new PdfPortfolioSchemaField();
fromField.Name = "From";
fromField.Type = PdfPortfolioSchemaFieldType.String;
fromField.Order = 1;
fromField.Visible = true;
fromField.Editable = false;
schema.AddSchemaField(fromField);
PdfPortfolioSchemaField toField = new PdfPortfolioSchemaField();
toField.Name = "To";
toField.Type = PdfPortfolioSchemaFieldType.String;
toField.Order = 2;
toField.Visible = true;
toField.Editable = false;
schema.AddSchemaField(toField);
//Add schema to the portfolio.
document.PortfolioInformation.Schema = schema;
//Create attachment.
PdfAttachment pdfFile = new PdfAttachment("CorporateBrochure.pdf");
pdfFile.FileName = "CorporateBrochure.pdf";
//Set schema field attributed.
pdfFile.PortfolioAttributes = new PdfPortfolioAttributes();
pdfFile.PortfolioAttributes.AddAttributes("From", "Steven");
pdfFile.PortfolioAttributes.AddAttributes("To", "John");
//Add attachment to document.
document.Attachments.Add(pdfFile);
//Add new page to document.
document.Pages.Add();
//Save and close the document.
document.Save("Sample.pdf");
document.Close(true);
'Create a new instance of PdfDocument class.
Dim document As New PdfDocument()
'Create new portfolio.
document.PortfolioInformation = New PdfPortfolioInformation()
'Set the view mode of the portfolio.
document.PortfolioInformation.ViewMode = PdfPortfolioViewMode.Details
'Create portfolio schema.
Dim schema As New PdfPortfolioSchema()
'Create portfolio schema field.
Dim fromField As New PdfPortfolioSchemaField()
fromField.Name = "From"
fromField.Type = PdfPortfolioSchemaFieldType.[String]
fromField.Order = 1
fromField.Visible = True
fromField.Editable = False
schema.AddSchemaField(fromField)
Dim toField As New PdfPortfolioSchemaField()
toField.Name = "To"
toField.Type = PdfPortfolioSchemaFieldType.[String]
toField.Order = 2
toField.Visible = True
toField.Editable = False
schema.AddSchemaField(toField)
'Add schema to the portfolio.
document.PortfolioInformation.Schema = schema
'Create attachment.
Dim pdfFile As New PdfAttachment("CorporateBrochure.pdf")
pdfFile.FileName = "CorporateBrochure.pdf"
'Set schema field attributed.
pdfFile.PortfolioAttributes = New PdfPortfolioAttributes()
pdfFile.PortfolioAttributes.AddAttributes("From", "Steven")
pdfFile.PortfolioAttributes.AddAttributes("To", "John")
'Add attachment to document.
document.Attachments.Add(pdfFile)
'Add new page to document.
document.Pages.Add()
'Save and close the document.
document.Save("Sample.pdf")
document.Close(True)
Constructors
PdfPortfolioSchemaField()
initialize the instance of the PdfPortfolioSchemaField class
Declaration
public PdfPortfolioSchemaField()
Properties
Editable
Gets or Sets the whether the value of the schema field is editable
Declaration
public bool Editable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | if true editable,else can't editable |
Name
Gets or Sets the name of the schema field
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the schema field |
Order
Gets or sets the order of the Schema field.
Declaration
public int Order { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | the numeric value show the order of the field |
Type
Gets or Sets the schema field Type
Declaration
public PdfPortfolioSchemaFieldType Type { get; set; }
Property Value
Type | Description |
---|---|
PdfPortfolioSchemaFieldType | The PdfPortfolioSchemaFieldType provides the data type of the field |
Visible
Gets or Sets the visibility of the Schema field
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | if true the filed is visible,otherwise field is not visible |