Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfPortfolioInformation

    Show / Hide Table of Contents

    Class PdfPortfolioInformation

    The class represents the creation of PDF portfolio

    Inheritance
    System.Object
    PdfPortfolioInformation
    Namespace: Syncfusion.Pdf
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public class PdfPortfolioInformation : Object, 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

    PdfPortfolioInformation()

    Initializes new instance of PdfPortfolioInformation class

    Declaration
    public PdfPortfolioInformation()

    Properties

    Schema

    Gets or sets the collection of portfolio schema field

    Declaration
    public PdfPortfolioSchema Schema { get; set; }
    Property Value
    Type Description
    PdfPortfolioSchema

    the PdfPortfolioSchema

    StartupDocument

    Get and set the startup document of portfolio

    Declaration
    public PdfAttachment StartupDocument { get; set; }
    Property Value
    Type Description
    PdfAttachment

    The PdfAttachment, represents the attached documents

    ViewMode

    Gets and sets the view mode of the portfolio

    Declaration
    public PdfPortfolioViewMode ViewMode { get; set; }
    Property Value
    Type Description
    PdfPortfolioViewMode

    The PdfPortfolioViewMode represents visual mode of the files in portfolio

    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved