I have a pdf embedded inside html.
<object id="img" height="540" width="100%" type='application/pdf' data="http://file.pdf" />
I need to rotate it using javascript (or jquery) something like $("img").rotate(90);
$("img").rotate(90);
How can i do this?
to try
$("#img").css({'transform':'rotate(90deg)', '-o-transform': 'rotate(90deg)', '-ms-transform': 'rotate(90deg)', '-webkit-transform': 'rotate(90deg)' });
You can use the css transform property http://www.w3schools.com/css/css3_2dtransforms.asp
#img { -o-transform: rotate(90deg); -ms-transform: rotate(90deg); -webkit-transform: rotate(90deg); transform: rotate(90deg); }
Source: https://habr.com/ru/post/1014192/More articles:Rotate Object Tag (PDF) in Javascript - javascriptWhy can't curve_fit evaluate the covariance of a parameter if the parameter matches exactly? - pythonPromise.then execution context when using class methods as a callback - javascriptHow to show the contents of notifications in the application for viewing? - iosHow to use calendar format to enter numeric data in Shiny? - inputRmarkdown: write inline dplyr code if column names have spaces defined using backreferences - rWhat is the difference between View.postDelayed () and Handler.postDelayed () in the main thread? - javaUnable to install AWS Elastic Beanstalk CLI (Win10, Python 3.6, Pip 9.0.1) - pythonMutation of a managed object after its removal from the context - iospandas randomly replace k percent - pythonAll Articles