menu

UWP

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

    Show / Hide Table of Contents

    Class PdfString

    Implements PDF string object.

    Inheritance
    System.Object
    PdfString
    Implements
    IPdfPrimitive
    Namespace: Syncfusion.Pdf.Primitives
    Assembly: Syncfusion.Pdf.UWP.dll
    Syntax
    public class PdfString : Object, IPdfPrimitive, IPdfDecryptable

    Constructors

    PdfString()

    Initializes a new instance of the PdfString class.

    Declaration
    public PdfString()

    PdfString(Byte[])

    Creates new PDF string object.

    Declaration
    public PdfString(byte[] value)
    Parameters
    Type Name Description
    System.Byte[] value

    Value of the object.

    PdfString(String)

    Creates new PDF string object.

    Declaration
    public PdfString(string value)
    Parameters
    Type Name Description
    System.String value

    Value of the object.

    PdfString(String, Boolean)

    Initialize a string from a hex string.

    Declaration
    public PdfString(string value, bool encrypted)
    Parameters
    Type Name Description
    System.String value

    The value.

    System.Boolean encrypted

    if set to true the string has been encrypted.

    Fields

    HexStringMark

    Hex markers for string.

    Declaration
    public const string HexStringMark = "<>"
    Field Value
    Type
    System.String

    StringMark

    General markers for string.

    Declaration
    public const string StringMark = "()"
    Field Value
    Type
    System.String

    Properties

    ClonedObject

    Returns cloned object.

    Declaration
    public IPdfPrimitive ClonedObject { get; }
    Property Value
    Type
    IPdfPrimitive

    Decrypted

    Gets a flag that shows if the object has been decrypted already.

    Declaration
    public bool Decrypted { get; }
    Property Value
    Type
    System.Boolean

    IsSaving

    Gets or sets a value indicating whether this document is saving or not.

    Declaration
    public bool IsSaving { get; set; }
    Property Value
    Type
    System.Boolean

    ObjectCollectionIndex

    Gets or sets the integer value of the specified object.

    Declaration
    public int ObjectCollectionIndex { get; set; }
    Property Value
    Type
    System.Int32

    Position

    Gets or sets the position of the object.

    Declaration
    public int Position { get; set; }
    Property Value
    Type
    System.Int32

    Status

    Gets or sets the Status of the specified object.

    Declaration
    public ObjectStatus Status { get; set; }
    Property Value
    Type
    ObjectStatus

    Value

    Gets or sets string value of the object.

    Declaration
    public string Value { get; set; }
    Property Value
    Type
    System.String

    Methods

    ByteToString(Byte[])

    Converts byte data to string.

    Declaration
    public static string ByteToString(byte[] data)
    Parameters
    Type Name Description
    System.Byte[] data

    Bytes to be converted.

    Returns
    Type Description
    System.String

    Destination string.

    Clone(PdfCrossTable)

    Creates a copy of PdfString.

    Declaration
    public IPdfPrimitive Clone(PdfCrossTable crossTable)
    Parameters
    Type Name Description
    PdfCrossTable crossTable
    Returns
    Type
    IPdfPrimitive

    Decrypt(PdfEncryptor, Int64)

    Decrypts the specified encryptor.

    Declaration
    public void Decrypt(PdfEncryptor encryptor, long currObjNumber)
    Parameters
    Type Name Description
    PdfEncryptor encryptor

    The encryptor.

    System.Int64 currObjNumber

    The current object number.

    FromDate(DateTime)

    FromDate in PDF suitable form.

    Declaration
    public static string FromDate(DateTime dateTime)
    Parameters
    Type Name Description
    System.DateTime dateTime

    The datetime.

    Returns
    Type
    System.String

    HexToBytes(String)

    Converts hexadecimal digits into a byte array.

    Declaration
    public byte[] HexToBytes(string value)
    Parameters
    Type Name Description
    System.String value

    The string value.

    Returns
    Type Description
    System.Byte[]

    The byte array.

    IsUnicode(String)

    Determines if the string is a unicode one.

    Declaration
    public static bool IsUnicode(string value)
    Parameters
    Type Name Description
    System.String value

    String value.

    Returns
    Type Description
    System.Boolean

    True if string is in Unicode format; otherwise False.

    Save(IPdfWriter)

    Saves the object using the specified writer.

    Declaration
    public void Save(IPdfWriter writer)
    Parameters
    Type Name Description
    IPdfWriter writer

    The writer.

    ToUnicodeArray(String, Boolean)

    Converts string to array of unicode symbols.

    Declaration
    public static byte[] ToUnicodeArray(string value, bool bAddPrefix)
    Parameters
    Type Name Description
    System.String value

    String value.

    System.Boolean bAddPrefix

    Indicates whether we should add Unicode prefix to output data.

    Returns
    Type Description
    System.Byte[]

    Array of data in unicode format.

    Operators

    Explicit(String to PdfString)

    Explicit operator. Converts system string into PdfString.

    Declaration
    public static explicit operator PdfString(string str)
    Parameters
    Type Name Description
    System.String str

    The system string.

    Returns
    Type Description
    PdfString

    Properly initialized PdfString.

    Implements

    IPdfPrimitive

    Extension Methods

    DateTimeExtension.ToDateTime(Object)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved