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

export PDF with extra background part #4361

Open
2 tasks done
Absoler opened this issue Apr 27, 2024 · 19 comments
Open
2 tasks done

export PDF with extra background part #4361

Absoler opened this issue Apr 27, 2024 · 19 comments

Comments

@Absoler
Copy link

Absoler commented Apr 27, 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
The crop option seems useless, I have tried export a PDF from pathes of "export as -> PDF" and "export as -> advanced" and both fail.
The exported PDF contains a whole page anyway.
To Reproduce
Steps to reproduce the behavior:

  1. Go to 'File'
  2. Click on 'Export as'
  3. Select 'crop'
  4. Click on 'Export'

Expected behavior
a PDF file only contains the diagram is exported

Screenshots

the currenet exported
image

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

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Browser Version 124.0.6367.60

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

Additional context
similar with #4353 #4348

@davidjgraph
Copy link
Collaborator

Close all diagrams.net tabs, use clear.draw.io to push an update and test with 24.3.1.

@Absoler
Copy link
Author

Absoler commented Apr 27, 2024

And if I export PDF through "File -> print", it seems correct

@Absoler
Copy link
Author

Absoler commented Apr 27, 2024

Close all diagrams.net tabs, use clear.draw.io to push an update and test with 24.3.1.

Thanks, it works for the path "File -> Export as -> PDF". But still fail for "File -> Export as -> Advanced -> PDF", which I remember could work some days ago.

@davidjgraph
Copy link
Collaborator

What does it show for the version under the help menu?

@mayone23
Copy link

Close all diagrams.net tabs, use clear.draw.io to push an update and test with 24.3.1.

Thanks, it works for the path "File -> Export as -> PDF". But still fail for "File -> Export as -> Advanced -> PDF", which I remember could work some days ago.

Yes, it is not working now. The generated pdf are coming in multiple pages with blank background.

@Absoler
Copy link
Author

Absoler commented Apr 27, 2024

What does it show for the version under the help menu?

24.3.1

@daviddavo
Copy link

Working here too

@mayone23
Copy link

image

@mayone23
Copy link

image

Here, you can see, I am getting this one as the generated pdf. When I click on version 24.3.1 it's showing nothing.

@davidjgraph
Copy link
Collaborator

We're going to add the zoom to the standard dialog and remove the advanced export to PDF option.

@Augur1989
Copy link

can we get an option to set a pdf background color?
in the older versions, the background in exported pdf's was the selected diagram background color, but atm its always white

@shi-ang
Copy link

shi-ang commented May 2, 2024

I'm still facing this issue. I tried "File -> Export as -> PDF" and "File -> Export as -> Advanced -> PDF". They both failed.

I also experience the issue that the generated PDF will crop my large diagrams into multiple pages (all with large margins).

I tested on a desktop with Ubuntu 22.04 LTS, drawio v24.3.1, and a laptop with Windows 11, drawio v24.2.3. Anyone knows how to solve this?

@IridiumXOR
Copy link

IridiumXOR commented May 2, 2024

I have the same problem... SVG exporter instead works correctly...

@shi-ang
Copy link

shi-ang commented May 3, 2024

I'm still facing this issue. I tried "File -> Export as -> PDF" and "File -> Export as -> Advanced -> PDF". They both failed.

I also experience the issue that the generated PDF will crop my large diagrams into multiple pages (all with large margins).

I tested on a desktop with Ubuntu 22.04 LTS, drawio v24.3.1, and a laptop with Windows 11, drawio v24.2.3. Anyone knows how to solve this?

I got a temporary solution for now.

First press "Ctrl + A" to select all the elements. Then "File -> Export as -> PDF". Then select both "Selection Only" and "Crop". This retains the previous "File -> Export as -> Advanced -> PDF" behavior.

@IridiumXOR
Copy link

I'm still facing this issue. I tried "File -> Export as -> PDF" and "File -> Export as -> Advanced -> PDF". They both failed.
I also experience the issue that the generated PDF will crop my large diagrams into multiple pages (all with large margins).
I tested on a desktop with Ubuntu 22.04 LTS, drawio v24.3.1, and a laptop with Windows 11, drawio v24.2.3. Anyone knows how to solve this?

I got a temporary solution for now.

First press "Ctrl + A" to select all the elements. Then "File -> Export as -> PDF". Then select both "Selection Only" and "Crop". This retains the previous "File -> Export as -> Advanced -> PDF" behavior.

It is the way I use usually but in my case does not work...

@ruiw0w
Copy link

ruiw0w commented May 5, 2024

I also encountered the same problem. I chose to export as - Advanced - PDF, and the resulting PDF files were not on the same page, and there would be pagination. One solution is to select the content you need or select all, choose export as - pdf - check only the selected content & export a single page, but the margins of the pdf file obtained in this way are too small, I usually specify the margins as 5. This problem has not occurred before. I don’t know if it is a bug in the new version.

@ruiw0w
Copy link

ruiw0w commented May 5, 2024

我仍然面临这个问题。我尝试了“文件 -> 导出为 -> PDF”和“文件 -> 导出为 -> 高级 -> PDF”。他们都失败了。
我还遇到这样的问题:生成的 PDF 会将我的大图表裁剪为多个页面(所有页面的边距都很大)。
我在装有 Ubuntu 22.04 LTS、drawio v24.3.1 的台式机和装有 Windows 11、drawio v24.2.3 的笔记本电脑上进行了测试。有人知道如何解决这个问题吗?

我现在有一个临时解决方案。

首先按“Ctrl + A”选择所有元素。然后“文件 -> 导出为 -> PDF”。然后选择“仅选择”和“裁剪”。这保留了之前的“文件 -> 导出为 -> 高级 -> PDF”行为。

像你一样,按照“文件 -> 导出为 -> 高级 -> PDF”的方式导出,之前我并没有出现这种问题,所以这应该是软件的bug吗?

@ruiw0w
Copy link

ruiw0w commented May 5, 2024

我使用离线版本v24.2.5,按照“文件 -> 导出为 -> 高级 -> PDF”的方式导出,是没有问题的。

@alderg
Copy link
Contributor

alderg commented May 11, 2024

Fixed in v24.4.0 with the Crop option checked:

Screenshot 2024-05-11 at 08 34 00

Use https://clear.diagrams.net/ to get the latest version.

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

9 participants