New Articles

  1. sgapiTablePDF(%%pdf, %%data, %%cols, %%title, %%options)

    This function adds a table to the given PDF. Parameters %%pdf - The title of the PDF you are creating. %%data = array() - The array of data to include in the table. %%cols= array() - The array of column headers. %%title - The table t...
  2. sgapiTextPDF(%%pdf, %%text, %%size, %%options, %%test)

    This function adds text to the given PDF. Parameters %%pdf - The title of the PDF you are creating. %%text - The text to add to the PDF. %%size - The font size (default is 12 ). %%option = array () - 'left' => number - gap to leav...
  3. sgapiNewPagePDF(%%pdf)

    This function creates a new page in the given pdf. For more info on PHP PDF Creation visit: https://github.com/rospdf/pdf-php/blob/master/readme.pdf Example The below script can be included when building a PDF object to start a...
  4. sgapiSetColorPDF(%%pdf, %%r, %%g, %%b)

    This function sets the text color for the given pdf.  %%r, %%g, %%b are set to 0 (black) by default. For more info on PHP PDF Creation visit: https://github.com/rospdf/pdf-php/blob/master/readme.pdf Example The below script creates and build...
  5. sgapiSetFontPDF(%%pdf, %%font, %%style)

    This function sets the font and style of the given pdf (%%font is "Helvetica" and %%style is "Null" by default). %%font options %%style options 'adobearabic' 'BoldItalic','Italic','Bold' 'adobehebrew' 'BoldItalic','Italic','Bold' ...
  6. sgapiNewPDF(%%pdf, %%paper, %%orientation)

    This function creates a PDF object that you can store, build and output and send via the sgapiEmailSend function.  Parameters %%pdf - The title of the PDF you are creating. %%paper - The paper size, e.g. 'letter', 'legal', 'a4' (%%paper is...
  7. sgapiEvaluateMergeCodes(%%code)

    This function returns the value for the given merge code. Merge codes need to be wrapped in single quotes ' ' so that they are represented as strings. Example In this function we are evaluating and returning the value from the fir...
  8. sgapiStrCaseCmp(%%str1,%%str2,%%case=false)

    This is equivalent to the strcasecmp function in PHP. This function will compare %%str1 with %%str2 in a case-insensitive manner when %%case=false. The results are returned as either a negative number (str1 < str2), 0 (match), or a positive numbe...
  9. sgapiMd5(%%string)

    This is equivalent to the md5 function in PHP. It returns the MD5 hash of the provided string. Can be used to compare two strings for an exact match by comparing their MD5 hash values. To see an example or learn more other PHP functions a...
  10. sgapiIs_Null(%%variable)

    This is equivalent to the is_null function in PHP. Returns either TRUE or FALSE if the variable passed is null. To see an example or learn more other PHP functions and PHP programming visit PHP Documentation . ...