Friday, September 2, 2016

How to comment using Facebook jquery SDK for specific topic,post,page and etc..[SOLVED] ?


Its easy to comment facebook api for specific topic using below Facebook example.? but I need to clarify one important things which user do not know and lot of time spend in  RND in google

Let me explain , if someone want to take conversion for specific topic/post and one more importance thing is particular  website user against conversation .

Note :  data-href field is uniquely identifier which specify whatever.......conversation over Facebook using  API in ow application

Facebook Jquery example


<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-comments" data-colorscheme="light" data-href="http://stage.talendrone.com/ampanel/candidate/detail/3307" data-numposts="5" width="700">

</div>

Thursday, August 25, 2016

How to convert PDF file using HTML and CSS with watermark in php

Hi , I am really happy to share which I have found one of the library  to  create PDF file as per design it nice and easily integrate using PHP.

Step1. download the library from github then extract it and paste into http://localhost/mpdf (xampp/htdoc/mpdf).

Step2. Create a generatepdf.php file within mpdf folder and paste the below code like

 Step3. include the library class mPDF

require(mpdf.php");
$img = 'phptechnicalgroupLogo.png';

$html = '<style>
table { border-collapse: collapse; margin-top: 0; text-align: center; }
td { padding: 0.5em; }
h1 { margin-bottom: 0; }z
</style>


<table border="0" cellspacing="0" cellpadding="0" width="100">
<tr>
<td><img style="vertical-align: top" src="'.$img.'" width="300" /></td><td></td><td></td>
</tr>

</table>



<table border="0" cellspacing="0" cellpadding="0" width="90%" align="center">
<tr>
<td style="text-align:center;width:100%;" style="padding-top:100px;padding-bottom:10px;"><h2><u>Candidate Profile Details</u></h2></td>
</tr>
<tr>
<td style="width:100%;vertical-align:top;padding-left:130px;">
<TABLE border="0" cellspacing="0" cellpadding="0" width="100%">

<TR>
<TD  style="text-align:left;width:45%;font-face:verdana;font-size:14px;"><b>First Name</b></TD>
<TD  style="text-align:center;width:5%;font-face:verdana;font-size:14px;"><b>:</b></TD>
<TD  style="text-align:left;width:50%;font-face:verdana;font-size:14px;">Bikash ranjan</TD>
</TR>
<TR>
<TD style="text-align:left;font-face:verdana;font-size:14px;"><b>Last Name</TD>
<TD  style="text-align:center;font-face:verdana;font-size:14px;"><b>:</b></TD>
<TD  style="text-align:left;font-face:verdana;font-size:14px;">nayak</b></TD>
</TR>
<TR>
<TD style="text-align:left;font-face:verdana;font-size:14px;"><b>Position Title</TD>
<TD  style="text-align:center;font-face:verdana;font-size:14px;"><b>:</b></TD>
<TD  style="text-align:left;font-face:verdana;font-size:14px;">role</TD>
</TR><TR>
<TD style="text-align:left;font-face:verdana;font-size:14px;"><b>Candidate Total Experience</TD>
<TD  style="text-align:center;font-face:verdana;font-size:14px;"><b>:</b></TD>
<TD  style="text-align:left;font-face:verdana;font-size:14px;">2 Month</b></TD>
</TR>
<TR>
<TD style="text-align:left;font-face:verdana;font-size:14px;"><b>Candidates Relevant Experience</TD>
<TD  style="text-align:center;font-face:verdana;font-size:14px;"><b>:</b></TD>
</tr>
</TABLE>
</td>
</tr></table>';
##################CREATE AN OBJECT OF mPDF class#################
$mpdf=new mPDF('c');
$mpdf->WriteHTML($html);

//call watermark content aand image
$mpdf->SetWatermarkText('TALENDRONE.COM');
$mpdf->showWatermarkText = true;
$mpdf->watermarkTextAlpha = 0.1;


//save the file put which location you need folder/filname
$mpdf->Output("bikashprofile.pdf", 'F');


//out put in browser below output function
//$mpdf->Output();


Output in New PDF file