,\n cursorX,\n cursorY\n );\n } else if (conf.object && !material) {\n \u002F\u002F The material setup for this model is a bit unorthodox\n \u002F\u002F We only want one material\n material = conf.active_material.split(\":\")[0];\n const itemPrice = pricing.Material[material];\n totalPrice += itemPrice;\n doc.text(`Material: ${material} - ${itemPrice}PDF Generation - CodeSandbox, cursorX, cursorY);\n } else {\n return;\n }\n cursorY += itemSize;\n });\n\n \u002F\u002F Total\n doc.setFontSize(totalSize);\n doc.text(`Total: ${totalPrice}PDF Generation - CodeSandbox, cursorX, cursorY);\n cursorY += itemSize;\n\n \u002F\u002F Image\n const base64 = await modelApi.takeScreenshot();\n doc.addImage(base64, \"PNG\", cursorX, cursorY, 120, 120);\n\n \u002F\u002F Send PDF to embed\n \u002F\u002F This doesn't work in a sandboxed environment, try locally :D\n const src = doc.output(\"bloburl\");\n document.getElementById(\"pdf\").src = src;\n\n \u002F\u002F Download PDF\n doc.save(\"XTR-8_Titan.pdf\");\n };\n\n document.getElementById(\"button\").addEventListener(\"click\", generatePDF);\n \u003C\u002Fscript\u003E\n \u003C\u002Fbody\u003E\n\u003C\u002Fhtml\u003E\n","id":"mod_JQrW1PnR5bQp9chYY9RHbC","is_binary":false,"title":"index.html","sha":null,"inserted_at":"2024-04-11T05:57:35","updated_at":"2024-08-07T14:17:43","upload_id":null,"shortid":"MWN4P","source_id":"src_5CWJAYVpiot6nfTHX8daAJ","directory_shortid":null}],"privacy":0};