Html To Pdf Conversion Using Pdfcrowd Library In Php-
Hello Friends Ajj Me Apko Btaunga Ki Aap Kis Prakar Html To Pdf Convert Kar Sakte Ho .Is Post Me Apko Btaya Jayega Ki Kis Prakar Ham Pdfcrowd Api Ka Use Kakre Html To pdf Convert Kar Sakte Hai.
· Sabse Pehle aap https://pdfcrowd.com/ par signup karke account bana lijiye
· Ab Conversion Api Option Open Kijiye
· Ab Next Page Me App Php Par Click Kijiye Yanha Apko Html To Pdf Conversion Ke Liye Api Keys And Full Php Code Mil Jayega
· Aap Niche Diye Gye Link Se Pdfcrowd Ki Liberery Download Kar Lijiye
Ab Pdfcrowd Zip File Ko Extract Kar Lijiye Or Uske Sath Ek Index.Php Name Ki File Bana Lijiye Jisme Niche Diya Gye Code Ko Paste Kar Dijiye.
Index.php
<?php
require 'pdfcrowd.php';
try
{
// create an API client instance
$client = new Pdfcrowd("enter your pdfcrowd username here", "enter your key here");
// convert a web page and store the generated PDF into a $pdf variable
$out_file = fopen("document1.pdf", "wb");
$client->convertHtml("<head></head><body>My HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good LayoutMy HTML is good Layout</body>", $out_file);
fclose($out_file);
// set HTTP response headers
header("Content-Type: application/pdf");~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
header("Cache-Control: max-age=0");
header("Accept-Ranges: none");
header("Content-Disposition: attachment; filename=\"google_com.pdf\"");
// send the generated PDF
echo $pdf;
}
catch(PdfcrowdException $why)
{
echo "Pdfcrowd Error: " . $why;
}
?>
Yanha Aaap Url Code Enter Karke Kisi Be Website Ka Page Ke Data Ko Pdf Me Convert Kar Sakte Ho.
$pdf = $client->convertURI('http://www.google.com/');
Is Parkar Aap Easily Html To Pdf Convert Kar Sakte Ho Me Ummid Karta Hu Ki Apko Mere Ye Post Achi Lagi Hogi. Agar Apko Isme Koi Problem A Rhe Hai To Aap Mujse Comment Section Me Puch Sakte Ho Thank You
Team Gajabwap Web In Hindi
1 comments:
Click here for commentsConversionConversion EmoticonEmoticon