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
80d33c68
authored
2016-09-02 11:20:15 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
embed pdf
1 parent
39ca8fdb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
public/files/js/interfaceGdrive.js
public/files/js/interfaceGdrive.js
View file @
80d33c6
var
pluginUrl
=
window
.
location
.
protocol
+
'//'
+
window
.
location
.
host
;
var
pdf_customizer
=
"http
s://pdf-customizer.synapsus.co
"
;
var
pluginUrl
=
window
.
location
.
protocol
+
'//'
+
window
.
location
.
host
+
'/commonwell'
;
var
pdf_customizer
=
"http
://localhost:8888/pdf-customizer/public
"
;
//var pluginUrl = "http://contact.gotenzing.com";
//var pdf_customizer = "http://pdf-customizer.synapsus.co";
...
...
@@ -65,7 +65,7 @@ function ShowBox(pheight, pwidth, up, right, height, width, count, example) {
jQuery
(
document
).
ready
(
function
(
$
)
{
$
(
'span'
).
hide
();
$
(
'#span'
+
count
).
show
();
$
(
'#Canvas'
).
css
(
"background-image"
,
"url("
+
pdf_customizer
+
'/fileentry/getImage/'
+
example
+
")"
);
//
$('#Canvas').css("background-image", "url(" + pdf_customizer + '/fileentry/getImage/' + example + ")");
var
Qc
=
document
.
getElementById
(
"Canvas"
);
var
Qctx
=
Qc
.
getContext
(
"2d"
);
...
...
@@ -279,7 +279,7 @@ function changePdfOptions(json, edit) {
pdflist
+=
'<div id="pdfPreview" style="" class="column">'
;
// pdflist += '<img id="pdfimage" src="' + pdf_customizer + '/fileentry/getImage/' + json[0].folder + '/' + json[0].example + '" width="300px">';
pdflist
+=
'<canvas id="Canvas" width="'
+
imageWidth
+
'" height="'
+
imageHeight
+
'" style=" margin-top:'
+
imgTop
+
'%; display: block; margin-left: auto; margin-right: auto; border-style: solid; border-width:1px; background-
image: url('
+
pdf_customizer
+
'/fileentry/getImage/'
+
json
[
0
].
folder
+
'/'
+
json
[
0
].
example
+
'); background-
size:'
+
imageWidth
+
'px '
+
imageHeight
+
'px"></canvas><div id="pdfPreviewInner"></div></div>'
;
pdflist
+=
'<canvas id="Canvas" width="'
+
imageWidth
+
'" height="'
+
imageHeight
+
'" style=" margin-top:'
+
imgTop
+
'%; display: block; margin-left: auto; margin-right: auto; border-style: solid; border-width:1px; background-size:'
+
imageWidth
+
'px '
+
imageHeight
+
'px"></canvas><div id="pdfPreviewInner"></div></div>'
;
pdfChange
+=
'<form id="changes" name="changes" enctype="multipart/form-data" action="" METHOD="POST"></br><h4>'
+
json
[
0
].
name
+
'</h4>'
;
pdfChange
+=
'<input type="hidden" id="id" name="id" value="'
+
json
[
0
].
idPDF
+
'">'
;
for
(
i
=
0
;
i
<
json
.
length
;
++
i
)
{
...
...
@@ -654,14 +654,15 @@ function returnOptions(form, preview) {
var
imgLeft
=
30
;
var
imgTop
=
2
;
}
// console.log(jsonReturn);
$
(
"#Canvas"
).
hide
();
$
(
'#changes'
).
hide
();
$
(
'#controls'
).
show
();
$
(
'#pdfPreviewInner'
).
show
();
...
...
@@ -680,7 +681,7 @@ function returnOptions(form, preview) {
var
strVar2
=
""
// strVar2 += ' <div class="callout primary"><div class="row column"><h1 class="pdfeditortitle">CUBOS COLLATERAL MATERIAL</h1>';
//strVar2 += '</div></div><div class="row small-up-2 medium-up-3 large-up-3">';
strVar2
+=
'<div id="seepdf" style=" display:hidden; width:'
+
imageWidth
+
'px;" ><
a class="media" style="display: block; margin-left:auto; margin-right:auto; " href="'
+
pdf_customizer
+
'/fileentry/getPDF/'
+
json
[
0
].
folder
+
'/new_'
+
json
[
0
].
file
+
'" download="'
+
json
[
0
].
file
+
'" ></a
></div>'
;
strVar2
+=
'<div id="seepdf" style=" display:hidden; width:'
+
imageWidth
+
'px;" ><
embed src="'
+
pdf_customizer
+
'/fileentry/getPDF/'
+
json
[
0
].
folder
+
'/new_'
+
json
[
0
].
file
+
'#page=1&toolbar=0&navpanes=0&scrollbar=0statusbar=0" width="'
+
imageWidth
+
'" height="'
+
imageHeight
+
'" type="application/pdf"
></div>'
;
//<i class="fa fa-cloud-download fa-5x"></i></br>Download Here</a>
document
.
getElementById
(
'pdfPreviewInner'
).
innerHTML
=
strVar2
;
...
...
Please
register
or
sign in
to post a comment