But please remember i need a free library which does not disturb css of my webpage and easily convert some part of my webpage. i used Jspdf but it disturbs my webpage's css.
FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.
Quote obtained from their website: http://www.fpdf.org/
Add fpdf file
<?php
require('fpdf.php');
$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',10);
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont('times','B',10);
$pdf->Cell(25,7,"Name",1);
$pdf->Cell(20,7,"address",1);
$pdf->Ln();
$pdf->Cell(450,7,
$pdf->Ln();
?>
Here is the php code
<?php
$name='your name';
$address='ypur address';
$pdf->Cell(25,7,$studid,1);
$pdf->Cell(20,7,$name,1);
$pdf->Cell(40,7,$address,1);
$pdf->Ln();
}
$pdf->Output();
you download fpdf file to this link enter link description here