Knowledge Base - Set/Get Global values

Below you can find methods to get and set globals property programmatically: 

  • Get a Global value:

RadaeePDFPlugin.getGlobal(

{

  name: “g_render_mode” //property name in globals’ class

 },

 function(message) {

   console.log("Success: " + message);

 },

 function(err) {

  console.log("Failure: " + err);

});

 

  • Set a Global value:

RadaeePDFPlugin.setGlobal(

{

  name: “g_render_mode”, //property name in globals’ class

value: 3 //value to be set

 },

 function(message) {

   console.log("Success: " + message);

 },

 function(err) {

  console.log("Failure: " + err);

});

 

Now globals property are aligned with the same name.

 

For Android users: this update effects the Cordova plugin only, and not the original variable nomenclature in the native Android SDK.

For iOS users: this update should have effect on every plugin (Cordova, Xamarin, Swift) and also on iOS native SDK.

 

Here’s new complete global list:



Property name

Type

Effect

g_annot_highlight_clr

int (hex)

Changes the color of highlight annots

g_annot_lock

boolean

Enable/Disable annot locked property

g_annot_readonly

boolean

Enable/Disable annot readonly property

g_annot_squiggly_clr

int (hex)

Changes the color of squiggle annots

g_annot_strikeout_clr

int (hex)

Changes the color of strikeout annots

g_annot_transparency

int (hex)

Changes annotations' transparency

g_annot_underline_clr

int (hex)

Change underline annot's color

g_author

string

if valorized, will be used to set the annotation author while its creation

g_auto_launch_link

boolean

if true the link action will be performed immediately otherwise the user must click on the play button

g_case_sensitive

boolean

Enable/Disable case sensitive on searching

g_dark_mode

boolean

Changes the reader mode to dark

g_ellipse_annot_fill_color

int (hex)

Chages ellipse annot's fill color

g_enable_graphical_signature

boolean

Enable/Disable signature annot management

g_execute_annot_JS

boolean

Enable/Disable JS annot's execution

g_find_primary_color

int (hex)

Changes the color of the selected find item

g_fit_signature_to_field

boolean

Enable/Disable blank space trimming in the signature bitmap

g_highlight_annotation

boolean

Enable/Disable highlighting annotation on selection

g_ink_color

int (hex)

Changes the color of ink annots

g_ink_width

float

Changes the width of ink annots

g_line_annot_fill_color

int (hex)

Changes line annot's fill color

g_line_annot_style1

int

Change line annot style for start point

g_line_annot_style2

int

Change line annot style for end point

g_line_color

int (hex)

Change line annot's color

g_line_width

float

Change line annot's width

g_match_whole_word

boolean

Enable/disable matching whole word on searching

g_navigation_mode

int

navigation mode, 0:thumbnail view 1:seekbar view

g_oval_color

int (hex)

Change ellipse annot's color

g_oval_width

float

Change ellipse anno's width

g_readerview_bg_color

int (hex)

Changes reader view's background color

g_rect_annot_fill_color

int (hex)

Changes rect annot's fill color

g_rect_color

int (hex)

Changes rect annot's color

g_rect_width

float

Changes rect annot's width

g_render_mode

int

Defines the view of the reader:

0 : vertical

1 : horizontal

2 : curl effect (another curl class http://www.radaeepdf.com/support/knowledge-base?view=kb&tmpl=component&kbartid=21)

3 : single page

4 : SingleEx

5 : Text Reflow

6 : Two pages in landscape

g_render_quality

int

Defines the render quality


0 : draft

1 : normal

2 : best

g_save_doc

boolean

Automatically save the document on close.

g_sel_color

int (hex)

Changes the selection color

g_sel_right

boolean

Defines if the text selection starts from right to left or the opposite

g_sign_pad_descr

string

Defines description in add signature view

g_static_scale

boolean

when true it calculates the scale of each page, when false it calculates scale according to the dimensions of the largest page

g_thumbview_bg_color

int (hex)

Defines thumbview background color

g_thumbview_height

int

Defines thumbview height

g_zoom_level

float

Defines the zoom level from 2 to 5

g_zoom_step

float

Defines the double tap zoom step

 

Applies To

RadaeePDF SDK for Cordova

Details

Created : 2020-03-16 10:39:53, Last Modified : 2020-03-23 16:41:17

Order history

Login to handle your order history.