jsPDF
jsPDF copied to clipboard
-webkit-transform is not considered in doc.html
I have read and understood the contribution guidelines.
I tried to add rotation to a paragraph. It shows up correctly in HTML but once I print it as pdf it is not visible anymore.
Versions I am using:
- jsPDF: 2.5.1
- Chrome: 96.0.4664.93
Code snippets to reproduce the issue:
Paragraph which uses the style "textrotated"
<p class="textrotated">some text</p>
My CSS
.textrotated{
margin-top: 250px;
margin-left: 40px;
float:left;
color: #1b66b3;
font-size: 40px;
font-weight: bold;
font-family: Helvetica, Arial, sans-serif;
position: absolute;
-webkit-transform: rotate(350deg);
-webkit-backface-visibility: hidden;
writing-mode: lr-tb;
}
Method to print pdf
printjspdf(){
var doc = new jsPDF("p", "mm", "a4");
doc.html(document.getElementById("page1"), {
callback: function (doc) {
doc.save();
},
image: { type: 'png'},
width: 210,
windowWidth: 793
});
}
Thanks in advance!!
facing the same issue
This issue is stale because it has been open 90 days with no activity. It will be closed soon. Please comment/reopen if this issue is still relevant.
Any updates/work around here? I'm facing the same issue
2023 . Same issue
Same issue, also with transform
. Here is a codesandbox that shows the issue: https://codesandbox.io/s/modest-yalow-8xq2xf?file=/src/index.mjs