Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
CiaranGruber opened this issue Oct 19, 2024 · 0 comments
Open
2 tasks done

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

CiaranGruber opened this issue Oct 19, 2024 · 0 comments

Comments

@CiaranGruber
Copy link

CiaranGruber commented Oct 19, 2024

Preflight Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

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):

  • OS: Windows 11 version 10.0.22631 Build 22631
  • Draw.io desktop app version 24.7.17
  • Browser: N/A
  • Browser Version: N/A

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

  • N/A

Troubleshooting steps attempted

  • Uninstalling and reinstalling latest draw.io app
  • Attempting to try different image formats (ie. PNG and JPG)
  • Adding additional CLI options such as --crop, --all-pages, --zoom, and --quality despite these primarily being used for PDFs/not being relevant
@davidjgraph davidjgraph transferred this issue from jgraph/drawio Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant