Good evening..
I Stored an pdf file to varbinary field in Sql Server successfully and retrieved is as it is but my problem is during retrieve i have to put some watermark on it , for that i tried fpdf methods but it didnt parse it so please help me to come out from it
Thanks
Regards
Raghu
What I have tried:
Hide Shrink Copy Code
<?php
require_once('fpdf/fpdf.php');
require_once('fpdi/fpdi.php');
require_once('connection.php');
$strSQL = "SELECT * FROM files WHERE FilesID = '".$_GET["FilesID"]."' ";
$objQuery = sqlsrv_query($strSQL) or die ("Error Query [".$strSQL."]");
$objResult =sqlsrv_fetch_assoc($con,$objQuery);
header("Content-Type: ".$objResult["FilesType"]);
$pdf = new FPDI();
$pdf->AddPage();
$pdf->setSourceFile($objResult["FilesName"]);
$tplIdx = $pdf->importPage(1);
$pdf->useTemplate($tplIdx, 10, 10, 100);
$pdf->SetFont('Helvetica');
$pdf->SetTextColor(255, 0, 0);
$pdf->SetXY(30, 30);
$pdf->Write(0, 'I tried it');
$pdf->Output();
?>
CodingForums...
ما را در سایت CodingForums دنبال می کنید
برچسب : نویسنده : codingforums بازدید : 227 تاريخ : دوشنبه 29 خرداد 1396 ساعت: 3:33