Open StriderRanger opened 3 years ago
Thanks for reporting this bug.
The issue seems to be here: https://github.com/MrRio/jsPDF/blob/cef97fb34eda41a8704c9f3983e680919a328ce4/src/jspdf.js#L3993-L4008
The da
array (posX/Y
) contains absolute coordinates for the first line and coordinates relative to the previous line for all other lines. This is an issue when passing the coordinates to the generatePosition
function. For the non-rotated case, it uses the Td
PDF operator, which also accepts relative positions. For the rotated case, it uses the Tm
operator, which is not relative to the previous line. See also PDF 1.7 specification, section 9.4.2 Text-Positioning Operators.
Pull requests are welcome ;)
😊 "I'd be delighted to work on this issue, @StriderRanger ! Could you please assign it to me?"
Thanks for looking into this issue @TechWizard9999. I don't have the necessary permissions to assign the issue. It should be done by the repository owners.
@StriderRanger, Assign this issue to me please I can correct the bug.
@HackbrettXXX Can you please assign this issue to @2021eo3ar
There is candidates who can work on this issue, why it isn't assigned to them
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 toalign: '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:
right
.align
is.2.2.0
ofjspdf
since2.3.1
isn't working on stackblitz. But in my development environment I am using2.3.1
, and I am facing the same problem.Thanks!