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

The --border option is ignored when exporting jpg file via the command line #1835

Open
2 tasks done
hangxingliu opened this issue Aug 14, 2024 · 0 comments
Open
2 tasks done

Comments

@hangxingliu
Copy link

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.

You must agree to search and the code of conduct. You must fill in this entire template. If you delete part/all or miss parts out your issue will be closed.

Describe the bug

The --border option is ignored when exporting jpg file via the command line. But exporting via GUI doesn't have this issue.

To Reproduce
Steps to reproduce the behavior:

/Applications/draw.io.app/Contents/MacOS/draw.io --export --format jpg --border 10 --quality 90 --output sample.jpg sample.drawio

# you can re-produce this issue in the main branch of this repo:
yarn start --export --format jpg --border 10 --quality 90 --output sample.jpg sample.drawio

Expected behavior

A padding should be added into the exported jpg file with the same size as specified in the command line option.

draw.io version (In the Help->About menu of the draw.io editor):

  • draw.io version 24.7.5
  • OS: MacOS

Additional context

This issue is came from this commit: 5cfc53f

The border option came from command line option is not passed to the renderPage function correctly. Although this commit can fix the crop option with border option for exported pdf, it break the border option for exported image files.

Because i see that this repo is not open for PR now, I open this issue rather than a PR. Here is my local patch for this issue. I tested it for exporting pdf and other image formats with different options

Screenshot 2024-08-15 at 06 09 19

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