Printing a page of multiple markdown components with downloadPage

,

I have a Retool app that builds a "dossier" of some system activity. There are currently three main "tables" that I have implemented as dynamic markdown (so that they scale vertically to accommodate the FULL contents). When I call downloadFile, or when I try and print from the browser, it cuts off the output at the first page. In the case of downloadPage, it looks like it TRIES to handle more content, but it still chops off way too early. How can I print the full page?

Hi @djmax can you send a screenshot of your setup for which the tables are dynamic markdown to accommodate scaling vertically? It would be great if you could share a sample app json file or the exact steps to take to reproduce the clipped pdf download.

{
  "uuid": "e1fbcdc6-23b7-11ed-a781-1f3183a34499",
  "page": {
    "id": 89949925,
    "data": {
      "appState": "[\"~#iR\",[\"^ \",\"n\",\"appTemplate\",\"v\",[\"^ \",\"isFetching\",false,\"plugins\",[\"~#iOM\",[\"$main\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"$main\",\"type\",\"frame\",\"subtype\",\"Frame\",\"namespace\",null,\"resourceName\",null,\"resourceDisplayName\",null,\"template\",[\"^3\",[\"type\",\"main\",\"sticky\",false]],\"style\",[\"^3\",[]],\"position2\",null,\"mobilePosition2\",null,\"mobileAppPosition\",null,\"tabIndex\",null,\"container\",\"\",\"createdAt\",\"~m1661350821008\",\"updatedAt\",\"~m1661350821008\",\"folder\",\"\",\"screen\",null]]],\"text1\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"text1\",\"^4\",\"widget\",\"^5\",\"TextWidget2\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"heightType\",\"auto\",\"horizontalAlign\",\"left\",\"hidden\",false,\"imageWidth\",\"fit\",\"showInEditor\",false,\"verticalAlign\",\"center\",\"tooltipText\",\"\",\"value\",\"| Fake Table |\\n| ---------- |\\n{{\\nnew Array(1000).fill(0)\\n  .map((z, i) => `| Row ${i} |`)\\n  .join('\\\\n')\\n}}\",\"disableMarkdown\",false,\"overflowType\",\"scroll\",\"maintainSpaceWhenHidden\",false]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"rowGroup\",\"body\",\"subcontainer\",\"\",\"row\",0,\"col\",0,\"height\",0.6,\"width\",3,\"tabNum\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1661350840687\",\"^A\",\"~m1661350910320\",\"^B\",\"\",\"^C\",null]]],\"button1\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"button1\",\"^4\",\"widget\",\"^5\",\"ButtonWidget2\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"horizontalAlign\",\"stretch\",\"clickable\",false,\"iconAfter\",\"\",\"submitTargetId\",null,\"hidden\",false,\"text\",\"Get PDF\",\"showInEditor\",false,\"tooltipText\",\"\",\"styleVariant\",\"solid\",\"submit\",false,\"iconBefore\",\"\",\"events\",[\"~#iL\",[[\"^3\",[\"event\",\"click\",\"type\",\"script\",\"method\",\"run\",\"pluginId\",\"\",\"targetId\",null,\"params\",[\"^3\",[\"src\",\"utils.downloadPage(\\\"testPrint.pdf\\\")\"]],\"waitType\",\"debounce\",\"waitMs\",\"0\"]]]],\"loading\",false,\"loaderPosition\",\"auto\",\"disabled\",false,\"maintainSpaceWhenHidden\",false]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"^D\",\"body\",\"^E\",\"\",\"row\",0.6,\"col\",5,\"^F\",1,\"^G\",3,\"^H\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1661350944766\",\"^A\",\"~m1661350964956\",\"^B\",\"\",\"^C\",null]]]]],\"^@\",null,\"version\",\"2.98.0\",\"appThemeId\",null,\"preloadedAppJavaScript\",null,\"preloadedAppJSLinks\",[],\"testEntities\",[],\"tests\",[],\"appStyles\",\"\",\"responsiveLayoutDisabled\",false,\"loadingIndicatorsDisabled\",false,\"urlFragmentDefinitions\",[\"^I\",[]],\"pageLoadValueOverrides\",[\"^I\",[]],\"customDocumentTitle\",\"\",\"customDocumentTitleEnabled\",false,\"customShortcuts\",[],\"isGlobalWidget\",false,\"isMobileApp\",false,\"multiScreenMobileApp\",false,\"folders\",[\"^I\",[]],\"queryStatusVisibility\",true,\"markdownLinkBehavior\",\"auto\",\"inAppRetoolPillAppearance\",\"NO_OVERRIDE\",\"rootScreen\",null,\"instrumentationEnabled\",false,\"experimentalPerfFeatures\",[\"^ \",\"batchCommitModelEnabled\",false,\"skipDepCycleCheckingEnabled\",false,\"serverDepGraphEnabled\",false,\"useRuntimeV2\",false],\"experimentalDataTabEnabled\",false]]]"
    },
    "changesRecord": [
      {
        "type": "WIDGET_TEMPLATE_UPDATE",
        "payload": {
          "plugin": {
            "id": "button1",
            "type": "widget",
            "style": {},
            "folder": "",
            "subtype": "ButtonWidget2",
            "template": {
              "text": "Get PDF",
              "events": [
                {
                  "type": "script",
                  "event": "click",
                  "method": "run",
                  "params": {
                    "src": "utils.downloadPage(\"\")"
                  },
                  "waitMs": "0",
                  "pluginId": "",
                  "waitType": "debounce"
                }
              ],
              "hidden": false,
              "submit": false,
              "loading": false,
              "disabled": false,
              "clickable": false,
              "iconAfter": "",
              "iconBefore": "",
              "tooltipText": "",
              "showInEditor": false,
              "styleVariant": "solid",
              "loaderPosition": "auto",
              "submitTargetId": null,
              "horizontalAlign": "stretch",
              "maintainSpaceWhenHidden": false
            },
            "container": "",
            "createdAt": "2022-08-24T14:22:24.766Z",
            "position2": {
              "col": 5,
              "row": 0.6,
              "width": 3,
              "height": 1,
              "tabNum": 0,
              "rowGroup": "body",
              "container": "",
              "subcontainer": ""
            },
            "updatedAt": "2022-08-24T14:22:39.460Z"
          },
          "update": {
            "events": [
              {
                "type": "script",
                "event": "click",
                "method": "run",
                "params": {
                  "src": "utils.downloadPage(\"testPrint.pdg\")"
                },
                "waitMs": "0",
                "pluginId": "",
                "waitType": "debounce"
              }
            ]
          },
          "widgetId": "button1",
          "shouldRecalculateTemplate": true
        },
        "isUserTriggered": true
      },
      {
        "type": "WIDGET_TEMPLATE_UPDATE",
        "payload": {
          "plugin": {
            "id": "button1",
            "type": "widget",
            "style": {},
            "folder": "",
            "subtype": "ButtonWidget2",
            "template": {
              "text": "Get PDF",
              "events": [
                {
                  "type": "script",
                  "event": "click",
                  "method": "run",
                  "params": {
                    "src": "utils.downloadPage(\"testPrint.pdg\")"
                  },
                  "waitMs": "0",
                  "pluginId": "",
                  "waitType": "debounce"
                }
              ],
              "hidden": false,
              "submit": false,
              "loading": false,
              "disabled": false,
              "clickable": false,
              "iconAfter": "",
              "iconBefore": "",
              "tooltipText": "",
              "showInEditor": false,
              "styleVariant": "solid",
              "loaderPosition": "auto",
              "submitTargetId": null,
              "horizontalAlign": "stretch",
              "maintainSpaceWhenHidden": false
            },
            "container": "",
            "createdAt": "2022-08-24T14:22:24.766Z",
            "position2": {
              "col": 5,
              "row": 0.6,
              "width": 3,
              "height": 1,
              "tabNum": 0,
              "rowGroup": "body",
              "container": "",
              "subcontainer": ""
            },
            "updatedAt": "2022-08-24T14:22:42.108Z"
          },
          "update": {
            "events": [
              {
                "type": "script",
                "event": "click",
                "method": "run",
                "params": {
                  "src": "utils.downloadPage(\"testPrint.pdf\")"
                },
                "waitMs": "0",
                "pluginId": "",
                "waitType": "debounce"
              }
            ]
          },
          "widgetId": "button1",
          "shouldRecalculateTemplate": true
        },
        "isUserTriggered": true
      },
      {
        "type": "WIDGET_TEMPLATE_UPDATE",
        "payload": {
          "plugin": {
            "id": "button1",
            "type": "widget",
            "style": {},
            "folder": "",
            "subtype": "ButtonWidget2",
            "template": {
              "text": "Get PDF",
              "events": [
                {
                  "type": "script",
                  "event": "click",
                  "method": "run",
                  "params": {
                    "src": "utils.downloadPage(\"testPrint.pdf\")"
                  },
                  "waitMs": "0",
                  "pluginId": "",
                  "waitType": "debounce"
                }
              ],
              "hidden": false,
              "submit": false,
              "loading": false,
              "disabled": false,
              "clickable": false,
              "iconAfter": "",
              "iconBefore": "",
              "tooltipText": "",
              "showInEditor": false,
              "styleVariant": "solid",
              "loaderPosition": "auto",
              "submitTargetId": null,
              "horizontalAlign": "stretch",
              "maintainSpaceWhenHidden": false
            },
            "container": "",
            "createdAt": "2022-08-24T14:22:24.766Z",
            "position2": {
              "col": 5,
              "row": 0.6,
              "width": 3,
              "height": 1,
              "tabNum": 0,
              "rowGroup": "body",
              "container": "",
              "subcontainer": ""
            },
            "updatedAt": "2022-08-24T14:22:42.748Z"
          },
          "update": {
            "events": [
              {
                "type": "script",
                "event": "click",
                "method": "run",
                "params": {
                  "src": "utils.downloadPage(\"testPrint.pdf\");"
                },
                "waitMs": "0",
                "pluginId": "",
                "waitType": "debounce"
              }
            ]
          },
          "widgetId": "button1",
          "shouldRecalculateTemplate": true
        },
        "isUserTriggered": true
      },
      {
        "type": "WIDGET_TEMPLATE_UPDATE",
        "payload": {
          "plugin": {
            "id": "button1",
            "type": "widget",
            "style": {},
            "folder": "",
            "subtype": "ButtonWidget2",
            "template": {
              "text": "Get PDF",
              "events": [
                {
                  "type": "script",
                  "event": "click",
                  "method": "run",
                  "params": {
                    "src": "utils.downloadPage(\"testPrint.pdf\");"
                  },
                  "waitMs": "0",
                  "pluginId": "",
                  "waitType": "debounce"
                }
              ],
              "hidden": false,
              "submit": false,
              "loading": false,
              "disabled": false,
              "clickable": false,
              "iconAfter": "",
              "iconBefore": "",
              "tooltipText": "",
              "showInEditor": false,
              "styleVariant": "solid",
              "loaderPosition": "auto",
              "submitTargetId": null,
              "horizontalAlign": "stretch",
              "maintainSpaceWhenHidden": false
            },
            "container": "",
            "createdAt": "2022-08-24T14:22:24.766Z",
            "position2": {
              "col": 5,
              "row": 0.6,
              "width": 3,
              "height": 1,
              "tabNum": 0,
              "rowGroup": "body",
              "container": "",
              "subcontainer": ""
            },
            "updatedAt": "2022-08-24T14:22:44.220Z"
          },
          "update": {
            "events": [
              {
                "type": "script",
                "event": "click",
                "method": "run",
                "params": {
                  "src": "utils.downloadPage(\"testPrint.pdf\")"
                },
                "waitMs": "0",
                "pluginId": "",
                "waitType": "debounce"
              }
            ]
          },
          "widgetId": "button1",
          "shouldRecalculateTemplate": true
        },
        "isUserTriggered": true
      }
    ],
    "gitSha": null,
    "checksum": null,
    "createdAt": "2022-08-24T14:22:47.153Z",
    "updatedAt": "2022-08-24T14:22:47.153Z",
    "pageId": 1381133,
    "userId": 184883,
    "branchId": null
  },
  "modules": {}
}

@djmax thanks seems like a possible bug or just a possible incompatibility. The community forum will be a good place to track what other users come up with as workarounds. I know our PDF utilities is one that has been substituted for other imported libraries in past threads on our forum. I'll be in touch if anyone surfaces the bug on our side with a solution, thanks again!