Skip to content

KAZOO Support Channels

This documentation is curated by 2600Hz as part of the KAZOO open source project. Join our community forums here for peer support. Only features in the docs.2600hz.com/supported space are included as part of our 2600Hz Support Services plan.

monster.ui.renderPDF()#

Syntax#

monster.ui.renderPDF(file, target[, options]);

Parameters#

Key Description Type Default Required
file File received by a fileUpload plugin. File true
target Target in which the iframe containing the PDF will be added. jQuery true
options Object(#/options) false

options#

Key Description Type Default Required
width Width of the iframe. String 100% false
height Height of the iframe. String 700px false

Description#

This helper will take a file and show it in a container, in a PDF viewer

Example#

Preview an uploaded file#

template
  .find('#upload')
    .fileUpload({
      inputOnly: true,
      wrapperClass: 'file-upload input-append',
      btnClass: 'monster-button',
      success: function(results) {
        monster.ui.renderPDF(results[0].file, template.find('.pdf-container'));
      }
    });