Export BPMN Diagram to PDF

Is there a way to export the diagram to pdf, and also each subprocess should be in different page of the PDF!!

Example: Whole diagram is on page 1, first sub-process on page 2, and so on…

Can someone please assist?

No out-of-the-box solution, I believe.

Thanks!!

Also, when I import bpmn-to-image then it says missing module: puppeteer, So I installed the module.
Now after installing the module, I face following error just by importing “bpmn-to-image” module:
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.

Please assist @nikku .

If you are stuck with a particular problem, provide the necessary context. Phrase your post so that we can follow your line of thought, step by step.

Share details on your setup. Open a bug report with full details if you thing you uncovered a bug. We cannot help you, if we can’t reproduce your issue.

Thanks :heart:

Actually, we are using bpmn-js to create flow diagrams, and we want to save the diagram in pdf format. For this, we tried to use the bpmn-to-image library. But after installing, and just importing the module (even not used the library), first I got the error that missing module puppeteer. So installed the puppeteer library and after that got many errors in the react app console and app stopped running:

Errors: BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. and many others.

image

No idea why this happened. After removing the import, the react app works fine.

Versions of the modules used:

“bpmn-to-image”: “^0.9.0”
“bpmn-js”: “7.3.0”,
“bpmn-js-properties-panel”: “^0.46.0”,
“bpmn-moddle”: “^8.0.1”,
“puppeteer”: “^24.4.0”,
“react”: “^18.2.0”

Can you please assist!!