Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Where in this code should I add custom sizes for the application?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 672
    Answer it

    I have created a script within Google Scripts Editor so that when a user clicks on a menu on the toolbar in Google Sheets it brings up an application box where users click to print.

    However, i'm not sure how I could add custom sizes for that application box that appears without messing up the code.

    function onOpen() {
          .createMenu('Click to print')
          .addItem('Print from Google Cloud', 'openDialog')
    function openDialog() {
    var html = HtmlService.createHtmlOutputFromFile('Index')
        .showModalDialog(html, 'Click the button below to print using the Google Cloud Print service.');

    and the index.html code is:

    <!DOCTYPE html>
        <base target="_top">
        <script src="">
      window.onload = function() {
        var gadget = new cloudprint.Gadget();
                var liabilityWaiver = waiver.getAs(MimeType.PDF);
        gadget.setPrintDocument("url", "Test Page", "");
        <div id="button"></div>

    Below are image explanations of what the script does:


    As you can see from the last image, that is where the problem is, the application box is too small to fit all of the information on it, therefore cutting it out.

 0 Answer(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: