some images are auto-rotated when I use addImage function
tj327 opened this issue · 5 comments
Some of my images are automatically rotated when I call addImage function.
Here are the screenshots.
First one shows the auto-rotated image and second one is the original image.


I tried to pass rotation param as 0 but it didn't work.
Here is the code snippet that I used.
this.doc.addImage(photo.base64, 'jpeg', 40, 40, 100, 150);
Why is this image auto-rotated?
Any help, plz.
So jsPDF doesn't work with auto-orientation of the image's EXIF metadata?
When will this feature be available on the jsPDF library?
` function useHtml() {
let pdf = new jsPDF('p', 'pt', 'a4');
let margin = 18; // narrow margin - 1.27 cm (36)
pdf.setProperties({
title: 'pdf'
});
pdf.html(document.getElementById('test'), {
filename: 'pdf',
html2canvas: {
// backgroundColor: '#fdf5e8',
// scale: scale // default is window.devicePixelRatio,
},
x: margin,
y: margin,
callback: function () {
// pdf.save('test.pdf');
window.open(pdf.output('bloburl')); // to debug
}
});
}`
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.
