new GState()
GState is a class that keeps track of a number of style attributes used to visually
define graphical Elements. Each PDF::Element has an associated GState that can be used to
query or set various graphics properties.
Members
-
<static> Attribute
-
Properties:
Name Type Description e_transformnumber e_rendering_intentnumber e_stroke_csnumber e_stroke_colornumber e_fill_csnumber e_fill_colornumber e_line_widthnumber e_line_capnumber e_line_joinnumber e_flatnessnumber e_miter_limitnumber e_dash_patternnumber e_char_spacingnumber e_word_spacingnumber e_horizontal_scalenumber e_leadingnumber e_fontnumber e_font_sizenumber e_text_render_modenumber e_text_risenumber e_text_knockoutnumber e_text_pos_offsetnumber e_blend_modenumber e_opacity_fillnumber e_opacity_strokenumber e_alpha_is_shapenumber e_soft_masknumber e_smoothnesnumber e_auto_stoke_adjustnumber e_stroke_overprintnumber e_fill_overprintnumber e_overprint_modenumber e_transfer_functnumber e_BG_functnumber e_UCR_functnumber e_halftonenumber e_nullnumber -
<static> BlendMode
-
Properties:
Name Type Description e_bl_compatiblenumber e_bl_normalnumber e_bl_multiplynumber e_bl_screennumber e_bl_differencenumber e_bl_darkennumber e_bl_lightennumber e_bl_color_dodgenumber e_bl_color_burnnumber e_bl_exclusionnumber e_bl_hard_lightnumber e_bl_overlaynumber e_bl_soft_lightnumber e_bl_luminositynumber e_bl_huenumber e_bl_saturationnumber e_bl_colornumber -
<static> LineCap
-
Properties:
Name Type Description e_butt_capnumber e_round_capnumber e_square_capnumber -
<static> LineJoin
-
Properties:
Name Type Description e_miter_joinnumber e_round_joinnumber e_bevel_joinnumber -
<static> RenderingIntent
-
Properties:
Name Type Description e_absolute_colorimetricnumber e_relative_colorimetricnumber e_saturationnumber e_perceptualnumber -
<static> TextRenderingMode
-
Properties:
Name Type Description e_fill_textnumber e_stroke_textnumber e_fill_stroke_textnumber e_invisible_textnumber e_fill_clip_textnumber e_stroke_clip_textnumber e_fill_stroke_clip_textnumber e_clip_textnumber
Methods
-
<static> getRenderingIntentType(name)
-
A utility function that maps a string representing a rendering intent to RenderingIntent type.
Parameters:
Name Type Description namestring string that represents the rendering intent to get. Returns:
A promise that resolves to the color rendering intent type matching the specified string- Type
- Promise.<number>
Example
Return value enum: <pre> PDFNet.GState.RenderingIntent = { e_absolute_colorimetric : 0 e_relative_colorimetric : 1 e_saturation : 2 e_perceptual : 3 } </pre> -
concat(a, b, c, d, h, v)
-
Concatenate the given matrix expressed in its values to the transformation matrix of this element.
Parameters:
Name Type Description anumber horizontal 'scaling' component of the new text matrix. bnumber 'rotation' component of the new text matrix. cnumber 'rotation' component of the new text matrix. dnumber vertical 'scaling' component of the new text matrix. hnumber horizontal translation component of the new text matrix. vnumber vertical translation component of the new text matrix. Returns:
- Type
- Promise.<void>
-
concatMatrix(mtx)
-
Concatenate the given matrix to the transformation matrix of this element.
Parameters:
Name Type Description mtxPDFNet.Matrix2D Matrix2D object to concatenate the current matrix with. Returns:
- Type
- Promise.<void>
-
getAISFlag()
-
Returns:
A promise that resolves to the alpha source flag ('alpha is shape'), specifying whether the current soft mask and alpha constant are to be interpreted as shape values (true) or opacity values (false).- Type
- Promise.<boolean>
-
getAutoStrokeAdjust()
-
Returns:
A promise that resolves to a flag specifying whether stroke adjustment is enabled in the graphics state. Corresponds to the /SA key within the ExtGState's dictionary.- Type
- Promise.<boolean>
-
getBlackGenFunct()
-
Returns:
A promise that resolves to currently selected black-generation function (NULL by default) used during conversion between DeviceRGB and DeviceCMYK. Corresponds to the /BG key within the ExtGState's dictionary.- Type
- Promise.<PDFNet.Obj>
-
getBlendMode()
-
Returns:
A promise that resolves to the current blend mode to be used in the transparent imaging model. Corresponds to the /BM key within the ExtGState's dictionary.- Type
- Promise.<number>
Example
Return value enum: <pre> PDFNet.GState.BlendMode = { e_bl_compatible : 0 e_bl_normal : 1 e_bl_multiply : 2 e_bl_screen : 3 e_bl_difference : 4 e_bl_darken : 5 e_bl_lighten : 6 e_bl_color_dodge : 7 e_bl_color_burn : 8 e_bl_exclusion : 9 e_bl_hard_light : 10 e_bl_overlay : 11 e_bl_soft_light : 12 e_bl_luminosity : 13 e_bl_hue : 14 e_bl_saturation : 15 e_bl_color : 16 } </pre> -
getCharSpacing()
-
Returns:
A promise that resolves to currently selected character spacing. The character spacing parameter is a number specified in unscaled text space units. When the glyph for each character in the string is rendered, the character spacing is added to the horizontal or vertical component of the glyph's displacement, depending on the writing mode. See Section 5.2.1 in PDF Reference Manual for details.- Type
- Promise.<number>
-
getFillColor()
-
Returns:
A promise that resolves to a color value/point represented in the current fill color space- Type
- Promise.<PDFNet.ColorPt>
-
getFillColorSpace()
-
Returns:
A promise that resolves to color space used for filling- Type
- Promise.<PDFNet.ColorSpace>
-
getFillOpacity()
-
Returns:
A promise that resolves to the opacity value for painting operations other than stroking. Returns the value of the /ca key in the ExtGState dictionary. If the value is not found, the default value of 1 is returned.- Type
- Promise.<number>
-
getFillOverprint()
-
Returns:
A promise that resolves to whether overprint is enabled for fill painting operations. Corresponds to the /op key within the ExtGState's dictionary.- Type
- Promise.<boolean>
-
getFillPattern()
-
Returns:
A promise that resolves to the pattern color of currently selected pattern color space used for filling.- Type
- Promise.<PDFNet.PatternColor>
-
getFlatness()
-
Returns:
A promise that resolves to current value of flatness tolerance Flatness is a number in the range 0 to 100; a value of 0 specifies the output device's default flatness tolerance. The flatness tolerance controls the maximum permitted distance in device pixels between the mathematically correct path and an approximation constructed from straight line segments.- Type
- Promise.<number>
-
getFont()
-
Returns:
A promise that resolves to currently selected font- Type
- Promise.<PDFNet.Font>
-
getFontSize()
-
Returns:
A promise that resolves to the font size- Type
- Promise.<number>
-
getHalftone()
-
Returns:
A promise that resolves to currently selected halftone dictionary or stream (NULL by default). Corresponds to the /HT key within the ExtGState's dictionary. Halftoning is a process by which continuous-tone colors are approximated on an output device that can achieve only a limited number of discrete colors.- Type
- Promise.<PDFNet.Obj>
-
getHorizontalScale()
-
Returns:
A promise that resolves to currently selected horizontal scale The horizontal scaling parameter adjusts the width of glyphs by stretching or compressing them in the horizontal direction. Its value is specified as a percentage of the normal width of the glyphs, with 100 being the normal width. The scaling always applies to the horizontal coordinate in text space, independently of the writing mode. See Section 5.2.3 in PDF Reference Manual for details.- Type
- Promise.<number>
-
getLeading()
-
Returns:
A promise that resolves to currently selected leading parameter The leading parameter is measured in unscaled text space units. It specifies the vertical distance between the baselines of adjacent lines of text. See Section 5.2.4 in PDF Reference Manual for details.- Type
- Promise.<number>
-
getLineCap()
-
Returns:
A promise that resolves to currently selected LineCap style The line cap style specifies the shape to be used at the ends of open sub-paths (and dashes, if any) when they are stroked.- Type
- Promise.<number>
Example
Return value enum: <pre> PDFNet.GState.LineCap = { e_butt_cap : 0 e_round_cap : 1 e_square_cap : 2 } </pre> -
getLineJoin()
-
Returns:
A promise that resolves to currently selected LineJoin style The line join style specifies the shape to be used at the corners of paths that are stroked.- Type
- Promise.<number>
Example
Return value enum: <pre> PDFNet.GState.LineJoin = { e_miter_join : 0 e_round_join : 1 e_bevel_join : 2 } </pre> -
getLineWidth()
-
Returns:
A promise that resolves to the thickness of the line used to stroke a path.- Type
- Promise.<number>
-
getMiterLimit()
-
Returns:
A promise that resolves to current value of miter limit. The miter limit imposes a maximum on the ratio of the miter length to the line width. When the limit is exceeded, the join is converted from a miter to a bevel.- Type
- Promise.<number>
-
getOverprintMode()
-
Returns:
A promise that resolves to the overprint mode used by this graphics state. Corresponds to the /OPM key within the ExtGState's dictionary.- Type
- Promise.<number>
-
getPhase()
-
Returns:
A promise that resolves to the phase of the currently selected dash pattern. dash phase is expressed in user space units.- Type
- Promise.<number>
-
getRenderingIntent()
-
Returns:
A promise that resolves to the color intent to be used for rendering the Element- Type
- Promise.<number>
Example
Return value enum: <pre> PDFNet.GState.RenderingIntent = { e_absolute_colorimetric : 0 e_relative_colorimetric : 1 e_saturation : 2 e_perceptual : 3 } </pre> -
getSmoothnessTolerance()
-
Returns:
A promise that resolves to the smoothness tolerance used to control the quality of smooth shading. Corresponds to the /SM key within the ExtGState's dictionary. The allowable error (or tolerance) is expressed as a fraction of the range of the color component, from 0.0 to 1.0.- Type
- Promise.<number>
-
getSoftMask()
-
Returns:
A promise that resolves to associated soft mask. NULL if the soft mask is not selected or SDF dictionary representing the soft mask otherwise.- Type
- Promise.<PDFNet.Obj>
-
getSoftMaskTransform()
-
Returns:
A promise that resolves to the soft mask transform. This is the transformation matrix at the moment the soft mask is established in the graphics state with the gs operator. This information is only relevant when applying the soft mask that may be specified in the graphics state to the current element.- Type
- Promise.<PDFNet.Matrix2D>
-
getStrokeColor()
-
Returns:
A promise that resolves to a color value/point represented in the current stroke color space- Type
- Promise.<PDFNet.ColorPt>
-
getStrokeColorSpace()
-
Returns:
A promise that resolves to color space used for stroking- Type
- Promise.<PDFNet.ColorSpace>
-
getStrokeOpacity()
-
Returns:
A promise that resolves to opacity value for stroke painting operations for paths and glyph outlines. Returns the value of the /CA key in the ExtGState dictionary. If the value is not found, the default value of 1 is returned.- Type
- Promise.<number>
-
getStrokeOverprint()
-
Returns:
A promise that resolves to whether overprint is enabled for stroke painting operations. Corresponds to the /OP key within the ExtGState's dictionary.- Type
- Promise.<boolean>
-
getStrokePattern()
-
Returns:
A promise that resolves to the SDF pattern object of currently selected PatternColorSpace used for stroking.- Type
- Promise.<PDFNet.PatternColor>
-
getTextRenderMode()
-
Returns:
A promise that resolves to current text rendering mode. The text rendering mode determines whether showing text causes glyph outlines to be stroked, filled, used as a clipping boundary, or some combination of the three. See Section 5.2.5 in PDF Reference Manual for details..- Type
- Promise.<number>
Example
Return value enum: <pre> PDFNet.GState.TextRenderingMode = { e_fill_text : 0 e_stroke_text : 1 e_fill_stroke_text : 2 e_invisible_text : 3 e_fill_clip_text : 4 e_stroke_clip_text : 5 e_fill_stroke_clip_text : 6 e_clip_text : 7 } </pre> -
getTextRise()
-
Returns:
A promise that resolves to current value of text rise Text rise specifies the distance, in unscaled text space units, to move the baseline up or down from its default location. Positive values of text rise move the baseline up- Type
- Promise.<number>
-
getTransferFunct()
-
Returns:
A promise that resolves to currently selected transfer function (NULL by default) used during color conversion process. A transfer function adjusts the values of color components to compensate for nonlinear response in an output device and in the human eye. Corresponds to the /TR key within the ExtGState's dictionary.- Type
- Promise.<PDFNet.Obj>
-
getTransform()
-
Returns:
A promise that resolves to the transformation matrix for this element.- Type
- Promise.<PDFNet.Matrix2D>
-
getUCRFunct()
-
Returns:
A promise that resolves to currently selected undercolor-removal function (NULL by default) used during conversion between DeviceRGB and DeviceCMYK. Corresponds to the /UCR key within the ExtGState's dictionary.- Type
- Promise.<PDFNet.Obj>
-
getWordSpacing()
-
Returns:
A promise that resolves to currently selected word spacing Word spacing works the same way as character spacing, but applies only to the space character (char code 32). See Section 5.2.2 in PDF Reference Manual for details.- Type
- Promise.<number>
-
isTextKnockout()
-
Returns:
A promise that resolves to a boolean flag that determines the text element is considered elementary objects for purposes of color compositing in the transparent imaging model.- Type
- Promise.<boolean>
-
setAISFlag(AIS)
-
specifies if the alpha is to be interpreted as a shape or opacity mask. The alpha source flag ('alpha is shape'), specifies whether the current soft mask and alpha constant are to be interpreted as shape values (true) or opacity values (false).
Parameters:
Name Type Description AISboolean true for interpretation as shape values or false for opacity values Returns:
- Type
- Promise.<void>
-
setAutoStrokeAdjust(SA)
-
Specify whether to apply automatic stroke adjustment. Corresponds to the /SA key within the ExtGState's dictionary.
Parameters:
Name Type Description SAboolean if true automatic stroke adjustment will be applied. Returns:
- Type
- Promise.<void>
-
setBlackGenFunct(BG)
-
Sets black-generation function used during conversion between DeviceRGB and DeviceCMYK. Corresponds to the /BG key within the ExtGState's dictionary.
Parameters:
Name Type Description BGPDFNet.Obj SDF/Cos black-generation function or name Returns:
- Type
- Promise.<void>
-
setBlendMode(BM)
-
Sets the current blend mode to be used in the transparent imaging model. Corresponds to the /BM key within the ExtGState's dictionary.
Parameters:
Name Type Description BMnumber PDFNet.GState.BlendMode = { e_bl_compatible : 0 e_bl_normal : 1 e_bl_multiply : 2 e_bl_screen : 3 e_bl_difference : 4 e_bl_darken : 5 e_bl_lighten : 6 e_bl_color_dodge : 7 e_bl_color_burn : 8 e_bl_exclusion : 9 e_bl_hard_light : 10 e_bl_overlay : 11 e_bl_soft_light : 12 e_bl_luminosity : 13 e_bl_hue : 14 e_bl_saturation : 15 e_bl_color : 16 }New blending mode type.// C# gs.SetBlendMode(GState.BlendMode.e_lighten); // C++ gs->SetBlendMode(GState::e_lighten);
Returns:
- Type
- Promise.<void>
-
setCharSpacing(char_spacing)
-
Sets character spacing.
Parameters:
Name Type Description char_spacingnumber a number specified in unscaled text space units. When the glyph for each character in the string is rendered, the character spacing is added to the horizontal or vertical component of the glyph's displacement, depending on the writing mode. See Section 5.2.1 in PDF Reference Manual for details. Returns:
- Type
- Promise.<void>
-
setDashPattern(buf_dash_array, phase)
-
Parameters:
Name Type Description buf_dash_arrayArray phasenumber Returns:
- Type
- Promise.<void>
-
setFillColor(pattern, c)
-
Set the fill color to the given uncolored tiling pattern.
Parameters:
Name Type Description patternPDFNet.PatternColor PatternColor (PatternType = 1 and PaintType = 2) object. cPDFNet.ColorPt is a color in the pattern's underlying color space. Returns:
- Type
- Promise.<void>
-
setFillColorSpace(cs)
-
Sets the color space used for filling operations
Parameters:
Name Type Description csPDFNet.ColorSpace ColorSpace object to use for filling operations Returns:
- Type
- Promise.<void>
-
setFillColorWithColorPt(c)
-
Sets the color value/point used for filling operations.
Parameters:
Name Type Description cPDFNet.ColorPt the color used for filling operations The color value must be represented in the currently selected color space used for filling. Returns:
- Type
- Promise.<void>
-
setFillColorWithPattern(pattern)
-
Set the fill color to the given tiling pattern.
Parameters:
Name Type Description patternPDFNet.PatternColor New pattern color. Returns:
- Type
- Promise.<void>
-
setFillOpacity(ca)
-
Sets the opacity value for painting operations other than stroking. Corresponds to the value of the /ca key in the ExtGState dictionary.
Parameters:
Name Type Description canumber value to set fill opacity to Returns:
- Type
- Promise.<void>
-
setFillOverprint(op)
-
specifies if overprint is enabled for fill operations. Corresponds to the /op key within the ExtGState's dictionary.
Parameters:
Name Type Description opboolean true to enable overprint for fill, false to disable. Returns:
- Type
- Promise.<void>
-
setFlatness(flatness)
-
Sets the value of flatness tolerance.
Parameters:
Name Type Description flatnessnumber is a number in the range 0 to 100; a value of 0 specifies the output device's default flatness tolerance. The flatness tolerance controls the maximum permitted distance in device pixels between the mathematically correct path and an approximation constructed from straight line segments. Returns:
- Type
- Promise.<void>
-
setFont(font, font_sz)
-
Sets the font and font size used to draw text.
Parameters:
Name Type Description fontPDFNet.Font Font to draw the text with font_sznumber size of the font to draw the text with Returns:
- Type
- Promise.<void>
-
setHalftone(HT)
-
Parameters:
Name Type Description HTPDFNet.Obj SDF/Cos halftone dictionary, stream, or name Returns:
A promise that resolves to currently selected halftone dictionary or stream (NULL by default). Corresponds to the /HT key within the ExtGState's dictionary. Halftoning is a process by which continuous-tone colors are approximated on an output device that can achieve only a limited number of discrete colors.- Type
- Promise.<void>
-
setHorizontalScale(hscale)
-
Sets horizontal scale. The horizontal scaling parameter adjusts the width of glyphs by stretching or compressing them in the horizontal direction. Its value is specified as a percentage of the normal width of the glyphs, with 100 being the normal width. The scaling always applies to the horizontal coordinate in text space, independently of the writing mode. See Section 5.2.3 in PDF Reference Manual for details.
Parameters:
Name Type Description hscalenumber value to set horizontal scale to. Returns:
- Type
- Promise.<void>
-
setLeading(leading)
-
Sets the leading parameter. The leading parameter is measured in unscaled text space units. It specifies the vertical distance between the baselines of adjacent lines of text. See Section 5.2.4 in PDF Reference Manual for details.
Parameters:
Name Type Description leadingnumber number representing vertical distance between lines of text Returns:
- Type
- Promise.<void>
-
setLineCap(cap)
-
Sets LineCap style property. The line cap style specifies the shape to be used at the ends of open subpaths (and dashes, if any) when they are stroked.
Parameters:
Name Type Description capnumber PDFNet.GState.LineCap = { e_butt_cap : 0 e_round_cap : 1 e_square_cap : 2 }Returns:
- Type
- Promise.<void>
-
setLineJoin(join)
-
Sets LineJoin style property. The line join style specifies the shape to be used at the corners of paths that are stroked.
Parameters:
Name Type Description joinnumber PDFNet.GState.LineJoin = { e_miter_join : 0 e_round_join : 1 e_bevel_join : 2 }Returns:
- Type
- Promise.<void>
-
setLineWidth(width)
-
Sets the thickness of the line used to stroke a path.
Parameters:
Name Type Description widthnumber a non-negative number expressed in user space units. A line width of 0 denotes the thinnest line that can be rendered at device resolution: 1 device pixel wide. Returns:
- Type
- Promise.<void>
-
setMiterLimit(miter_limit)
-
Sets miter limit.
Parameters:
Name Type Description miter_limitnumber A number that imposes a maximum on the ratio of the miter length to the line width. When the limit is exceeded, the join is converted from a miter to a bevel. Returns:
- Type
- Promise.<void>
-
setOverprintMode(OPM)
-
Sets the overprint mode. Corresponds to the /OPM key within the ExtGState's dictionary.
Parameters:
Name Type Description OPMnumber overprint mode. Returns:
- Type
- Promise.<void>
-
setRenderingIntent(intent)
-
Sets the color intent to be used for rendering the Element.
Parameters:
Name Type Description intentnumber PDFNet.GState.RenderingIntent = { e_absolute_colorimetric : 0 e_relative_colorimetric : 1 e_saturation : 2 e_perceptual : 3 }Returns:
- Type
- Promise.<void>
-
setSmoothnessTolerance(SM)
-
Parameters:
Name Type Description SMnumber Returns:
- Type
- Promise.<void>
-
setSoftMask(SM)
-
Sets the soft mask of the extended graphics state. Corresponds to the /SMask key within the ExtGState's dictionary.
Parameters:
Name Type Description SMPDFNet.Obj SDF/Cos black-generation function or name Returns:
- Type
- Promise.<void>
-
setStrokeColor(pattern, c)
-
Set the stroke color to the given uncolored tiling pattern.
Parameters:
Name Type Description patternPDFNet.PatternColor pattern (PatternType = 1 and PaintType = 2) object. cPDFNet.ColorPt is a color in the pattern's underlying color space. Returns:
- Type
- Promise.<void>
-
setStrokeColorSpace(cs)
-
Sets the color space used for stroking operations
Parameters:
Name Type Description csPDFNet.ColorSpace ColorSpace object to use for stroking operations Returns:
- Type
- Promise.<void>
-
setStrokeColorWithColorPt(c)
-
Sets the color value/point used for stroking operations.
Parameters:
Name Type Description cPDFNet.ColorPt is the color used for stroking operations Returns:
- Type
- Promise.<void>
-
setStrokeColorWithPattern(pattern)
-
Set the stroke color to the given tiling pattern.
Parameters:
Name Type Description patternPDFNet.PatternColor SDF pattern object. Returns:
- Type
- Promise.<void>
-
setStrokeOpacity(ca)
-
Sets opacity value for stroke painting operations for paths and glyph outlines. Corresponds to the value of the /CA key in the ExtGState dictionary.
Parameters:
Name Type Description canumber value to set stroke opacity to Returns:
- Type
- Promise.<void>
-
setStrokeOverprint(OP)
-
specifies if overprint is enabled for stroke operations. Corresponds to the /OP key within the ExtGState's dictionary.
Parameters:
Name Type Description OPboolean true to enable overprint for stroke, false to disable. Returns:
- Type
- Promise.<void>
-
setTextKnockout(knockout)
-
Mark the object as elementary for purposes of color compositing in the transparent imaging model.
Parameters:
Name Type Description knockoutboolean Whether an object is elementary or not. Returns:
- Type
- Promise.<void>
-
setTextRenderMode(rmode)
-
Sets text rendering mode. The text rendering mode determines whether showing text causes glyph outlines to be stroked, filled, used as a clipping boundary, or some combination of the three. See Section 5.2.5 in PDF Reference Manual for details..
Parameters:
Name Type Description rmodenumber PDFNet.GState.TextRenderingMode = { e_fill_text : 0 e_stroke_text : 1 e_fill_stroke_text : 2 e_invisible_text : 3 e_fill_clip_text : 4 e_stroke_clip_text : 5 e_fill_stroke_clip_text : 6 e_clip_text : 7 }the mode that text will rendered with. rmode can take the following values: PDFNet.GState.TextRenderingMode = { e_fill_text : 0, e_stroke_text : 1, e_fill_stroke_text : 2, e_invisible_text : 3, e_fill_clip_text : 4, e_stroke_clip_text : 5, e_fill_stroke_clip_text : 6, e_clip_text : 7 }Returns:
- Type
- Promise.<void>
-
setTextRise(rise)
-
Sets text rise. Text rise specifies the distance, in unscaled text space units, to move the baseline up or down from its default location. Positive values of text rise move the baseline up
Parameters:
Name Type Description risenumber distance to move baseline up. Negative values move baseline down. Returns:
- Type
- Promise.<void>
-
setTransferFunct(TR)
-
Sets transfer function used during color conversion process. A transfer function adjusts the values of color components to compensate for nonlinear response in an output device and in the human eye. Corresponds to the /TR key within the ExtGState's dictionary.
Parameters:
Name Type Description TRPDFNet.Obj SDF/Cos transfer function, array, or name Returns:
- Type
- Promise.<void>
-
setTransform(a, b, c, d, h, v)
-
Set the transformation matrix associated with this element. A transformation matrix in PDF is specified by six numbers, usually in the form of an array containing six elements. In its most general form, this array is denoted [a b c d h v]; it can represent any linear transformation from one coordinate system to another. For more information about PDF matrices please refer to section 4.2.2 'Common Transformations' in PDF Reference Manual, and to documentation for pdftron::Common::Matrix2D class.
Parameters:
Name Type Description anumber horizontal 'scaling' component of the new text matrix. bnumber 'rotation' component of the new text matrix. cnumber 'rotation' component of the new text matrix. dnumber vertical 'scaling' component of the new text matrix. hnumber horizontal translation component of the new text matrix. vnumber vertical translation component of the new text matrix. Returns:
- Type
- Promise.<void>
-
setTransformMatrix(mtx)
-
Set the transformation matrix associated with this element.
Parameters:
Name Type Description mtxPDFNet.Matrix2D The new transformation for this text element. Returns:
- Type
- Promise.<void>
-
setUCRFunct(UCR)
-
Sets undercolor-removal function used during conversion between DeviceRGB and DeviceCMYK. Corresponds to the /UCR key within the ExtGState's dictionary.
Parameters:
Name Type Description UCRPDFNet.Obj SDF/Cos undercolor-removal function or name Returns:
- Type
- Promise.<void>
-
setWordSpacing(word_spacing)
-
Sets word spacing.
Parameters:
Name Type Description word_spacingnumber a number specified in unscaled text space units. Word spacing works the same way as character spacing, but applies only to the space character (char code 32). See Section 5.2.2 in PDF Reference Manual for details. Returns:
- Type
- Promise.<void>