jgraph / jgraph/drawio

Default settings for Export to PDF change the borders and image size of the resulting PDF

Open
#5,682 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug possible-duplicate
Dominant language
JavaScript
Stars
8.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

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.

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 default settings for exporting to PDF change the document borders and shrink the PDF image in the resulting PDF.

I need precise borders in documents that I produce. Previously, exporting to PDF using the default settings retained the precise borders that I established in the documents. Now, exporting to PDF using the default settings adds extra borders around the document, changing the borders that I've established for the document.

I noticed this behavior today and it goes back at least a couple of months. Documents I produced from one year ago do not have this problem.

I can fix the problem by setting "Border Width: 0" in the PDF export pop-up window. So, it appears that the default border width for PDF exports and printing has changed from 0 to 27 pixels in a recent version. As far as I can tell, this change was not documented in the changelogs.

To Reproduce
Steps to reproduce the behavior:

  1. Export a document using the default Export to PDF settings.

Steps to correct behavior to previous behavior:

  1. Manually change the Border Width: to 0 when exporting a document using the Export to PDF settings.

Expected behavior

  1. The default Export to PDF settings should NOT change the borders of the resulting PDF.
  2. There should also be a way to set the default Border Width for all documents.

Screenshots

251124-Margin Example-Default Border=27.pdf

251124-Margin Example-Border=0.pdf

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

  • draw.io version 29.0.3

Desktop (please complete the following information):

  • OS: MacOS Sequoia 15.6.1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in draw.io version 29.0.3 on macOS using the default Export to PDF settings, then repeat with Border Width set to 0. Compare the resulting borders and image size; done means the default export preserves document borders and the expected image dimensions, with the requested default-setting behavior addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.