ASP.NET Core

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfTextStyle - ASP.NETCore API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfTextStyle

    Allows to choose outline text style.

    Inheritance
    System.Object
    PdfTextStyle
    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public sealed class PdfTextStyle : Enum
    Examples
    //Load the PDF document.
    PdfLoadedDocument loadedDocument = new PdfLoadedDocument("Input.pdf");
    //Get all the bookmarks.
    PdfBookmarkBase bookmarks = loadedDocument.Bookmarks;
    //Get the first bookmark and set the properties of the bookmark.
    PdfLoadedBookmark bookmark = bookmarks[0] as PdfLoadedBookmark;
    bookmark.Destination = new PdfDestination(loadedDocument.Pages[1]);
    bookmark.Color = Color.Green;
    bookmark.TextStyle = PdfTextStyle.Bold;
    bookmark.Title = "Changed title";
    //Save the document
    loadedDocument.Save("Output.pdf");
    //Close the document
    loadedDocument.Close(true);
    'Load the PDF document.
    Dim loadedDocument As New PdfLoadedDocument("Input.pdf")
    'Get all the bookmarks.
    Dim bookmarks As PdfBookmarkBase = document.Bookmarks
    'Get the first bookmark and set the properties of the bookmark.
    Dim bookmark As PdfLoadedBookmark = TryCast(bookmarks(0), PdfLoadedBookmark)
    bookmark.Destination = New PdfDestination(loadedDocument.Pages(1))
    bookmark.Color = Color.Green
    bookmark.TextStyle = PdfTextStyle.Bold
    bookmark.Title = "Changed title"
    'Save the document
    loadedDocument.Save("Output.pdf")
    'Close the document
    loadedDocument.Close(True)

    Fields

    Bold

    Bold text style.

    Declaration
    public const PdfTextStyle Bold
    Field Value
    Type Description
    PdfTextStyle

    Italic

    Italic text style.

    Declaration
    public const PdfTextStyle Italic
    Field Value
    Type Description
    PdfTextStyle

    Regular

    Regular text style.

    Declaration
    public const PdfTextStyle Regular
    Field Value
    Type Description
    PdfTextStyle

    value__

    Declaration
    public int value__
    Field Value
    Type Description
    System.Int32

    See Also

    PdfBookmarkBase
    PdfDestination
    PdfLoadedBookmark
    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved