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_transform
number e_rendering_intent
number e_stroke_cs
number e_stroke_color
number e_fill_cs
number e_fill_color
number e_line_width
number e_line_cap
number e_line_join
number e_flatness
number e_miter_limit
number e_dash_pattern
number e_char_spacing
number e_word_spacing
number e_horizontal_scale
number e_leading
number e_font
number e_font_size
number e_text_render_mode
number e_text_rise
number e_text_knockout
number e_text_pos_offset
number e_blend_mode
number e_opacity_fill
number e_opacity_stroke
number e_alpha_is_shape
number e_soft_mask
number e_smoothnes
number e_auto_stoke_adjust
number e_stroke_overprint
number e_fill_overprint
number e_overprint_mode
number e_transfer_funct
number e_BG_funct
number e_UCR_funct
number e_halftone
number e_null
number -
<static> BlendMode
-
Properties:
Name Type Description e_bl_compatible
number e_bl_normal
number e_bl_multiply
number e_bl_screen
number e_bl_difference
number e_bl_darken
number e_bl_lighten
number e_bl_color_dodge
number e_bl_color_burn
number e_bl_exclusion
number e_bl_hard_light
number e_bl_overlay
number e_bl_soft_light
number e_bl_luminosity
number e_bl_hue
number e_bl_saturation
number e_bl_color
number -
<static> LineCap
-
Properties:
Name Type Description e_butt_cap
number e_round_cap
number e_square_cap
number -
<static> LineJoin
-
Properties:
Name Type Description e_miter_join
number e_round_join
number e_bevel_join
number -
<static> RenderingIntent
-
Properties:
Name Type Description e_absolute_colorimetric
number e_relative_colorimetric
number e_saturation
number e_perceptual
number -
<static> TextRenderingMode
-
Properties:
Name Type Description e_fill_text
number e_stroke_text
number e_fill_stroke_text
number e_invisible_text
number e_fill_clip_text
number e_stroke_clip_text
number e_fill_stroke_clip_text
number e_clip_text
number
Methods
-
<static> getRenderingIntentType(name)
-
A utility function that maps a string representing a rendering intent to RenderingIntent type.
Parameters:
Name Type Description name
string 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 a
number horizontal 'scaling' component of the new text matrix. b
number 'rotation' component of the new text matrix. c
number 'rotation' component of the new text matrix. d
number vertical 'scaling' component of the new text matrix. h
number horizontal translation component of the new text matrix. v
number 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 mtx
PDFNet.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 AIS
boolean 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 SA
boolean 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 BG
PDFNet.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 BM
number 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_spacing
number 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_array
Array phase
number Returns:
- Type
- Promise.<void>
-
setFillColor(pattern, c)
-
Set the fill color to the given uncolored tiling pattern.
Parameters:
Name Type Description pattern
PDFNet.PatternColor PatternColor (PatternType = 1 and PaintType = 2) object. c
PDFNet.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 cs
PDFNet.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 c
PDFNet.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 pattern
PDFNet.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 ca
number 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 op
boolean 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 flatness
number 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 font
PDFNet.Font Font to draw the text with font_sz
number size of the font to draw the text with Returns:
- Type
- Promise.<void>
-
setHalftone(HT)
-
Parameters:
Name Type Description HT
PDFNet.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 hscale
number 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 leading
number 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 cap
number 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 join
number 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 width
number 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_limit
number 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 OPM
number overprint mode. Returns:
- Type
- Promise.<void>
-
setRenderingIntent(intent)
-
Sets the color intent to be used for rendering the Element.
Parameters:
Name Type Description intent
number 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 SM
number 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 SM
PDFNet.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 pattern
PDFNet.PatternColor pattern (PatternType = 1 and PaintType = 2) object. c
PDFNet.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 cs
PDFNet.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 c
PDFNet.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 pattern
PDFNet.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 ca
number 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 OP
boolean 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 knockout
boolean 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 rmode
number 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 rise
number 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 TR
PDFNet.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 a
number horizontal 'scaling' component of the new text matrix. b
number 'rotation' component of the new text matrix. c
number 'rotation' component of the new text matrix. d
number vertical 'scaling' component of the new text matrix. h
number horizontal translation component of the new text matrix. v
number 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 mtx
PDFNet.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 UCR
PDFNet.Obj SDF/Cos undercolor-removal function or name Returns:
- Type
- Promise.<void>
-
setWordSpacing(word_spacing)
-
Sets word spacing.
Parameters:
Name Type Description word_spacing
number 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>