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 --crop flag crops to much on 24.4.6 #1747

Closed
2 tasks done
leuchtum opened this issue May 23, 2024 · 4 comments
Closed
2 tasks done

CLI --crop flag crops to much on 24.4.6 #1747

leuchtum opened this issue May 23, 2024 · 4 comments

Comments

@leuchtum
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
If you use the --crop flag from the CLI, drawio crops to much of the file.

To Reproduce
Steps to reproduce the wrong behavior:

  1. Make sure, you are on 24.4.6
  2. Create a dummy drawio file
  3. Run drawio -x --crop dummy.drawio

Expected behavior
Steps to reproduce the expected behavior:

  1. Make sure, you are NOT on 24.4.6
  2. Create a dummy drawio file
  3. Run drawio -x --crop dummy.drawio

Screenshots
DRAWIO dummy file
Bildschirmfoto 2024-05-23 um 18 47 44
CORRECT PDF
Bildschirmfoto 2024-05-23 um 18 47 59
BUGGED PDF
Bildschirmfoto 2024-05-23 um 18 49 38

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

> drawio --version
24.4.6

Desktop (please complete the following information):

> sw_vers
ProductName:		macOS
ProductVersion:		14.4.1
BuildVersion:		23E224

Additional context
NA

@JeroenGar
Copy link

i am experiencing similar behaviour on 24.4.8.
Exports seem to be consistently cropped a little too aggressively:

Untitled 2

@alderg
Copy link
Contributor

alderg commented May 29, 2024

@JeroenGar Please include a test case and your operating system and version.

@JeroenGar
Copy link

JeroenGar commented May 29, 2024

Here is the XML inside the .drawio file.
Should contain all necessary information to replicate.

<mxfile host="Electron" modified="2024-05-29T14:57:03.782Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.4.8 Chrome/124.0.6367.207 Electron/30.0.6 Safari/537.36" etag="Go8-mUapq2995YPCXtlk" version="24.4.8" type="device">
  <diagram name="Page-1" id="q1JSyBGCea1ykbwNZwou">
    <mxGraphModel dx="1026" dy="669" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="qXMOj-TNuEZGjjNJlyur-1" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" vertex="1" parent="1">
          <mxGeometry x="240" y="250" width="30" height="30" as="geometry" />
        </mxCell>
        <mxCell id="qXMOj-TNuEZGjjNJlyur-2" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" vertex="1" parent="1">
          <mxGeometry x="450" y="40" width="30" height="30" as="geometry" />
        </mxCell>
        <mxCell id="qXMOj-TNuEZGjjNJlyur-3" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" vertex="1" parent="1">
          <mxGeometry x="450" y="250" width="30" height="30" as="geometry" />
        </mxCell>
        <mxCell id="qXMOj-TNuEZGjjNJlyur-4" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" vertex="1" parent="1">
          <mxGeometry x="240" y="40" width="30" height="30" as="geometry" />
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>

Running draw.io -x --crop yields this pdf: test_case.pdf
You will see that both the bottom and left side are cropped too much. Same behaviour as the original example by @leuchtum.

@davidjgraph
Copy link
Contributor

Fix in 24.4.13.

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

4 participants