GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfLZWDecodeFilter Class

    Namespace:
    GemBox.Pdf.Filters
    Assembly:
    GemBox.Pdf.dll

    The LZWDecode filter decode data that has been encoded using the LZW (Lempel-Ziv-Welch) variable-length, adaptive compression method that has been adopted as one of the standard compression methods in the Tag Image File Format (TIFF) standard. For details on LZW encoding see 7.4.4.2, "Details of LZW Encoding."

    • C#
    • VB.NET
    public sealed class PdfLZWDecodeFilter : PdfFilter
    Public NotInheritable Class PdfLZWDecodeFilter
        Inherits PdfFilter
    Inheritance:
    System.Object
    PdfFilter
    PdfLZWDecodeFilter

    Properties

    BitsPerComponent

    (May be used only if Predictor is greater than 1) The number of bits used to represent each color component in a sample. Valid values are 1, 2, 4, 8, and (PDF 1.5) 16.

    Default value: 8.

    • C#
    • VB.NET
    public int BitsPerComponent { get; set; }
    Public Property BitsPerComponent As Integer
    Property Value
    System.Int32

    The number of bits used to represent each color component in a sample.

    Exceptions
    System.ArgumentOutOfRangeException

    value

    System.InvalidOperationException
    System.ArgumentOutOfRangeException

    Value is not 1, 2, 4, 8 or 16.

    System.InvalidOperationException

    Predictor is not greater than 1.

    InvalidPdfDictionaryEntryException

    Value is not according to PDF Specification ISO 32000-1:2008.

    See Also
    PDF Specification ISO 32000-1:2008

    Colors

    (May be used only if Predictor is greater than 1) The number of interleaved color components per sample. Valid values are 1 to 4 (PDF 1.0) and 1 or greater (PDF 1.3).

    Default value: 1.

    • C#
    • VB.NET
    public int Colors { get; set; }
    Public Property Colors As Integer
    Property Value
    System.Int32

    The number of interleaved color components per sample.

    Exceptions
    System.ArgumentOutOfRangeException

    value

    System.InvalidOperationException
    System.ArgumentOutOfRangeException

    Value is less than 1.

    System.InvalidOperationException

    Predictor is not greater than 1.

    InvalidPdfDictionaryEntryException

    Value is not according to PDF Specification ISO 32000-1:2008.

    See Also
    PDF Specification ISO 32000-1:2008

    Columns

    (May be used only if Predictor is greater than 1) The number of samples in each row.

    Default value: 1.

    • C#
    • VB.NET
    public int Columns { get; set; }
    Public Property Columns As Integer
    Property Value
    System.Int32

    The number of samples in each row.

    Exceptions
    System.ArgumentOutOfRangeException

    value

    System.InvalidOperationException
    System.ArgumentOutOfRangeException

    Value is less than 1.

    System.InvalidOperationException

    Predictor is not greater than 1.

    InvalidPdfDictionaryEntryException

    Value is not according to PDF Specification ISO 32000-1:2008.

    See Also
    PDF Specification ISO 32000-1:2008

    EarlyChange

    An indication of when to increase the code length. If the value is false, code length increases shall be postponed as long as possible. If the value is true, code length increases shall occur one code early. This parameter is included because LZW sample code distributed by some vendors increases the code length one code earlier than necessary.

    Default value: true.

    • C#
    • VB.NET
    public bool EarlyChange { get; set; }
    Public Property EarlyChange As Boolean
    Property Value
    System.Boolean

    The indication of when to increase the code length.

    Exceptions
    InvalidPdfDictionaryEntryException

    Value is not according to PDF Specification ISO 32000-1:2008.

    See Also
    PDF Specification ISO 32000-1:2008

    FilterType

    Gets the LZWDecode value.

    • C#
    • VB.NET
    public override PdfFilterType FilterType { get; }
    Public Overrides ReadOnly Property FilterType As PdfFilterType
    Property Value
    PdfFilterType

    The LZWDecode value.

    Overrides
    PdfFilter.FilterType

    Predictor

    A code that selects the predictor algorithm, if any. If the value is 1, the PdfFlateDecodeFilter shall assume that the normal algorithm was used to encode the data, without prediction. If the value is greater than 1, the PdfFlateDecodeFilter shall assume that the data was differenced before being encoded, and Predictor selects the predictor algorithm. For more information regarding Predictor values greater than 1, see 7.4.4.4, "LZW and Flate Predictor Functions".

    Default value: 1.

    • C#
    • VB.NET
    public int Predictor { get; set; }
    Public Property Predictor As Integer
    Property Value
    System.Int32

    The code that selects the predictor algorithm, if any.

    Exceptions
    System.ArgumentOutOfRangeException

    Value is less than 1.

    InvalidPdfDictionaryEntryException

    Value is not according to PDF Specification ISO 32000-1:2008.

    See Also
    PDF Specification ISO 32000-1:2008

    PredictorFunction

    Gets or sets the predictor algorithm.

    Default value: None.

    • C#
    • VB.NET
    public PdfPredictorFunction PredictorFunction { get; set; }
    Public Property PredictorFunction As PdfPredictorFunction
    Property Value
    PdfPredictorFunction

    The predictor algorithm.

    Exceptions
    InvalidPdfDictionaryEntryException

    Predictor is not according to PDF Specification ISO 32000-1:2008.

    See Also
    PDF Specification ISO 32000-1:2008

    Inherited Methods

    Equals(System.Object)

    Determines whether the specified System.Object is equal to this PdfFilter instance.

    (Inherited from PdfFilter)

    GetHashCode()

    Returns a hash code for this PdfFilter instance.

    (Inherited from PdfFilter)

    ToString()

    Returns a System.String that represents this PdfFilter instance.

    (Inherited from PdfFilter)

    See Also

    PDF Specification ISO 32000-1:2008, section '7.4.4.2 Details of LZW Encoding'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.