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
be9eddd7
authored
2016-07-18 11:12:16 -0400
by
Jeff Balicki
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
edit pdf done
1 parent
362be453
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
11 deletions
app/Http/Controllers/ApiController.php
app/Http/Controllers/PdfController.php
app/pdfModel.php
public/files/js/interfaceGdrive.js
app/Http/Controllers/ApiController.php
View file @
be9eddd
...
...
@@ -139,10 +139,10 @@ class ApiController extends Controller
$pdf
=
new
PdfController
();
$pdf
=
$pdf
->
pdf
(
$pdfId
);
//$response = $pdf
;
$response
=
$pdfId
;
$statusCode
=
200
;
return
Response
::
json
(
'good'
,
$statusCode
);
return
Response
::
json
(
$response
,
$statusCode
);
...
...
@@ -177,13 +177,14 @@ class ApiController extends Controller
public
function
getpdfgoogle
(
$json
)
{
$
id
=
new
pdfModel
();
$id
=
$
id
->
getpdfid
(
$json
)
->
get
();
$
rows
=
new
pdfModel
();
$id
=
$
rows
->
getpdfid
(
$json
)
->
get
();
$rows
=
new
pdfModel
();
//
$rows = new pdfModel();
$rows
=
$rows
->
getpdf
(
$id
[
0
]
->
pdfid
)
->
get
();
$response
=
$rows
;
$statusCode
=
200
;
//var_dump($rows);
return
Response
::
json
(
$response
,
$statusCode
);
}
...
...
app/Http/Controllers/PdfController.php
View file @
be9eddd
...
...
@@ -33,7 +33,7 @@ class PdfController extends Controller
$searchpath
=
"
$folder
"
;
$pdffile
=
$searchpath
.
'/'
.
$rows
[
0
]
->
file
;
//$outfile="";
$title
=
"Test Pages"
;
$pageHeight
=
$rows
[
0
]
->
pheight
;
$pageWidth
=
$rows
[
0
]
->
pwidth
;
...
...
@@ -61,8 +61,8 @@ try {
if
(
$p
->
begin_document
(
$outfile
,
""
)
==
0
)
die
(
"Error: "
.
$p
->
get_errmsg
());
$p
->
set_info
(
"Creator"
,
"
Rock Star Jeff
"
);
$p
->
set_info
(
"Title"
,
$
titl
e
);
$p
->
set_info
(
"Creator"
,
"
Tenzing Communications
"
);
$p
->
set_info
(
"Title"
,
$
rows
[
0
]
->
nam
e
);
/* Open the input PDF */
$response
=
$storagePath
.
$pdffile
;
...
...
app/pdfModel.php
View file @
be9eddd
...
...
@@ -32,12 +32,12 @@ class pdfModel extends Model
$rows
=
DB
::
table
(
'PDF'
)
->
join
(
'changesPDF'
,
'PDF_idPDF'
,
'='
,
'idPDF'
)
->
join
(
'stylesPDF'
,
'stylesPDF_idstylesPDF'
,
'='
,
'idstylesPDF'
)
->
join
(
'change_typePDF'
,
'idchange_typePDF'
,
'='
,
'change_typePDF_idchange_typePDF'
)
->
where
(
'PDF.idPDF'
,
'='
,
$id
)
->
orderBy
(
'changesPDF.order'
,
'asc'
);
->
orderBy
(
'changesPDF.order'
,
'ASC'
);
return
$rows
;
}
...
...
@@ -137,7 +137,7 @@ class pdfModel extends Model
);
$idchangesPDF
=
DB
::
table
(
'changesPDF'
)
->
insertGetId
(
array
(
'PDF_idPDF'
=>
$pdfId
,
'change_typePDF_idchange_typePDF'
=>
$change
->
idchange_typePDF
,
'stylesPDF_idstylesPDF'
=>
$idstylesPDF
,
'locationUp'
=>
$change
->
locationUp
,
'locationRight'
=>
$change
->
locationRight
,
'width'
=>
$change
->
width
,
'height'
=>
$change
->
height
,
'pages'
=>
$change
->
pages
,
'content'
=>
$content
,
'z-index'
=>
''
)
array
(
'PDF_idPDF'
=>
$pdfId
,
'change_typePDF_idchange_typePDF'
=>
$change
->
idchange_typePDF
,
'stylesPDF_idstylesPDF'
=>
$idstylesPDF
,
'locationUp'
=>
$change
->
locationUp
,
'locationRight'
=>
$change
->
locationRight
,
'width'
=>
$change
->
width
,
'height'
=>
$change
->
height
,
'names'
=>
$change
->
names
,
'example'
=>
$change
->
example
,
'tips'
=>
$change
->
tips
,
'order'
=>
$change
->
order
,
'pages'
=>
$change
->
pages
,
'content'
=>
$content
,
'z-index'
=>
''
)
);
}
...
...
public/files/js/interfaceGdrive.js
View file @
be9eddd
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to post a comment