Search code examples
cssrotationtransformscalehtml2pdf

transform - rotate and scale is not working when i convert html content to pdf


I am using html2pdf to convert HTML content with images to PDF and I have also added an option to rotate and flip the images... Right now pdf is created successfully ... but if I have rotated or flipped any image by using CSS transform: rotate(90deg);

transform:scaleX(-1);

then in a PDF file, that image is not looking rotated or flipped... Any idea to get rid of this issue... Please share ...or any solution for that.

Thanks in Advance.


Solution

  • use "-webkit-transform" instead of "transform". for example:

     -webkit-transform: rotate(90deg);