PDF export in desktop app doesn't work correctly for select page range
Preflight Checklist
- [x] I agree to follow the Code of Conduct that this project adheres to.
- [x] 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.
If you are technical, you should report bugs along the lines of https://marker.io/blog/how-to-write-bug-report. If you are not technical, we will make allowances, please try to make an effort to understand the process.
Describe the bug When using the desktop app to export multi-page drawings to pdf and selecting more than two pages to export, then you get additional copies of pages added to the end of the pdf file. This also means internal hyperlinks in the exported pdf (as added in https://github.com/jgraph/drawio/issues/722) do not work. If you select "All Pages" in the export dialog box then it works fine, and if the total number of pages exported via the "Pages x to x" range is 1 or 2 then it works.
To Reproduce Steps to reproduce the behavior:
- Create a drawing with at least 3 pages
- Click File >> Export as >> PDF
- Select "Pages 1 to 3" and Export
- The saved pdf has 4 pages (including a duplicate of page 2 at the end)
Expected behavior I would expect the exported pdf to have the correct pages and for internal hyperlinks to work, I would expect the desktop app to behave in the same way as the online app.
Screenshots If applicable, add screenshots to help explain your problem.
draw.io version (In the Help->About menu of the draw.io editor):
- draw.io version 27.0.9
Desktop (please complete the following information):
- OS: Windows 11
- Browser: Chrome
- Browser Version: 136.0.7103.114
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
I tested the problem in incognito/private mode with all browser extensions switched off, write "yes" below:
- n/a
Additional context The pdf files attached below are exported from the drawio file in the zip file, one from the desktop app and onde from the online app. This adds to the issues around pdf export that have already been reported under https://github.com/jgraph/drawio/issues/4851
pdf export test.drawio (online).pdf pdf export test.drawio (desktop).pdf