jgraph / drawio-desktop

Official electron build of draw.io
https://www.diagrams.net
Apache License 2.0
50.95k stars 5.03k forks source link

CLI exports to PNG/JPG lead to overcropping for large diagrams #1892

Open CiaranGruber opened 1 month ago

CiaranGruber commented 1 month ago

Preflight Checklist

Describe the bug Exporting large diagrams where the document spans at least 2.5 pages in width and over 1 page in height to an image format such as PNG or JPG cause the diagrams to be cropped. This does not appear to be an issue with exporting to pdf with the --crop option enabled.

To Reproduce Steps to reproduce the behaviour:

  1. Create a diagram using the desktop app that is larger than 2.5 pages wide and 1 page tall (excluding padding around the outside
  2. Save the diagram using an appropriate name
  3. Run the following command in the CLI: <draw.io.exe> -x C:/path/to/diagram.drawio Test.png -f png
  4. Check resultant PNG (Test.png) and notice it being cropped

Expected behaviour The diagram should export fully - similar to what is done via the GUI interface.

Screenshots The screenshots below show the types of input drawings and outputs used in the Steps to Reproduce section

Expected Image (generated via GUI): Test drawio

Actual Image (generated via CLI): Test

Diagram in App: image

Desktop (please complete the following information):

I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:

Troubleshooting steps attempted