This will switch to the main branch of print_designer and apply the necessary changes to the app.
Anyway, I’ve been using the develop branch without many issues, and if I’m not mistaken, they’re now using Chromium (or at least integrating it), so I would suggest trying develop.
In the end, it depends on each person’s needs and level of trust.
Thanks I followed your commands but now facing error Status: 500.
Server Error
Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 99, in application
init_request(request)
File “apps/frappe/frappe/app.py”, line 198, in init_request
frappe.call(before_request_task)
File “apps/frappe/frappe/init.py”, line 1722, in call
fn = get_attr(fn)
^^^^^^^^^^^^
File “apps/frappe/frappe/init.py”, line 1716, in get_attr
return getattr(get_module(modulename), methodname)
^^^^^^^^^^^^^^^^^^^^^^
File “apps/frappe/frappe/init.py”, line 1434, in get_module
return importlib.import_module(modulename)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3.12/importlib/init.py”, line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1387, in _gcd_import
File “”, line 1360, in _find_and_load
File “”, line 1331, in _find_and_load_unlocked
File “”, line 935, in _load_unlocked
File “”, line 995, in exec_module
File “”, line 488, in _call_with_frames_removed
File “apps/print_designer/print_designer/pdf_generator/pdf.py”, line 5, in
from print_designer.pdf_generator.browser import Browser
File “apps/print_designer/print_designer/pdf_generator/browser.py”, line 9, in
from print_designer.pdf_generator.cdp_connection import CDPSocketClient
File “apps/print_designer/print_designer/pdf_generator/cdp_connection.py”, line 4, in
import websockets
ModuleNotFoundError: No module named ‘websockets’
frappe@2old4thisshit:~/testing$ bench switch-to-branch main print_designer
INFO: Fetching upstream unshallow for print_designer
$ git remote set-branches upstream '*'
$ git fetch --all --unshallow --quiet
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
From https://github.com/frappe/print_designer
* branch main -> FETCH_HEAD
Switching for print_designer
$ git checkout -f main
Branch 'main' set up to track remote branch 'main' from 'upstream'.
Switched to a new branch 'main'
SUCCESS: Successfully switched branches for: print_designer
Please run `bench update --patch` to be safe from any differences in database schema
frappe@2old4thisshit:~/testing$ bench update --patch
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
From https://github.com/frappe/frappe
* branch version-15 -> FETCH_HEAD
WARN: shallow_clone is set in your bench config.
However without passing the --reset flag, your repositories will be unshallowed.
To avoid this, cancel this operation and run `bench update --reset`.
Consider the consequences of `git reset --hard` on your apps before you run that.
To avoid seeing this warning, set shallow_clone to false in your common_site_config.json
Backing up sites...
Backup Summary for testcompanyllc at 2025-04-30 21:41:32.125426
Config : ./testcompanyllc/private/backups/20250430_214129-testcompanyllc-site_config_backup.json 94.0B
Database: ./testcompanyllc/private/backups/20250430_214129-testcompanyllc-database.sql.gz 1.0MiB
Backup for Site testcompanyllc has been successfully completed
Patching sites...
Migrating testcompanyllc
Service redis_cache is not running.
Cannot run bench migrate without the services running.
If you are running bench in development mode, make sure that bench is running:
$ bench start
Otherwise, check the server logs and ensure that all the required services are running.
frappe@2old4thisshit:~/testing$ bench start
21:41:44 system | redis_cache.1 started (pid=1547)
21:41:44 system | redis_queue.1 started (pid=1551)
21:41:44 system | web.1 started (pid=1553)
21:41:44 system | socketio.1 started (pid=1558)
21:41:44 system | watch.1 started (pid=1563)
21:41:44 system | schedule.1 started (pid=1567)
21:41:44 system | worker.1 started (pid=1570)
Issue:
However, I’m facing a problem before with develop version and now with main version — when I click Print on any Sales Invoice or other transaction using the new Print Designer format, it takes around 1–2 minutes to generate the preview which is too long. As per my suggestion it should take less than 5-10 seconds to generate preview.
Are you using the docker deployment. is so make sure you get the application on all the docker containers used by frappe.
then run a migrate
also print designer doesnt use WktHtmlToPDF so you will have to run the post install on all containers as well that should help i think thats all I did extra