exports the current view to a PDF document (can be used for printing)

void toPDF(string url, [string mode] );
urlstringthe path to the server-side PDF converter
modestringthe color map of the resulting PDF document




The method requires the pdf plugin to be enabled.

The second parameter (mode) of the method can take only one of the values from the predefined set:

  • 'color' - full-color printing (default)
  • 'gray' - prints in shades of black and white
  • 'bw' - prints in black and white only, no color options available
  • 'custom' - can be used to enable a custom color map. Requires php coding (details)
  • 'fullcolor' - actual background and text colors that are used while exporting
See also
Back to top