Print Designer Version Issue

Dear Community,

I have installed Frappe Print Designer on Local Setup through the following commands.

ERPNext
1- bench get-app --branch version-15 erpnext
2- bench --site testcompanyllc install-app erpnext

Print Designer
3- bench get-app print_designer
4- bench --site testcompanyllc install-app print_designer

bench start
bench use testcompanyllc

Now the issue is that when I check my installed apps.

Installed Apps

ERPNext: v15.53.0 (version-15)
Frappe Framework: v15.56.1 (version-15)
Print Designer: v1.x.x-develop () (develop)

Why the version of Print Designer is v1.x.x-develop () (develop), Why is the version not 1.5.1

How can I install Print Designer v1.5.1 on my site testcompanyllc ?

Because it pulled the develop branch of print designer. Which btw will have the latest code anyway but may not be stable.

As long as you are not on production it should not matter. If you run into any problems just try updating.

If you want to use the version from the main branch, you should use:

bench get-app --branch main print_designer

Otherwise, it will get the develop version by default.

1 Like

Thanks for your response.

Are the below steps correct to delete print designer develop and reinstall branch main print designer.

To Delete print designer develop.

1- bench remove-app print_designer
2- bench --site tescompanyllc uninstall-app print_designer --force (To Uninstall Print Designer)

To Install Main Print Designer

1- bench get-app --branch main print_designer

Or

1- bench get-app https://github.com /frappe/print_designer --branch main

Then

2- bench --site testcompanyllc install-app branch main print_designer

Pls advice.

If anything incorrect then pls correct me.

1 Like

Try doing this:

bench switch-to-branch main print_designer

And then:

bench update --patch

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. :wink:

1 Like

Well, according to this, they’re also using it in the main branch:

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)

Worked fine for me:

bench init --frappe-branch version-15 testing
cd testing/
bench get-app --branch version-15 erpnext
bench get-app print_designer
bench new-site testcompanyllc
bench --site testcompanyllc install-app erpnext
bench --site testcompanyllc install-app print_designer
bench use testcompanyllc
bench start
bench switch-to-branch main print_designer
bench update --patch
bench start
bench migrate

Detail the steps you followed and show some screenshots.

Do you have the websockets module installed?

@jls

I noticed that websockets was not installed, so I installed it using the following commands:

  1. cd frappe-bench
  2. source env/bin/activate
  3. pip install websockets
  4. sudo apt update
  5. sudo apt install python3-websockets
  6. bench restart

Maybe this will be helpful for someone in the future.

Here are my current versions:

  • ERPNext: v15.53.0 (version-15)
  • Frappe Framework: v15.56.1 (version-15)
  • Print Designer: v1.5.1 (main)
  • WkHtmlToPdf: wkhtmltopdf 0.12.6.1 (with patched Qt)

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.

Pls advise

Possibly a simple bench pip install websockets would have been enough :sweat_smile:

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