edit pdf done
Showing
4 changed files
with
12 additions
and
11 deletions
| ... | @@ -139,10 +139,10 @@ class ApiController extends Controller | ... | @@ -139,10 +139,10 @@ class ApiController extends Controller |
| 139 | 139 | ||
| 140 | $pdf = new PdfController(); | 140 | $pdf = new PdfController(); |
| 141 | $pdf = $pdf->pdf($pdfId); | 141 | $pdf = $pdf->pdf($pdfId); |
| 142 | //$response = $pdf; | 142 | $response = $pdfId; |
| 143 | $statusCode = 200; | 143 | $statusCode = 200; |
| 144 | 144 | ||
| 145 | return Response::json('good', $statusCode); | 145 | return Response::json( $response, $statusCode); |
| 146 | 146 | ||
| 147 | 147 | ||
| 148 | 148 | ||
| ... | @@ -177,13 +177,14 @@ class ApiController extends Controller | ... | @@ -177,13 +177,14 @@ class ApiController extends Controller |
| 177 | public function getpdfgoogle($json) | 177 | public function getpdfgoogle($json) |
| 178 | { | 178 | { |
| 179 | 179 | ||
| 180 | $id = new pdfModel(); | ||
| 181 | $id = $id->getpdfid($json)->get(); | ||
| 182 | |||
| 183 | $rows = new pdfModel(); | 180 | $rows = new pdfModel(); |
| 181 | $id = $rows->getpdfid($json)->get(); | ||
| 182 | |||
| 183 | // $rows = new pdfModel(); | ||
| 184 | $rows = $rows->getpdf($id[0]->pdfid)->get(); | 184 | $rows = $rows->getpdf($id[0]->pdfid)->get(); |
| 185 | $response = $rows; | 185 | $response = $rows; |
| 186 | $statusCode = 200; | 186 | $statusCode = 200; |
| 187 | //var_dump($rows); | ||
| 187 | return Response::json($response, $statusCode); | 188 | return Response::json($response, $statusCode); |
| 188 | 189 | ||
| 189 | } | 190 | } | ... | ... |
| ... | @@ -33,7 +33,7 @@ class PdfController extends Controller | ... | @@ -33,7 +33,7 @@ class PdfController extends Controller |
| 33 | $searchpath = "$folder"; | 33 | $searchpath = "$folder"; |
| 34 | $pdffile = $searchpath.'/'.$rows[0]->file; | 34 | $pdffile = $searchpath.'/'.$rows[0]->file; |
| 35 | //$outfile=""; | 35 | //$outfile=""; |
| 36 | $title = "Test Pages"; | 36 | |
| 37 | $pageHeight = $rows[0]->pheight; | 37 | $pageHeight = $rows[0]->pheight; |
| 38 | $pageWidth = $rows[0]->pwidth; | 38 | $pageWidth = $rows[0]->pwidth; |
| 39 | 39 | ||
| ... | @@ -61,8 +61,8 @@ try { | ... | @@ -61,8 +61,8 @@ try { |
| 61 | if ($p->begin_document($outfile, "") == 0) | 61 | if ($p->begin_document($outfile, "") == 0) |
| 62 | die("Error: " . $p->get_errmsg()); | 62 | die("Error: " . $p->get_errmsg()); |
| 63 | 63 | ||
| 64 | $p->set_info("Creator", "Rock Star Jeff"); | 64 | $p->set_info("Creator", "Tenzing Communications"); |
| 65 | $p->set_info("Title", $title ); | 65 | $p->set_info("Title", $rows[0]->name ); |
| 66 | 66 | ||
| 67 | /* Open the input PDF */ | 67 | /* Open the input PDF */ |
| 68 | $response = $storagePath.$pdffile; | 68 | $response = $storagePath.$pdffile; | ... | ... |
| ... | @@ -32,12 +32,12 @@ class pdfModel extends Model | ... | @@ -32,12 +32,12 @@ class pdfModel extends Model |
| 32 | 32 | ||
| 33 | 33 | ||
| 34 | $rows = DB::table('PDF') | 34 | $rows = DB::table('PDF') |
| 35 | |||
| 35 | ->join('changesPDF', 'PDF_idPDF', '=', 'idPDF') | 36 | ->join('changesPDF', 'PDF_idPDF', '=', 'idPDF') |
| 36 | ->join('stylesPDF', 'stylesPDF_idstylesPDF', '=', 'idstylesPDF') | 37 | ->join('stylesPDF', 'stylesPDF_idstylesPDF', '=', 'idstylesPDF') |
| 37 | ->join('change_typePDF', 'idchange_typePDF', '=', 'change_typePDF_idchange_typePDF') | 38 | ->join('change_typePDF', 'idchange_typePDF', '=', 'change_typePDF_idchange_typePDF') |
| 38 | ->where('PDF.idPDF','=', $id) | 39 | ->where('PDF.idPDF','=', $id) |
| 39 | ->orderBy('changesPDF.order', 'asc'); | 40 | ->orderBy('changesPDF.order', 'ASC'); |
| 40 | |||
| 41 | 41 | ||
| 42 | return $rows; | 42 | return $rows; |
| 43 | } | 43 | } |
| ... | @@ -137,7 +137,7 @@ class pdfModel extends Model | ... | @@ -137,7 +137,7 @@ class pdfModel extends Model |
| 137 | ); | 137 | ); |
| 138 | 138 | ||
| 139 | $idchangesPDF = DB::table('changesPDF')->insertGetId( | 139 | $idchangesPDF = DB::table('changesPDF')->insertGetId( |
| 140 | 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' => '') | 140 | 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' => '') |
| 141 | ); | 141 | ); |
| 142 | 142 | ||
| 143 | } | 143 | } | ... | ... |
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment