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
642a5aa2
authored
2016-09-14 09:48:02 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
pdf.js test
1 parent
f0ddff0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
public/files/js/interfaceGdrive.js
public/files/js/interfaceGdrive.js
View file @
642a5aa
...
...
@@ -724,11 +724,30 @@ function finalPdf(data, json) {
$
(
'#controls'
).
hide
();
$
(
'#pdfPreviewInner'
).
show
()
PDFJS
.
disableStream
=
true
;
PDFJS
.
getDocument
(
pdf_customizer
+
'/fileentry/getPDF/'
+
json
[
0
].
folder
+
'/new_'
+
json
[
0
].
file
).
then
(
function
(
pdfFile
)
{
var
pageNumber
=
setpage
;
pdfFile
.
getPage
(
pageNumber
).
then
(
function
(
page
)
{
var
scale
=
1
;
var
viewport
=
page
.
getViewport
(
scale
);
});
});
var
canvas
=
document
.
getElementById
(
'renderedPdf'
);
var
context
=
canvas
.
getContext
(
'2d'
);
var
renderContext
=
{
canvasContext
:
context
,
viewport
:
viewport
};
page
.
render
(
renderContext
);
var
strVar2
=
""
strVar2
+=
'<div id="seepdf" style=" width:'
+
imageWidth
+
'px; height: '
+
imageHeight
+
'px; overflow: hidden;" >
<object style="overflow-x: hidden; overflow-y: hidden; width: '
+
imageWidth
+
'px; height: '
+
imageHeight
+
'px; min-height: 101%; -ms-overflow-style: none |;" data='
+
pdf_customizer
+
'/fileentry/getPDF/'
+
json
[
0
].
folder
+
'/new_'
+
json
[
0
].
file
+
'#page='
+
setpage
+
'&toolbar=0&navpanes=0&;scrollbar=0&statusbar=0" width="'
+
imageWidth
+
'" height="'
+
imageHeight
+
'" type="application/pdf" id="pdfloaded"></object
></div>'
;
strVar2
+=
'<div id="seepdf" style=" width:'
+
imageWidth
+
'px; height: '
+
imageHeight
+
'px; overflow: hidden;" >
<canvas id="renderedPdf"></canvas
></div>'
;
document
.
getElementById
(
'pdfPreviewInner'
).
innerHTML
=
strVar2
;
...
...
Please
register
or
sign in
to post a comment