Closed 2old4thisShit closed 4 days ago
header / footer is set to negative value. please change to 0
It works. Now I have to find out what happened to make it like that, because I don't remember touching it.
Thank you!
It's a bug when you increase page margin it reduces height of header / footer
Whenever I try to print a print format I get this error
Format:
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 |
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)