frappe / print_designer

Visual print designer for Frappe / ERPNext
GNU Affero General Public License v3.0
179 stars 101 forks source link

Unable to generate PDF #304

Closed 2old4thisShit closed 4 days ago

2old4thisShit commented 4 days ago

Whenever I try to print a print format I get this error

image

Format:

{"name":"Esq Lemos","owner":"Administrator","creation":"2024-06-24 16:20:55.543070","modified":"2024-06-24 16:23:29.514722","modified_by":"Administrator","docstatus":0,"idx":0,"print_designer_print_format":"{\"header\":{\"firstPage\":[],\"oddPage\":[],\"evenPage\":[],\"lastPage\":[]},\"body\":[{\"index\":0,\"type\":\"page\",\"childrens\":[{\"id\":\"aeBMFnhHtJ\",\"type\":\"rectangle\",\"DOMRef\":null,\"childrens\":[{\"id\":\"xtZcDZOzoT\",\"type\":\"text\",\"content\":\"\",\"contenteditable\":false,\"isDynamic\":true,\"isFixedSize\":true,\"dynamicContent\":[{\"doctype\":\"\",\"parentField\":\"\",\"fieldname\":\"contenido_esquela\",\"value\":\"\",\"fieldtype\":\"Text Editor\",\"label\":\"Contenido :\",\"suffix\":null,\"is_labelled\":false,\"is_static\":false,\"print_hide\":0,\"style\":{},\"labelStyle\":{},\"nextLine\":true,\"labelStyleEditing\":false}],\"selectedDynamicText\":null,\"isDraggable\":true,\"isResizable\":true,\"isDropZone\":false,\"startX\":4,\"startY\":175.0787401595,\"pageX\":662,\"pageY\":372,\"width\":598,\"height\":882,\"styleEditMode\":\"main\",\"labelDisplayStyle\":\"standard\",\"style\":{\"zIndex\":0},\"labelStyle\":{},\"isDynamicHeight\":true,\"classes\":[],\"isElementOverlapping\":false,\"heightType\":\"auto\",\"index\":0}],\"isDraggable\":false,\"isResizable\":false,\"isDropZone\":false,\"startX\":0,\"startY\":-170.0787401595,\"pageX\":4,\"pageY\":-170.0787401595,\"width\":604.7246220449999,\"height\":1057.0787401595,\"styleEditMode\":\"main\",\"style\":{},\"classes\":[\"relative-row\"],\"layoutType\":\"row\",\"heightType\":\"auto\"}],\"isDropZone\":true,\"snapPoints\":[null,null],\"snapEdges\":[null,null,null,null],\"isDraggable\":false,\"isResizable\":true}],\"footer\":{\"firstPage\":[],\"oddPage\":[],\"evenPage\":[],\"lastPage\":[]}}","print_designer_settings":"{\"page\":{\"height\":1122.52,\"width\":793.701,\"marginTop\":170.0787401595,\"marginBottom\":56.692913386499995,\"marginLeft\":94.4881889775,\"marginRight\":94.4881889775,\"headerHeight\":-170.0787401595,\"footerHeight\":-170.0787401595,\"headerHeightWithMargin\":0,\"footerHeightWithMargin\":-113.385826773,\"UOM\":\"mm\"},\"pdfPrintDPI\":96,\"globalStyles\":{\"staticText\":{\"isGlobalStyle\":true,\"styleEditMode\":\"main\",\"labelDisplayStyle\":\"standard\",\"type\":\"text\",\"isDynamic\":false,\"mainRuleSelector\":\".staticText\",\"style\":{\"display\":\"inline-block\",\"fontFamily\":\"Inter\",\"fontSize\":\"14px\",\"fontWeight\":400,\"color\":\"#000000\",\"textAlign\":\"left\",\"fontStyle\":\"normal\",\"textDecoration\":\"none\",\"textTransform\":\"none\",\"lineHeight\":1.25,\"letterSpacing\":\"0px\",\"contenteditable\":false,\"border\":\"none\",\"borderWidth\":\"0px\",\"borderColor\":\"#000000\",\"borderStyle\":\"solid\",\"borderRadius\":0,\"backgroundColor\":\"\",\"paddingTop\":\"0px\",\"paddingBottom\":\"0px\",\"paddingLeft\":\"0px\",\"paddingRight\":\"0px\",\"margin\":\"0px\",\"minWidth\":\"0px\",\"minHeight\":\"0px\",\"boxShadow\":\"none\",\"overflow\":\"hidden\",\"overflowWrap\":\"break-word\",\"whiteSpace\":\"normal\",\"userSelect\":\"none\",\"opacity\":1,\"zIndex\":1},\"mainCssRule\":{}},\"dynamicText\":{\"isGlobalStyle\":true,\"styleEditMode\":\"main\",\"labelDisplayStyle\":\"standard\",\"type\":\"text\",\"isDynamic\":true,\"mainRuleSelector\":\".dynamicText\",\"labelRuleSelector\":\".dynamicText .label-text\",\"style\":{\"display\":\"inline-block\",\"fontFamily\":\"Inter\",\"fontSize\":\"14px\",\"fontWeight\":400,\"color\":\"#000000\",\"textAlign\":\"left\",\"fontStyle\":\"normal\",\"textDecoration\":\"none\",\"textTransform\":\"none\",\"lineHeight\":1.25,\"letterSpacing\":\"0px\",\"contenteditable\":false,\"border\":\"none\",\"borderWidth\":\"0px\",\"borderColor\":\"#000000\",\"borderStyle\":\"solid\",\"borderRadius\":0,\"backgroundColor\":\"\",\"paddingTop\":\"0px\",\"paddingBottom\":\"0px\",\"paddingLeft\":\"0px\",\"paddingRight\":\"0px\",\"margin\":\"0px\",\"minWidth\":\"0px\",\"minHeight\":\"0px\",\"boxShadow\":\"none\",\"overflow\":\"hidden\",\"overflowWrap\":\"break-word\",\"whiteSpace\":\"normal\",\"userSelect\":\"none\",\"opacity\":1},\"labelStyle\":{\"fontFamily\":\"Inter\",\"fontSize\":\"14px\",\"fontWeight\":600,\"color\":\"#000000\",\"textAlign\":\"left\",\"fontStyle\":\"normal\",\"textDecoration\":\"none\",\"textTransform\":\"none\",\"lineHeight\":1.25,\"letterSpacing\":\"0px\",\"border\":\"none\",\"borderWidth\":\"0px\",\"borderColor\":\"#000000\",\"borderStyle\":\"solid\",\"borderRadius\":0,\"backgroundColor\":\"\",\"paddingTop\":\"0px\",\"paddingBottom\":\"0px\",\"paddingLeft\":\"0px\",\"paddingRight\":\"0px\",\"margin\":\"0px\",\"minWidth\":\"0px\",\"minHeight\":\"0px\",\"boxShadow\":\"none\",\"whiteSpace\":\"normal\",\"userSelect\":\"none\",\"opacity\":1,\"zIndex\":1},\"mainCssRule\":{},\"labelCssRule\":{}},\"rectangle\":{\"isGlobalStyle\":true,\"styleEditMode\":\"main\",\"type\":\"rectangle\",\"isDynamic\":false,\"mainRuleSelector\":\".rectangle\",\"style\":{\"paddingTop\":\"0px\",\"paddingBottom\":\"0px\",\"paddingLeft\":\"0px\",\"paddingRight\":\"0px\",\"margin\":\"0px\",\"whiteSpace\":\"normal\",\"userSelect\":\"none\",\"minWidth\":\"0px\",\"minHeight\":\"0px\",\"color\":\"#000000\",\"backgroundColor\":\"\",\"border\":\"1px solid black\",\"borderColor\":\"#000000\",\"borderStyle\":\"solid\",\"borderWidth\":\"1px\",\"boxSizing\":\"border-box\",\"outline\":\"none\",\"borderRadius\":0,\"boxShadow\":\"none\",\"opacity\":1,\"zIndex\":0},\"mainCssRule\":{}},\"image\":{\"isGlobalStyle\":true,\"styleEditMode\":\"main\",\"type\":\"image\",\"isDynamic\":false,\"mainRuleSelector\":\".image\",\"style\":{\"display\":\"block\",\"border\":\"none\",\"borderWidth\":\"0px\",\"borderColor\":\"#000000\",\"borderStyle\":\"solid\",\"borderRadius\":0,\"backgroundColor\":\"\",\"paddingTop\":\"0px\",\"paddingBottom\":\"0px\",\"paddingLeft\":\"0px\",\"paddingRight\":\"0px\",\"margin\":\"0px\",\"minWidth\":\"0px\",\"minHeight\":\"0px\",\"boxShadow\":\"none\",\"whiteSpace\":\"normal\",\"userSelect\":\"none\",\"objectFit\":\"scale-down\",\"objectPosition\":\"center center\",\"backgroundSize\":\"contain\",\"backgroundPosition\":\"center center\",\"backgroundRepeat\":\"no-repeat\",\"opacity\":1},\"mainCssRule\":{}},\"barcode\":{\"isGlobalStyle\":true,\"styleEditMode\":\"main\",\"type\":\"barcode\",\"isDynamic\":false,\"mainRuleSelector\":\".barcode\",\"style\":{\"display\":\"block\",\"border\":\"none\",\"borderWidth\":\"0px\",\"borderColor\":\"#000000\",\"borderStyle\":\"solid\",\"borderRadius\":0,\"backgroundColor\":\"\",\"paddingTop\":\"0px\",\"paddingBottom\":\"0px\",\"paddingLeft\":\"0px\",\"paddingRight\":\"0px\",\"margin\":\"0px\",\"minWidth\":\"0px\",\"minHeight\":\"0px\",\"boxShadow\":\"none\",\"whiteSpace\":\"normal\",\"userSelect\":\"none\",\"opacity\":1},\"mainCssRule\":{}},\"table\":{\"isGlobalStyle\":true,\"styleEditMode\":\"main\",\"labelDisplayStyle\":\"standard\",\"type\":\"table\",\"isDynamic\":true,\"mainRuleSelector\":\".printTable td\",\"headerRuleSelector\":\".printTable th\",\"altRuleSelector\":\".printTable tr:nth-child(even) td\",\"labelRuleSelector\":\".printTable .label-text\",\"style\":{\"fontFamily\":\"Inter\",\"fontSize\":\"10px\",\"fontWeight\":400,\"color\":\"#000000\",\"textAlign\":\"left\",\"fontStyle\":\"normal\",\"textDecoration\":\"none\",\"textTransform\":\"none\",\"lineHeight\":1.25,\"letterSpacing\":\"0px\",\"contenteditable\":false,\"border\":\"none\",\"borderWidth\":\"1px\",\"borderColor\":\"#000000\",\"borderStyle\":\"solid\",\"borderRadius\":0,\"backgroundColor\":\"#ffffff\",\"paddingTop\":\"10px\",\"paddingBottom\":\"10px\",\"paddingLeft\":\"10px\",\"paddingRight\":\"10px\",\"margin\":\"0px\",\"minWidth\":\"0px\",\"minHeight\":\"0px\",\"boxShadow\":\"none\",\"overflowWrap\":\"break-word\",\"whiteSpace\":\"normal\",\"userSelect\":\"none\",\"verticalAlign\":\"baseline\",\"opacity\":1},\"labelStyle\":{\"fontFamily\":\"Inter\",\"fontSize\":\"10px\",\"fontWeight\":600,\"color\":\"#000000\",\"textAlign\":\"left\",\"fontStyle\":\"normal\",\"textDecoration\":\"none\",\"textTransform\":\"none\",\"lineHeight\":1.25,\"letterSpacing\":\"0px\",\"border\":\"none\",\"borderWidth\":\"0px\",\"borderColor\":\"#000000\",\"borderStyle\":\"solid\",\"borderRadius\":0,\"backgroundColor\":\"#ffffff\",\"paddingTop\":\"0px\",\"paddingBottom\":\"0px\",\"paddingLeft\":\"0px\",\"paddingRight\":\"0px\",\"margin\":\"0px\",\"minWidth\":\"0px\",\"minHeight\":\"0px\",\"boxShadow\":\"none\",\"whiteSpace\":\"normal\",\"userSelect\":\"none\",\"opacity\":1,\"verticalAlign\":\"baseline\",\"zIndex\":1},\"headerStyle\":{\"fontFamily\":\"Inter\",\"fontSize\":\"11px\",\"fontWeight\":600,\"color\":\"#000000\",\"textAlign\":\"left\",\"fontStyle\":\"normal\",\"textDecoration\":\"none\",\"textTransform\":\"none\",\"lineHeight\":1.25,\"letterSpacing\":\"0px\",\"border\":\"none\",\"borderWidth\":\"1px\",\"borderColor\":\"#000000\",\"borderStyle\":\"solid\",\"borderRadius\":0,\"backgroundColor\":\"#ffffff\",\"paddingTop\":\"10px\",\"paddingBottom\":\"10px\",\"paddingLeft\":\"10px\",\"paddingRight\":\"10px\",\"margin\":\"0px\",\"minWidth\":\"0px\",\"minHeight\":\"0px\",\"boxShadow\":\"none\",\"whiteSpace\":\"normal\",\"userSelect\":\"none\",\"opacity\":1,\"zIndex\":1},\"altStyle\":{},\"mainCssRule\":{},\"labelCssRule\":{},\"headerCssRule\":{},\"altCssRule\":{}}},\"currentPageSize\":\"CUSTOM\",\"isHeaderFooterAuto\":true,\"currentDoc\":\"EXP-2023-000135\",\"textControlType\":\"dynamic\",\"currentFonts\":[\"Inter\"],\"printHeaderFonts\":null,\"printFooterFonts\":null,\"printBodyFonts\":{\"Inter\":{\"weight\":[400,600],\"italic\":[]}},\"userProvidedJinja\":\"\",\"schema_version\":\"1.3.0\"}","print_designer_header":"[{\"type\":\"page\",\"childrens\":[],\"firstPage\":true,\"oddPage\":true,\"evenPage\":true,\"lastPage\":true}]","print_designer_footer":"[{\"type\":\"page\",\"childrens\":[],\"firstPage\":true,\"oddPage\":true,\"evenPage\":true,\"lastPage\":true}]","print_designer_body":"[{\"index\":0,\"type\":\"page\",\"childrens\":[{\"id\":\"xtZcDZOzoT\",\"type\":\"text\",\"content\":\"\",\"contenteditable\":false,\"isDynamic\":true,\"isFixedSize\":true,\"dynamicContent\":[{\"doctype\":\"\",\"parentField\":\"\",\"fieldname\":\"contenido_esquela\",\"value\":\"\",\"fieldtype\":\"Text Editor\",\"label\":\"Contenido :\",\"suffix\":null,\"is_labelled\":false,\"is_static\":false,\"print_hide\":0,\"style\":{},\"labelStyle\":{},\"nextLine\":true,\"labelStyleEditing\":false}],\"selectedDynamicText\":null,\"isDraggable\":true,\"isResizable\":true,\"isDropZone\":false,\"startX\":4,\"startY\":5,\"pageX\":662,\"pageY\":372,\"width\":598,\"height\":882,\"styleEditMode\":\"main\",\"labelDisplayStyle\":\"standard\",\"style\":{\"zIndex\":0},\"labelStyle\":{},\"isDynamicHeight\":true,\"classes\":[],\"isElementOverlapping\":false,\"heightType\":\"auto\",\"index\":0}],\"isDropZone\":true,\"snapPoints\":[null,null],\"snapEdges\":[null,null,null,null],\"isDraggable\":false,\"isResizable\":true}]","print_designer":1,"doc_type":"XF Expediente","module":"Xestion Funeraria Raul","standard":"No","print_designer_template_app":"print_designer","custom_format":0,"disabled":0,"print_format_type":"Jinja","raw_printing":0,"margin_top":15,"margin_bottom":15,"margin_left":15,"margin_right":15,"align_labels_right":0,"show_section_headings":0,"line_breaks":0,"absolute_value":0,"font_size":14,"page_number":"Hide","css":":root { --scale-factor: 1px; --modal-x: 0px; --modal-y: 0px; } .staticText { display: inline-block; font-family: Inter; font-size: 14px; font-weight: 400; color: rgb(0, 0, 0); text-align: left; font-style: normal; text-decoration: none; text-transform: none; line-height: 1.25; letter-spacing: 0px; border: 0px solid rgb(0, 0, 0); border-radius: 0px; padding: 0px; margin: 0px; min-width: 0px; min-height: 0px; box-shadow: none; overflow: hidden; overflow-wrap: break-word; white-space: normal; user-select: none; opacity: 1; z-index: 1; } .dynamicText { display: inline-block; font-family: Inter; font-size: 14px; font-weight: 400; color: rgb(0, 0, 0); text-align: left; font-style: normal; text-decoration: none; text-transform: none; line-height: 1.25; letter-spacing: 0px; border: 0px solid rgb(0, 0, 0); border-radius: 0px; padding: 0px; margin: 0px; min-width: 0px; min-height: 0px; box-shadow: none; overflow: hidden; overflow-wrap: break-word; white-space: normal; user-select: none; opacity: 1; } .dynamicText .label-text { font-family: Inter; font-size: 14px; font-weight: 600; color: rgb(0, 0, 0); text-align: left; font-style: normal; text-decoration: none; text-transform: none; line-height: 1.25; letter-spacing: 0px; border: 0px solid rgb(0, 0, 0); border-radius: 0px; padding: 0px; margin: 0px; min-width: 0px; min-height: 0px; box-shadow: none; white-space: normal; user-select: none; opacity: 1; z-index: 1; } .rectangle { padding: 0px; margin: 0px; white-space: normal; user-select: none; min-width: 0px; min-height: 0px; color: rgb(0, 0, 0); border: 1px solid rgb(0, 0, 0); box-sizing: border-box; outline: none; border-radius: 0px; box-shadow: none; opacity: 1; z-index: 0; } .image { display: block; border: 0px solid rgb(0, 0, 0); border-radius: 0px; padding: 0px; margin: 0px; min-width: 0px; min-height: 0px; box-shadow: none; white-space: normal; user-select: none; object-fit: scale-down; object-position: center center; background-size: contain; background-position: center center; background-repeat: no-repeat; opacity: 1; } .barcode { display: block; border: 0px solid rgb(0, 0, 0); border-radius: 0px; padding: 0px; margin: 0px; min-width: 0px; min-height: 0px; box-shadow: none; white-space: normal; user-select: none; opacity: 1; } .printTable td { font-family: Inter; font-size: 10px; font-weight: 400; color: rgb(0, 0, 0); text-align: left; font-style: normal; text-decoration: none; text-transform: none; line-height: 1.25; letter-spacing: 0px; border: 1px solid rgb(0, 0, 0); border-radius: 0px; background-color: rgb(255, 255, 255); padding: 10px; margin: 0px; min-width: 0px; min-height: 0px; box-shadow: none; overflow-wrap: break-word; white-space: normal; user-select: none; vertical-align: baseline; opacity: 1; } .printTable .label-text { font-family: Inter; font-size: 10px; font-weight: 600; color: rgb(0, 0, 0); text-align: left; font-style: normal; text-decoration: none; text-transform: none; line-height: 1.25; letter-spacing: 0px; border: 0px solid rgb(0, 0, 0); border-radius: 0px; background-color: rgb(255, 255, 255); padding: 0px; margin: 0px; min-width: 0px; min-height: 0px; box-shadow: none; white-space: normal; user-select: none; opacity: 1; vertical-align: baseline; z-index: 1; } .printTable th { font-family: Inter; font-size: 11px; font-weight: 600; color: rgb(0, 0, 0); text-align: left; font-style: normal; text-decoration: none; text-transform: none; line-height: 1.25; letter-spacing: 0px; border: 1px solid rgb(0, 0, 0); border-radius: 0px; background-color: rgb(255, 255, 255); padding: 10px; margin: 0px; min-width: 0px; min-height: 0px; box-shadow: none; white-space: normal; user-select: none; opacity: 1; z-index: 1; } .printTable tr:nth-child(2n) td { } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 210.000mm; --print-container-height: 297.000mm; --print-margin-top: 0mm; --print-margin-bottom: 0.000mm; --print-margin-left: 0mm; --print-margin-right: 0.000mm; } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 210.000mm; --print-container-height: 297.000mm; --print-margin-top: 0mm; --print-margin-bottom: 0.000mm; --print-margin-left: 0mm; --print-margin-right: 0.000mm; } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 235.000mm; --print-container-height: 342.000mm; --print-margin-top: -45mm; --print-margin-bottom: 15.000mm; --print-margin-left: -25mm; --print-margin-right: 25.000mm; } :root { --scale-factor: 1px; --modal-x: 0px; --modal-y: 0px; } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 210.000mm; --print-container-height: 297.000mm; --print-margin-top: 0mm; --print-margin-bottom: 0.000mm; --print-margin-left: 0mm; --print-margin-right: 0.000mm; } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 210.000mm; --print-container-height: 297.000mm; --print-margin-top: 0mm; --print-margin-bottom: 0.000mm; --print-margin-left: 0mm; --print-margin-right: 0.000mm; } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 235.000mm; --print-container-height: 342.000mm; --print-margin-top: -45mm; --print-margin-bottom: 15.000mm; --print-margin-left: -25mm; --print-margin-right: 25.000mm; } :root { --scale-factor: 1px; --modal-x: 0px; --modal-y: 0px; } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 210.000mm; --print-container-height: 297.000mm; --print-margin-top: 0mm; --print-margin-bottom: 0.000mm; --print-margin-left: 0mm; --print-margin-right: 0.000mm; } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 210.000mm; --print-container-height: 297.000mm; --print-margin-top: 0mm; --print-margin-bottom: 0.000mm; --print-margin-left: 0mm; --print-margin-right: 0.000mm; } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 235.000mm; --print-container-height: 342.000mm; --print-margin-top: -45mm; --print-margin-bottom: 15.000mm; --print-margin-left: -25mm; --print-margin-right: 25.000mm; } :root { --scale-factor: 1px; --modal-x: 0px; --modal-y: 0px; } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 210.000mm; --print-container-height: 297.000mm; --print-margin-top: 0mm; --print-margin-bottom: 0.000mm; --print-margin-left: 0mm; --print-margin-right: 0.000mm; } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 210.000mm; --print-container-height: 297.000mm; --print-margin-top: 0mm; --print-margin-bottom: 0.000mm; --print-margin-left: 0mm; --print-margin-right: 0.000mm; } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 235.000mm; --print-container-height: 342.000mm; --print-margin-top: -45mm; --print-margin-bottom: 15.000mm; --print-margin-left: -25mm; --print-margin-right: 25.000mm; } :root { --scale-factor: 1px; --modal-x: 0px; --modal-y: 0px; } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 210.000mm; --print-container-height: 297.000mm; --print-margin-top: 0mm; --print-margin-bottom: 0.000mm; --print-margin-left: 0mm; --print-margin-right: 0.000mm; } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 210.000mm; --print-container-height: 297.000mm; --print-margin-top: 0mm; --print-margin-bottom: 0.000mm; --print-margin-left: 0mm; --print-margin-right: 0.000mm; } :root, ::after, ::before { --print-width: 210.000mm; --print-height: 297.000mm; --print-container-width: 235.000mm; --print-container-height: 342.000mm; --print-margin-top: -45mm; --print-margin-bottom: 15.000mm; --print-margin-left: -25mm; --print-margin-right: 25.000mm; }@page { size: 210mm 297mm; margin: 0mm; } @page { size: 210mm 297mm; margin: 0mm; } @page { size: 210mm 297mm; margin: 45mm 25mm 15mm; } @page { size: 210mm 297mm; margin: 0mm; } @page { size: 210mm 297mm; margin: 0mm; } @page { size: 210mm 297mm; margin: 45mm 25mm 15mm; } @page { size: 210mm 297mm; margin: 0mm; } @page { size: 210mm 297mm; margin: 0mm; } @page { size: 210mm 297mm; margin: 45mm 25mm 15mm; } @page { size: 210mm 297mm; margin: 0mm; } @page { size: 210mm 297mm; margin: 0mm; } @page { size: 210mm 297mm; margin: 45mm 25mm 15mm; } @page { size: 210mm 297mm; margin: 0mm; } @page { size: 210mm 297mm; margin: 0mm; } @page { size: 210mm 297mm; margin: 45mm 25mm 15mm; }","print_format_builder":0,"print_format_builder_beta":0,"doctype":"Print Format","__onload":{"print_templates":[]}}

