menu

UWP

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class Pdf3DLighting - UWP API Reference | Syncfusion

    Show / Hide Table of Contents

    Class Pdf3DLighting

    Represents the lighting scheme for the 3D artwork.

    Inheritance
    System.Object
    Pdf3DLighting
    Implements
    IPdfWrapper
    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.UWP.dll
    Syntax
    public class Pdf3DLighting : Object, IPdfWrapper
    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page.
    PdfPage page = document.Pages.Add();
    //Create a new Pdf3DAnnotation.
    Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
    //Create a new Pdf3DLighting.
    Pdf3DLighting lighting = new Pdf3DLighting();
    lighting.Style = Pdf3DLightingStyle.CAD;
    //Create a new Pdf3DView.
    Pdf3DView view = new Pdf3DView();
    view.CameraToWorldMatrix = new Single[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
    view.LightingScheme = lighting;
    annotation.Views.Add(view);
    page.Annotations.Add(annotation);
    //Save the document to disk.
    document.Save("Output.pdf");
    //close the document
    document.Close(true);
    'Create a new PDF document.
    Dim document As New PdfDocument()
    'Create a new page .
    Dim page As PdfPage = document.Pages.Add()
    'Create a new Pdf3DAnnotation.
    Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
    'Create a new Pdf3DLighting.
    Dim lighting As New Pdf3DLighting()
    lighting.Style = Pdf3DLightingStyle.CAD
    'Create a new Pdf3DView.
    Dim view As New Pdf3DView
    view.CameraToWorldMatrix = New Single() { -0.382684F, 0.92388F, -7.66026E-08F, 0.18024F, 0.0746579F, 0.980785F, 0.906127F, 0.37533F, -0.19509F, -100, -112.432F, 45.6829F}
    view.LightingScheme = lighting
    annotation.Views.Add(view)
    page.Annotations.Add(annotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)

    Constructors

    Pdf3DLighting()

    Initializes a new instance of the Pdf3DLighting class.

    Declaration
    public Pdf3DLighting()
    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page .
    PdfPage page = document.Pages.Add();
    //Create a new Pdf3DAnnotation.
    Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
    //Create a new Pdf3DLighting.
    Pdf3DLighting lighting = new Pdf3DLighting();
    lighting.Style = Pdf3DLightingStyle.CAD;
    //Create a new Pdf3DView.
    Pdf3DView view = new Pdf3DView();
    view.CameraToWorldMatrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
    view.LightingScheme = lighting;
    annotation.Views.Add(view);
    page.Annotations.Add(annotation);
    //Save the document to disk.
    document.Save("Output.pdf");
    //close the document
    document.Close(true);
    'Create a new PDF document.
    Dim document As New PdfDocument()
    'Create a new page .
    Dim page As PdfPage = document.Pages.Add()
    'Create a new Pdf3DAnnotation.
    Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
    'Create a new Pdf3DLighting.
    Dim lighting As New Pdf3DLighting()
    lighting.Style = Pdf3DLightingStyle.CAD
    'Create a new Pdf3DView.
    Dim view As New Pdf3DView()
    view.CameraToWorldMatrix = New Single() { -0.382684F, 0.92388F, -7.66026E-08F, 0.18024F, 0.0746579F, 0.980785F, 0.906127F, 0.37533F, -0.19509F, -100, -112.432F, 45.6829F}
    view.LightingScheme = lighting
    annotation.Views.Add(view)
    page.Annotations.Add(annotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfPage
    Pdf3DAnnotation
    Pdf3DView

    Pdf3DLighting(Pdf3DLightingStyle)

    Initializes a new instance of the Pdf3DLighting class with specified lighting style.

    Declaration
    public Pdf3DLighting(Pdf3DLightingStyle style)
    Parameters
    Type Name Description
    Pdf3DLightingStyle style

    The Pdf3DLightingStyle object specifies the style of the 3D artwork.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page .
    PdfPage page = document.Pages.Add();
    //Create a new Pdf3DAnnotation.
    Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
    //Create a new Pdf3DLighting.
    Pdf3DLighting lighting = new Pdf3DLighting(Pdf3DLightingStyle.CAD);
    //Create a new Pdf3DView.
    Pdf3DView view = new Pdf3DView();
    view.CameraToWorldMatrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
    view.LightingScheme = lighting;
    annotation.Views.Add(view);
    page.Annotations.Add(annotation);
    //Save the document to disk.
    document.Save("Output.pdf");
    //close the document
    document.Close(true);
    'Create a new PDF document.
    Dim document As New PdfDocument()
    'Create a new page .
    Dim page As PdfPage = document.Pages.Add()
    'Create a new Pdf3DAnnotation.
    Dim annot As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
    'Create a new Pdf3DLighting.
    Dim lighting As New Pdf3DLighting(Pdf3DLightingStyle.CAD)
    'Create a new Pdf3DView.
    Dim view As New Pdf3DView()
    view.CameraToWorldMatrix = New Single() { -0.382684F, 0.92388F, -7.66026E-08F, 0.18024F, 0.0746579F, 0.980785F, 0.906127F, 0.37533F, -0.19509F, -100, -112.432F, 45.6829F}
    view.LightingScheme = lighting
    annotation.Views.Add(view)
    page.Annotations.Add(annot)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfPage
    Pdf3DAnnotation
    Pdf3DView

    Properties

    Style

    Gets or sets the lighting style of the 3D artwork.

    Declaration
    public Pdf3DLightingStyle Style { get; set; }
    Property Value
    Type
    Pdf3DLightingStyle
    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page .
    PdfPage page = document.Pages.Add();
    //Create a new Pdf3DAnnotation.
    Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
    //Create a new Pdf3DLighting.
    Pdf3DLighting lighting = new Pdf3DLighting();
    lighting.Style = Pdf3DLightingStyle.CAD;
    //Create a new Pdf3DView.
    Pdf3DView view = new Pdf3DView();
    view.CameraToWorldMatrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
    view.LightingScheme = lighting;
    annotation.Views.Add(view);
    page.Annotations.Add(annotation);
    //Save the document to disk.
    document.Save("Output.pdf");
    //close the document
    document.Close(true);
    'Create a new PDF document.
    Dim document As New PdfDocument()
    'Create a new page .
    Dim page As PdfPage = document.Pages.Add()
    'Create a new Pdf3DAnnotation.
    Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
    'Create a new Pdf3DLighting.
    Dim lighting As New Pdf3DLighting()
    lighting.Style = Pdf3DLightingStyle.CAD
    'Create a new Pdf3DView.
    Dim view As New Pdf3DView()
    view.CameraToWorldMatrix = New Single() { -0.382684F, 0.92388F, -7.66026E-08F, 0.18024F, 0.0746579F, 0.980785F, 0.906127F, 0.37533F, -0.19509F, -100, -112.432F, 45.6829F}
    view.LightingScheme = lighting
    annotation.Views.Add(view)
    page.Annotations.Add(annotation)
    'Save the document to disk.
    document.Save("Output.pdf")
    'close the document
    document.Close(True)
    See Also
    PdfPage
    Pdf3DAnnotation
    Pdf3DView

    Methods

    Initialize()

    Initializes annotation object.

    Declaration
    protected virtual void Initialize()

    Save()

    Saves an annotation.

    Declaration
    protected virtual void Save()

    Explicit Interface Implementations

    IPdfWrapper.Element

    Gets the element.

    Declaration
    IPdfPrimitive IPdfWrapper.Element { get; }
    Returns
    Type
    IPdfPrimitive

    Implements

    IPdfWrapper

    Extension Methods

    DateTimeExtension.ToDateTime(Object)

    See Also

    PdfPage
    Pdf3DAnnotation
    Pdf3DView
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved