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

PDF exporting results in recursively generated files #85

Closed
nql5161 opened this issue Jan 17, 2023 · 4 comments · Fixed by #89
Closed

PDF exporting results in recursively generated files #85

nql5161 opened this issue Jan 17, 2023 · 4 comments · Fixed by #89
Labels
bug Something isn't working enhancement New feature or request released

Comments

@nql5161
Copy link

nql5161 commented Jan 17, 2023

Intro

Hi, I appreciate the effort you have put into this tool and it's extremely valuable to the effort it's apart of. It saves costly developer time that can be preciously used elsewhere.

I started using this tool for generating SVGs that are shown in an Azure DevOps wiki. It works great for this usage, although I'm afraid it wasn't exactly what I had in mind.

Issue

When trying to generate PDFs, it recursively generates the PDFs like a reverse Fibonacci. What I mean by this is when running docker run -it -v $(pwd):/data rlespinasse/drawio-export, it results in PDF files being made for each page in the diagram but the first PDF will contain all of the diagrams from the Draw.IO instead of just the contents of the first page.

Let's say page 1 is titled "FirstPage", page 2 is titled "SecondPage", so on and so forth. After generation is complete, the output file FirstPage.pdf will contain pages 1 through N instead of only containing the content from "FirstPage". The output file SecondPage.pdf will contain pages 2 through N, excluding the page that proceeded it in the Draw.IO file.

Questions

  • How do I generate a PDF document per page in the Draw.IO diagram without containing other pages?
  • Is it possible to generate a PDF document that contains a page for each diagram in the Draw.IO instead of separate PDF documents?
@nql5161 nql5161 changed the title Default PDF exporting results in recursively generated fileset PDF exporting results in recursively generated files Jan 17, 2023
@rlespinasse
Copy link
Owner

@nql5161 thanks for this issue.

Your first question seems to be a bug, I will look into it.
For the second one, will need a new feature to be possible, see rlespinasse/drawio-exporter#17.

@rlespinasse rlespinasse added bug Something isn't working enhancement New feature or request labels Jan 18, 2023
@rlespinasse
Copy link
Owner

I reproduce the reverse Fibonacci bug with the PDF type. After some search, the issue was reported on jgraph/drawio#3597.
This docker image needs to be based on a drawio-desktop version greater than 21.3.3.

@rlespinasse
Copy link
Owner

Base image updated with latest drawio-desktop version rlespinasse/docker-drawio-desktop-headless#37

@rlespinasse
Copy link
Owner

🎉 This issue has been resolved in version 4.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants