Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
pdf-customizer
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
01944fc6
authored
2016-09-14 12:01:07 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
pdf.js working ie 10
1 parent
28355607
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
public/files/js/interfaceGdrive.js
public/files/js/interfaceGdrive.js
View file @
01944fc
//
var pluginUrl = window.location.protocol + '//' + window.location.host + '/commonwell';
//
var pdf_customizer = "http://localhost:8888/pdf-customizer/public";
var
pluginUrl
=
window
.
location
.
protocol
+
'//'
+
window
.
location
.
host
+
'/commonwell'
;
var
pdf_customizer
=
"http://localhost:8888/pdf-customizer/public"
;
var
pluginUrl
=
window
.
location
.
protocol
+
'//'
+
window
.
location
.
host
;
var
pdf_customizer
=
"https://pdf-customizer.synapsus.co"
;
//
var pluginUrl = window.location.protocol + '//' + window.location.host;
//
var pdf_customizer = "https://pdf-customizer.synapsus.co";
var
imageHeight
=
""
;
...
...
@@ -740,7 +740,7 @@ function finalPdf(data, json) {
var
strVar2
=
""
strVar2
+=
'<div id="seepdf" style=" width:'
+
imageWidth
+
'px; height: '
+
imageHeight
+
'px; overflow: hidden;" >
<div id="page"><canvas id="the-canvas"></canvas></page
></div>'
;
strVar2
+=
'<div id="seepdf" style=" width:'
+
imageWidth
+
'px; height: '
+
imageHeight
+
'px; overflow: hidden;" >
<canvas id="the-canvas" width="'
+
imageWidth
+
'" height="'
+
imageHeight
+
'"></canvas
></div>'
;
document
.
getElementById
(
'pdfPreviewInner'
).
innerHTML
=
strVar2
;
...
...
@@ -761,10 +761,12 @@ PDFJS.getDocument(pfd_url)
})
.
then
(
function
(
page
)
{
// Set scale (zoom) level
var
scale
=
1
.35
;
var
scale
=
1
;
// Get viewport (dimensions)
var
viewport
=
page
.
getViewport
(
scale
);
//var viewport = page.getViewport(scale);
// Get canvas#the-canvas
var
canvas
=
document
.
getElementById
(
'the-canvas'
);
...
...
@@ -773,9 +775,10 @@ PDFJS.getDocument(pfd_url)
var
context
=
canvas
.
getContext
(
'2d'
);
// Set dimensions to Canvas
canvas
.
height
=
viewport
.
h
eight
;
canvas
.
width
=
viewport
.
w
idth
;
canvas
.
height
=
imageH
eight
;
canvas
.
width
=
imageW
idth
;
var
viewport
=
page
.
getViewport
(
canvas
.
width
/
page
.
getViewport
(
1.0
).
width
);
// Prepare object needed by render method
var
renderContext
=
{
canvasContext
:
context
,
...
...
Please
register
or
sign in
to post a comment