markushedvall / node-plantuml

A Node.js module and CLI for running PlantUML
MIT License
193 stars 53 forks source link

Feature Request: Support multi-page puml files (newpage keyword) #45

Open craigwardman opened 2 years ago

craigwardman commented 2 years ago

PUML files can contain the keyword "newpage" which splits the diagram into multiple pages.

Currently when using "node-plantuml" to render such a file, only the first page of the diagram is returned.

When using PlantUML stdout to generate files one can use the "pipeimageindex" parameter to specify which page to render. This was introduced in order to support the VS Code plugin: https://forum.plantuml.net/?qa=6265/specify-page-when-use-stdout

I found that this has been implemented in a fork of this repository, however it's not easily merged into here as it replaces some other implementation files that I think you wouldn't want in this repo. But for an example of how they implemented it see: https://github.com/windranger-io/node-plantuml

Since I'm using your version of "node-plantuml" via a dependency of another npm package I can't switch to the fork, so it would be great if your package could also support this.

Thanks!