-
Notifications
You must be signed in to change notification settings - Fork 2
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
Development
: Fix pdf export for communication diagrams
#46
base: main
Are you sure you want to change the base?
Conversation
Development
: Fix pdf export for communication diagramsDevelopment
: Fix pdf export for communication diagrams
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on the test server. Code changes look good and so does the functionality. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Export is working for me
pdfMake.vfs = pdfFonts.pdfMake.vfs; | ||
pdfMake.vfs = dejavuSans; | ||
pdfMake.fonts = { | ||
DejaVuSans: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why we need a custom font here? is it not possible to solve the issue without a custom fonts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In any case I would prefer something closer to the default fonts of operating systems such as Helvetica or Arial (in case we can force this, potentially without adding them to the repo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why we need a custom font here? is it not possible to solve the issue without a custom fonts?
Apparently, PDF files have 14 standard fonts; Acrobat Reader Base Fonts
These fonts do not support unicode characters, arrows for our case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In any case I would prefer something closer to the default fonts of operating systems such as Helvetica or Arial (in case we can force this, potentially without adding them to the repo)
We are using normal arrows for up and down, but long arrows for left and right. If we replace long arrows with normal ones, we can use Arial which supports normal arrows. Since Arial is also not supported in pdf, we have to use it as a custom font.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there no other default PDF font which supports the arrow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried all of them, but no luck...
List of fonts supporting arrows
There is a library called pdfmake-unicode that provides Aerial GEO font that supports arrows but this library is not maintained anymore.
…diagram-export-fix
Checklist
Motivation and Context
This PR fixes arrows not appearing correctly in the communication link messages on pdf export
Steps for Testing
Test Server
Screenshots
Before
After