Search results

Static Functions API in JavaScript PDF API control

Root static functions of Pdf Component

_appendChar

Convert character code to string.

Parameter Type Description
value number Input value.

Returns string

_arabicToLetter

Convert arabic numbers to alphabet.

Parameter Type Description
arabic number Input value.

Returns string

_arabicToRoman

Convert arabic numbers to roman style.

Parameter Type Description
intArabic number Input value.

Returns string

_checkInkPoints

Gets the boolean if two arrays are equal.

Parameter Type Description
inkPointsCollection Array Ink points collection.
previousCollection Array Previous collection.

Returns boolean

_checkRotation

Gets the page rotation.

Parameter Type Description
page PdfPage Page.
height number Height.
left number Left.

Returns number

_checkType

Checks the type of the image using header bytes.

Parameter Type Description
imageData Uint8Array image data.
header number[] header bytes.

Returns boolean

_compressStream

Compresses the content of a PDFBaseStream

Parameter Type Description
stream _PdfBaseStream Base stream to compress.
isExport boolean Denotes compress the stream as a hex-encoded string.

Returns string

_convertNumber

Convert number respect to ordered list number style.

Parameter Type Description
intArabic number Input value.
numberStyle PdfNumberStyle Number style.

Returns string

_copyRange

Copy values from one array to another.

Parameter Type Description
target number[] destination array.
at number target index.
source number[] source array.
start (optional) number start index.
end (optional) number end index.

Returns void

_decodeText

Decode text.

Parameter Type Description
text string Text to decode.
isColorSpace boolean Color space or not
isPassword boolean Password or not

Returns string

_defaultToString

Gets the default string.

Parameter Type Description
item string | number | string[] | number[] | Object | Object[] | boolean Input string.

Returns string

_defineProperty

Defines a property on an object with specific attributes.

Returns any

_getDecoder

Gets the image decoder.

Parameter Type Description
imageData Uint8Array image data.

Returns _ImageDecoder

_getFontStyle

Gets the font style.

Parameter Type Description
fontFamilyString string Font family string.

Returns PdfFontStyle

_getPageIndex

Gets the page index.

Parameter Type Description
loadedDocument PdfDocument Loaded document.
pageDictionary _PdfDictionary Page dictionary.

Returns number

_getSize

Number of bytes required to save the number.

Parameter Type Description
input number number.

Returns number

_isArrayEqual

Compare two arrays of numbers to determine if they are equal. This function checks if two arrays have the same length and identical elements in the same order.

Parameter Type Description
arr1 number[] The first array to compare.
arr2 number[] The second array to compare.

Returns boolean

_isNullOrUndefined

Check whether the value is null or undefined.

Parameter Type Description
value any Input value.

Returns boolean

_isRightToLeftCharacters

Check whether the input string contains any right-to-left (RTL) characters.

Parameter Type Description
input string The input string.

Returns boolean

_mapFont

Map the font.

Parameter Type Description
name string Font name.
size number Font size.
style PdfFontStyle Font style.
annotation PdfAnnotation | PdfField Annotation or Field.

Returns PdfFont

_mapRubberStampIcon

Map rubber stamp icon.

Parameter Type Description
iconString string String value.

Returns PdfRubberStampAnnotationIcon

_obtainDestination

Gets the Destination.

Parameter Type Description
dictionary _PdfDictionary widget dictionary.
key string bookmark or action dictionary key.

Returns PdfDestination

_obtainFontDetails

Gets the form field font.

Parameter Type Description
form PdfForm form.
widget PdfWidgetAnnotation widget annotation.
field PdfField field.

Returns PdfFont

_stringToBigEndianBytes

Convert the string to big endian bytes.

Parameter Type Description
input string string.

Returns number[]

_toSigned16

Gets the signed 16 bit value.

Parameter Type Description
value number input value.

Returns number

_toSigned32

Gets the signed 32 bit value.

Parameter Type Description
value number input value.

Returns number

_toUnsigned

Gets the unsigned value.

Parameter Type Description
value number input value.
bits number bits to process.

Returns number

_tryParseFontStream

Gets the font stream.

Parameter Type Description
widgetDictionary _PdfDictionary Widget dictionary.
crossReference _PdfCrossReference Cross reference.
annotation PdfAnnotation | PdfField Annotation.

Returns Uint8Array

_updateBounds

Update the annotation bounds.

Parameter Type Description
annotation PdfAnnotation annotation.
bounds (optional) number[] annotation bounds.

Returns number[]

_updatePageCount

Updates the page count value in the dictionary

Parameter Type Description
dictionary _PdfDictionary Dictionary to update page count.
valueToIncrement number Page count.

Returns void

_updatePageSettings

Updates the page settings in the dictionary

Parameter Type Description
dictionary _PdfDictionary Dictionary to update page settings.
settings PdfPageSettings PDF page settings.

Returns void