-
Notifications
You must be signed in to change notification settings - Fork 19
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
Increase the quality of the slide images in the exported pdf #18 #46
base: master
Are you sure you want to change the base?
Conversation
Preview available at https://preview.excalideck.com/PR/46/ |
This feature is proving to be more difficult than anticipated. The first approach I took was using Excalidraw's That leaves me with the following options:
Before going into the pros and cons of each option, I'll mention another problem that I noticed when - as a quick second approach - I tried to just generate higher-quality pngs: performance. Generating higher quality pngs takes a significant amount of time, to the point that when clicking on the save button for the first time, several seconds pass before the save dialog opens (this is less of a problem for the subsequent save operations, since there's a UI element indicating that the save operation is in progress, and some steps of the operation are memoized). What's worse is that if the operation takes too much time (I didn't figure out the threshold), the save dialog never opens, because the browser "loses" the connection between the user action of clicking on the save button and the js call to the save-dialog-opening API, and therefore rejects the call as not authorized / not triggered by a user action. In general this performance issue needs to be addressed whichever option is chosen. But let's go through the pros and cons of each option. Option 1: switch to the
|
And here are some mockups for a "UI solution" to the performance issue mentioned in the previous comment. Save modalThe first time the user clicks on the save icon, the following modal appears: Generation completedWhen the file-generation-process is completed, the modal transitions to this state: Subsequent save operationsFor subsequent save operations, the modal is not needed anymore, but the current UI could be updated to show a progress bar: |
Having thought over the various options for a while, I think the simple Option 3: just generate higher-quality pngs is actually the best approach. The pdf format is the most flexible of all: it's well understood by users, it can be viewed on any device and it can be previewed by other software, which greatly helps in managing the file (e.g. when you get an email with a pdf attached, you get a preview right in your email client and immediately understand what the file contains). To solve the file-saving performance issue, the "UI solution" described above seems suitable. Of course, choosing option 3 doesn't prevent the development of other features - like presentation mode, or exporting to different file formats. It just means that, for the time being, the Excalideck file-saving format will remain pdf. |
Closes #18