How To Convert Html To Pdf With Fpdf-Full Guide In Hindi

Fpdf Php Libarery
Convert Html To Pdf In Php-

Is Tutorial Me Apko Btaya Jayega Ki Kis Prakar Ham” How To Convert Html To Pdf
Kar Sakte Hai Bina Kisi Software Ki Madad Se .Aur Sath Me Pdf Me Convert Hue Data To Database Me Store Kar Sakte Hai Easily.
Sbse Pehle Aap Www.Fpdf.Com Website Open Kijiye
Ab Aap Downloads Section Me Jaiye
Ab Yanha Se Latest Fpdf Liberary Zip Version Me Download Kar Lijiye(Fpdf Download)
Ya Fir Aap Niche Diye Gye Link Se Download Kar Sakte Ho Yanha Mene Sare File Modifiled Ki Hai Bas Apko Ise Run Karwana Hai Apne System Me



Download Hone Ke Bad File Ko Extract Karke Xamp Server Me Htdocs Folder Ke Ander Paste Kar Dijiye(Agar Aap Wamp Server Use Karte Ho To Www Folder Ke Ander Paste Kar Dijiye.
Ab Apko 2 Files Create Karne Hai Fpdf Folder Ke Ander
Index.Php-Yanha Ham Html Form Bnayege
Form.Php-Yanha Ham Php Coding Karke Data Ko Mysql Me Save Karwayege Or Sath He Html To Pdf Convert Karege By Using Fpdf Liberary




Steps-

Make A HTML Form-
Sabse Pehle Ham Ek Html Form Create Karege Jinha Ham Apni Jrrurt Ke Hisab Se Html Text Box And Submit Button Bnayege


Html Form Example-


insert data in mysql



<center>
<html>

<head>



</head>

<body>
<center>



<br>

<br>
<br>

<br>
<div id="chat_box">

<div id="chat"></div>

</div>



<form method="post" action="form.php" enctype="multipart/form-data">



first_name
<input type="text" name="first_name">
<input type="text" name="msg">

<br>



<input type="submit" name="submit" value="publish now">
</form>
</center>
</body>

</html>






</center>









first_name msg




Make A Php Form

Html to pdf in Php



<?php

$con=mysqli_connect( "localhost","root","","malala");

if(!empty($_POST['submit']))
{
$first_name=$_POST['first_name'];
$msg=$_POST['msg'];
$query ="insert into chat2(first_name,msg) values ('$first_name','$msg')";


if(mysqli_query($con,$query)){
}

require("fpdf.php");
$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont("Arial","B",18);
$pdf->Cell(0,10,"--------------------welcome--{$first_name}",1,1);
$pdf->Cell(50,10,"name :",1,0);
$pdf->Cell(50,10,$first_name,1,1);
$pdf->Cell(50,10,"msg :",1,0);
$pdf->Cell(50,10,$msg,1,1);


$pdf->output();
}
?>




Steps-Ab Ham Ek Php Form Bnayege Or Form.Php Name Se Save Karege

Sabse Pehle Conncetion Bnayege Database Ke Sath (Data Ko Mysql Database Me Store Karne Ke Liye)

Ab Isset Function Ka Use Karege Ki Jab Be Koi Submit Button Par Click Kare To Data Mysql Me Chala Jaye



Ab Ham Fpdf File Ko Yanha Include Karege Jesa Image Me Btaya Gya Hai Taki Fpdf Liberary Ka Use Hoker Dynamic Data(Form Data) Pdf File Me Convert Ho Sake
Iske Bad Hmare Pass Jintne Text Box Or Fileds Hai Ham Unki Cell Set Karege  Takki Hmare Pass Dynamic Data A Sakte
Or Last Me Ham Output Ki Command Dege Jiske Dwara Hmara Pass Output Page Ayega








Download-Mysql File And Import It In Your Databse Table Malala-Ap Mysql Database Me Jakar Malala Name Se Database Bna Le Or Ab Mysql File Ko Import Kar De Isme (Ya Sql Query Open Kijiye Or Niche Diye Gye Data Ko Paste Karke Go Par Click Karke Excute Kar Dijiye Ise.
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 20, 2018 at 06:14 AM
-- Server version: 10.1.26-MariaDB
-- PHP Version: 7.1.8

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `malala`
--
-- --------------------------------------------------------

--
-- Table structure for table `chat2`
--

CREATE TABLE `chat2` (
  `id` int(10) NOT NULL,
  `first_name` varchar(100) NOT NULL,
  `msg` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `chat2`
--

INSERT INTO `chat2` (`id`, `first_name`, `msg`) VALUES
(76, 'hhgghh', 'hjjgggjg'),
(77, 'popo', 'popo'),
(78, 'popojhhj', 'popohjhj'),
(79, '', ''),
(80, 'pp', 'ppp'),
(81, 'pp', 'ppp'),
(82, 'pp', 'pp'),
(83, 'ppkk', 'pp'),
(84, 'ppkk', 'pp'),
(85, 'jkjh', 'hjkkjh'),
(86, 'jkjh', 'hjkkjh'),
(87, 'jkjh', 'hjkkjh'),
(88, 'jkjh', 'hjkkjh'),
(89, 'jkjh', 'hjkkjh'),
(90, 'jkjh', 'hjkkjh'),
(91, 'jkjh', 'hjkkjh'),
(92, 'mmm', 'mmm'),
(93, 'mmm', 'mmm'),
(94, 'mmm', 'mmm'),
(95, 'mm', 'mm'),
(96, 'mmmmmmmmmmm', 'mmmmmmmmmmmmmmmmmmmmmm'),
(97, 'mmmmmmmmmmm', 'mmmmmmmmmmmmmmmmmmmmmm');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `chat2`
--
ALTER TABLE `chat2`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `chat2`
--
ALTER TABLE `chat2`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=98;COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;



How It Work-
Yanha Jo Html Form Hai Wanha Jab Be Ham Data Enter Karege Or sUbmit Button Par Click Karege To Hmara Data Sabse Pehle To Mysql Database Me Store Hoga Or Ham Form.Php  Page Par Redirect Ho Jayege Yanha Hmare Pass Enter Kiya Gya Data Hame Table Ke Ander Show Hoga Or Sath He Right Side Top Me Hmare Pass Print Ka Option Hoga Janha Se Ham Apne Dwara Generate Ki Gyi Pdf File Ko Easily Download Kar Sakte Hai.

Is Parkar Ham Easily Html To Pdf Conversion Kar Sakte Hai Fpdf Php Liberary Ka Use Karke.
Internet Par Kaffi Websites Hai Jo Hame Free Me Online Html To Pdf File Convert Karne Ka Feature Provide Karte Hai. Un Sabhi Websites Me Isi Trah Ki Pdf Php Liberery Ka Use Hota Hai Example Fpdf,Dompdf Etc
Example-
Convert Html To Pdf Online-
Https://Pdfcrowd.Com/
Html2pdf.Com/
Jesa Ki Aap Upper Di  Gye Dono Website Ko Check Kar Sakte Ho Yanha Html To Pdf Conversion Ka Feature Diya Gya Hai Jo Ki Hmare Liye Kaffi Helpful Hai.
Me Ummid Karta Hu Ki Apko Mere Ye Post Achi Lagi Hogi Agar Apko Post Me Koi Be Problem A Rhe Hai To Mujse Comment Me Puch Sakte Hai Me Apki Puri Sahayta Karne Ki Koshish Karunga
Gajabwap Web In Hindi
Thank You
Also Read-


Previous
Next Post »

2 comments

Click here for comments
sam thakur
admin
20 April 2018 at 00:46 ×

nice bro. .....achi post hai

Reply
avatar
Soniya
admin
28 April 2018 at 05:35 ×

nice information bhupender sir your blog is nice

Reply
avatar
Thanks for your comment