Console

16:21:36 web.1 | ERROR Property: Invalid value for "CSS Level 2.1" property: var(--gray-900) [14:3: color] 16:21:36 web.1 | WARNING Property: Unknown Property name. [64:2: word-wrap] 16:21:36 web.1 | WARNING Property: Unknown Property name. [83:2: columns] 16:21:36 web.1 | WARNING Property: Unknown Property name. [90:2: background-size] 16:21:36 web.1 | WARNING Property: Unknown Property name. [98:2: object-fit] 16:21:36 web.1 | WARNING Property: Unknown Property name. [110:2: -webkit-print-color-adjust] 16:21:36 web.1 | WARNING Property: Unknown Property name. [158:2: word-break] 16:21:36 web.1 | WARNING Property: Unknown Property name. [282:9: dpi] 16:21:36 web.1 | WARNING Property: Unknown Property name. [283:9: page-width] 16:21:36 web.1 | WARNING Property: Unknown Property name. [284:9: page-height] 16:21:36 web.1 | ERROR Property: Invalid value for "CSS Level 2.1" property: -webkit-box [361:9: display] 16:21:36 web.1 | ERROR Property: Invalid value for "CSS Level 2.1" property: -webkit-flex [362:9: display] 16:21:36 web.1 | ERROR Property: Invalid value for "CSS Level 2.1" property: flex [363:9: display] 16:21:36 web.1 | WARNING Property: Unknown Property name. [365:9: flex] 16:21:36 web.1 | WARNING Property: Unknown Property name. [370:9: flex-direction] 16:21:36 web.1 | WARNING Property: Unknown Property name. [371:9: flex] 16:21:36 web.1 | WARNING Property: Unknown Property name. [374:9: -webkit-box-sizing] 16:21:36 web.1 | Traceback (most recent call last): 16:21:36 web.1 | File "apps/frappe/frappe/app.py", line 114, in application 16:21:36 web.1 | response = frappe.api.handle(request) 16:21:36 web.1 | File "apps/frappe/frappe/api/__init__.py", line 49, in handle 16:21:36 web.1 | data = endpoint(**arguments) 16:21:36 web.1 | File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call 16:21:36 web.1 | return frappe.handler.handle() 16:21:36 web.1 | File "apps/frappe/frappe/handler.py", line 49, in handle 16:21:36 web.1 | data = execute_cmd(cmd) 16:21:36 web.1 | File "apps/frappe/frappe/handler.py", line 85, in execute_cmd 16:21:36 web.1 | return frappe.call(method, **frappe.form_dict) 16:21:36 web.1 | File "apps/frappe/frappe/__init__.py", line 1768, in call 16:21:36 web.1 | return fn(*args, **newargs) 16:21:36 web.1 | File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper 16:21:36 web.1 | return func(*args, **kwargs) 16:21:36 web.1 | File "apps/frappe/frappe/utils/print_format.py", line 234, in download_pdf 16:21:36 web.1 | pdf_file = frappe.get_print( 16:21:36 web.1 | File "apps/frappe/frappe/__init__.py", line 2184, in get_print 16:21:36 web.1 | return get_pdf(html, options=pdf_options, output=output) if as_pdf else html 16:21:36 web.1 | File "apps/frappe/frappe/utils/pdf.py", line 90, in get_pdf 16:21:36 web.1 | filedata = pdfkit.from_string(html, options=options or {}, verbose=True) 16:21:36 web.1 | File "env/lib/python3.10/site-packages/pdfkit/api.py", line 75, in from_string 16:21:36 web.1 | return r.to_pdf(output_path) 16:21:36 web.1 | File "env/lib/python3.10/site-packages/pdfkit/pdfkit.py", line 201, in to_pdf 16:21:36 web.1 | self.handle_error(exit_code, stderr) 16:21:36 web.1 | File "env/lib/python3.10/site-packages/pdfkit/pdfkit.py", line 158, in handle_error 16:21:36 web.1 | raise IOError("wkhtmltopdf exited with non-zero code {0}. error:\n{1}".format(exit_code, error_msg)) 16:21:36 web.1 | OSError: wkhtmltopdf exited with non-zero code 1. error: 16:21:36 web.1 | Invalid argument(s) parsed to --margin-bottom 16:21:36 web.1 | 16:21:36 web.1 | Name: 16:21:36 web.1 | wkhtmltopdf 0.12.6.1 (with patched qt) 16:21:36 web.1 | 16:21:36 web.1 | Synopsis: 16:21:36 web.1 | wkhtmltopdf [GLOBAL OPTION]... [OBJECT]... <output file> 16:21:36 web.1 | 16:21:36 web.1 | Document objects: 16:21:36 web.1 | wkhtmltopdf is able to put several objects into the output file, an object is 16:21:36 web.1 | either a single webpage, a cover webpage or a table of contents. The objects 16:21:36 web.1 | are put into the output document in the order they are specified on the 16:21:36 web.1 | command line, options can be specified on a per object basis or in the global 16:21:36 web.1 | options area. Options from the Global Options section can only be placed in 16:21:36 web.1 | the global options area. 16:21:36 web.1 | 16:21:36 web.1 | A page objects puts the content of a single webpage into the output document. 16:21:36 web.1 | 16:21:36 web.1 | (page)? <input url/file name> [PAGE OPTION]... 16:21:36 web.1 | Options for the page object can be placed in the global options and the page 16:21:36 web.1 | options areas. The applicable options can be found in the Page Options and 16:21:36 web.1 | Headers And Footer Options sections. 16:21:36 web.1 | 16:21:36 web.1 | A cover objects puts the content of a single webpage into the output document, 16:21:36 web.1 | the page does not appear in the table of contents, and does not have headers 16:21:36 web.1 | and footers. 16:21:36 web.1 | 16:21:36 web.1 | cover <input url/file name> [PAGE OPTION]... 16:21:36 web.1 | All options that can be specified for a page object can also be specified for 16:21:36 web.1 | a cover. 16:21:36 web.1 | 16:21:36 web.1 | A table of contents object inserts a table of contents into the output 16:21:36 web.1 | document. 16:21:36 web.1 | 16:21:36 web.1 | toc [TOC OPTION]... 16:21:36 web.1 | All options that can be specified for a page object can also be specified for 16:21:36 web.1 | a toc, further more the options from the TOC Options section can also be 16:21:36 web.1 | applied. The table of contents is generated via XSLT which means that it can 16:21:36 web.1 | be styled to look however you want it to look. To get an idea of how to do 16:21:36 web.1 | this you can dump the default xslt document by supplying the 16:21:36 web.1 | --dump-default-toc-xsl, and the outline it works on by supplying 16:21:36 web.1 | --dump-outline, see the Outline Options section. 16:21:36 web.1 | 16:21:36 web.1 | Description: 16:21:36 web.1 | Converts one or more HTML pages into a PDF document, using wkhtmltopdf patched 16:21:36 web.1 | qt. 16:21:36 web.1 | 16:21:36 web.1 | Global Options: 16:21:36 web.1 | --collate Collate when printing multiple copies (default) 16:21:36 web.1 | --no-collate Do not collate when printing multiple copies 16:21:36 web.1 | --copies <number> Number of copies to print into the pdf file (default 1) 16:21:36 web.1 | -H, --extended-help Display more extensive help, detailing less common command switches 16:21:36 web.1 | -g, --grayscale PDF will be generated in grayscale 16:21:36 web.1 | -h, --help Display help 16:21:36 web.1 | --license Output license information and exit 16:21:36 web.1 | --log-level <level> Set log level to: none, error, warn or info (default none) 16:21:36 web.1 | -l, --lowquality Generates lower quality pdf/ps. Useful to shrink the result document space 16:21:36 web.1 | -O, --orientation <orientation> Set orientation to Landscape or Portrait (default Portrait) 16:21:36 web.1 | -s, --page-size <Size> Set paper size to: A4, Letter, etc. (default A4) 16:21:36 web.1 | -q, --quiet Be less verbose, maintained for backwards compatibility; Same as using --log-level none (default) 16:21:36 web.1 | --read-args-from-stdin Read command line arguments from stdin 16:21:36 web.1 | --title <text> The title of the generated pdf file (The title of the first document is used if not specified) 16:21:36 web.1 | -V, --version Output version information and exit 16:21:36 web.1 | Page Options: 16:21:36 web.1 | --print-media-type Use print media-type instead of screen 16:21:36 web.1 | --no-print-media-type Do not use print media-type instead of screen (default) 16:21:36 web.1 | Contact: 16:21:36 web.1 | If you experience bugs or want to request new features please visit 16:21:36 web.1 | <https://wkhtmltopdf.org/support.html> 16:21:36 web.1 | 16:21:36 web.1 | 16:21:36 web.1 |

image image image

frappe 15.29.2 version-15 erpnext 15.27.6 version-15 xfr 0.2.0 develop (custom app) print_designer 1.2.0 develop webshop 0.0.1 develop

wkhtmltopdf 0.12.6.1 (with patched qt)

maharshivpatel commented 4 days ago
Screenshot 2024-06-25 at 11 00 55 AM

header / footer is set to negative value. please change to 0

2old4thisShit commented 4 days ago

It works. Now I have to find out what happened to make it like that, because I don't remember touching it.

Thank you!

maharshivpatel commented 4 days ago

It's a bug when you increase page margin it reduces height of header / footer