parallax/jsPDF

Centering a multiline rotated text isn't working

Open

#3,206 建立於 2021年7月9日

在 GitHub 查看
 (6 留言) (1 反應) (0 負責人)JavaScript (28,280 star) (4,596 fork)batch import
Bugdifficulty:mediumhacktoberfesthelp wanted

描述

Hi,

In an Ionic/Angular app, I have a multiline text that is rotated with 45 degree, and when the text has the property align: 'left', the export is working fine. But once I change this property to align: 'center', the result is inappropriate, and the second line of the text moves to the very bottom-left corner of the page.

This is a stackblitz example, where the text has the property align: 'center', and rotated with 45 degree.

Please note that:

  • The same problem happens when the alignment is set to right.
  • With non rotated text, everything works fine, whatever the value of align is.
  • In my example I am using the version 2.2.0 of jspdf since 2.3.1 isn't working on stackblitz. But in my development environment I am using 2.3.1, and I am facing the same problem.

Thanks!

貢獻者指南