I am trying to rotate the tag of an object that contains a PDF file viewed by the Acrobat plugin through AcroPdf.dll.
I already saw this solution, but I donβt turn the PDF itself on> = IE9 (works on chrome)
I am using jQuery 1.11.3 and PDFObject 1.2, and I cannot change the version of jQuery.
The effect is as follows:
I want to:
Any help would be appreciated. Relationship
My simple code is:
<!DOCTYPE html>
<html>
<head>
<style>
.rotate-90 {
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.00000000, M12=-1.00000000, M21=1.00000000, M22=0.00000000,sizingMethod='auto expand')";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.00000000, M12=-1.00000000, M21=1.00000000, M22=0.00000000,sizingMethod='auto expand');
transform: rotate(90deg);
-o-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
}
</style>
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="http://miorepository.altervista.org/pdfobject.js"></script>
</head>
<body>
<button onclick="rotatePdf();">Rotate 90 degree</button>
<div id="boxPdf"></div>
<script type='text/javascript'>
$(function(){
var pdfPath = './doc1.pdf';
var customParameter = {
page : '1',
view : 'FitH,0',
pagemode : 'none',
scrollbars : '0',
toolbar : '0',
statusbar : '0',
messages : '0',
navpanes : '0'
};
var myPDF = new PDFObject({
url : pdfPath,
pdfOpenParams : customParameter,
cid : 'objectBoxPdf'
}).embed('boxPdf');
});
function rotatePdf(){
$('#objectBoxPdf').toggleClass('rotate-90');
}
</script>
</body>
</html>
source
share