HTML to PDF PHP

Develop HTML to PDF PHP Programs in just minutes

Do you need to develop HTML to PDF PHP converter that is stable, highly customizable and more scalable then others then this PDF SDK is for you! It makes conversion process easy, quick and converts HTML to PDF in PHP with excellent quality.

Create an application with little effort! A few lines of PHP code to build an HTML to PDF PHP application:

...
 try {

echo "Printing!";

$loader_ojb = new COM("easyPDF.Loader.8");
 $printr_obj = $loader_ojb->LoadObject("easyPDF.Printer.8");
 $print_job = $printr_obj->IEPrintJob;
 $print_job->PrintOut($inputFile, $outputFile);

print " DONE! ";
 }
 catch (Exception $exception) {
 print "\r\n ERROR : ";
 print $exception->getMessage();
 print "\r\n" ;
 print $print_job->ConversionResultMessage();
 print "\r\n" ;
 print $print_job->PrinterResultMessage();
 }
 ...

Start producing high quality and customizable PDF files in PHP today, install HTML to PDF PDF SDK now!

PDF SDK offers one of the best quality of HTML to PDF PHP conversion on the market. Many other programming languages are supported as well.

HTML file. Basic HTML to PDF PHP conversion with HTML to PDF SDK
HTML – input file (http://www.pdfonline.com/easypdf/sdk/faqs/pdf-api-pdfax-supports.htm)
PDF file. Basic HTML to PDF PHP conversion with HTML to PDF SDK
PDF created from HTML PHP by HTML to PDF SDK

Use any HTML file or website’s URL to generate PDF in PHP quickly. You can always add additional settings to your convertor’s code, such as margins, page width, smart shrinking, font replacements and hyperlinks preservation.

Create HTML to PDF PHP converter with a diversity of settings

Two easy steps are all it takes to make a powerful PHP to PDF converter which replaces the fonts, saves page width and preserves all hyperlinks.

  1. Download free HTML to PDF SDK trial with plenty of valuable PDF libraries;
  2. Use the following lines of code with your desktop or server application:

$printjob = $printer->getPrintJob();
   $pdfSettings = $printjob->getPDFSetting();
   $pdfSettings->setFontEmbedding(BCL\easyPDF\Printer\prnFontEmbedding::PRN_FONT_EMBED_FULLSET);
   $pdfSettings->setFontEmbedAsType0(true);
   $pdfSettings->setImageCompression(BCL\easyPDF\Printer\prnImageCompression::PRN_IMAGE_COMPRESS_JPEG);
   $pdfSettings->setImageJPEGQuality(85);
   $pdfSettings->setImageDownsizing(true);
   $pdfSettings->setImageDownsizeResolution(300);
   $pdfSettings->setViewerPanel(BCL\easyPDF\Printer\prnViewerPanel::PRN_VIEWER_PANEL_NONE);
   $pdfSettings->setViewerPageLayout(BCL\easyPDF\Printer\prnViewerPageLayout::PRN_VIEWER_PAGE_LAYOUT_SINGLE);
   $pdfSettings->setViewerMagnification(BCL\easyPDF\Printer\prnViewerMagnification::PRN_VIEWER_MAGNIFICATION_FITWIDTH);
   $pdfSettings->setViewerPrintScaling(BCL\easyPDF\Printer\prnViewerPrintScaling::PRN_VIEWER_PRINT_SCALING_DEFAULT);
   $pdfSettings->setViewerHideMenuBar(false);
   $pdfSettings->setViewerHideToolBar(false);
   $pdfSettings->setViewerHideWinControls(false);
   $pdfSettings->setSignature(false);
   $pdfSettings->setStandardPdfAConformance(BCL\easyPDF\Printer\prnPdfAConformance::PRN_PDFA_CONFORM_NONE);
   $pdfSettings->setStandardPdfXConformance(BCL\easyPDF\Printer\prnPdfXConformance::PRN_PDFX_CONFORM_NONE);
   $pdfSettings->setStandardCmykProfile("");

Add metadata set function to your HTML to PDF PHP converter when it is needed:


$pdfSettings->setMetaData(true);
 $pdfSettings->setMetaDataTitle("title");
 $pdfSettings->setMetaDataAuthor("author");
 $pdfSettings->setMetaDataSubject("subject");
 $pdfSettings->setMetaDataKeywords("keyword");
 $pdfSettings->setMetaDataCreator("creator");
 $printjob->PrintOut($inputFileName, $outputFileName); 

Use the ability to handle all errors for your HTML to PDF PHP documents generator:

{
 echo $ex->getMessage(), "\n";
}
finally
{
 $printer = null;
}
HTML file. Basic HTML to PDF PHP conversion with HTML to PDF SDK
HTML – input file (http://www.pdfonline.com/easypdf/sdk/faqs/pdf-api-pdfax-supports.htm)
PDF file. HTML to PDF PHP conversion with HTML to PDF SDK
PDF created from HTML PHP with the code

Convert HTML to PDF in PHP without codding

BCL HTML to PDF converter SDK comes with an exclusive combination of different features and visual interface. No PHP coding is needed to produce PDF files from HTML with multiple settings. Our API Explorer can help anyone to develop HTML to PDF PHP converter with different levels of customization. It takes only a few minutes! It produces the code for you, and also builds an executable file.

HTML to PDF PHP API visual interface

PDF Features for HTML to PDF PHP Programming

BCL HTML to PDF API provides a high-level PHP API for converting numerous file formats to PDF, modifying existing PDF files, converting PDF files to a variety of image formats, and populating PDF form fields. It is a commercially supported toolkit that is powerful and easy to use in any PHP application that works with PDF documents.

BCL HTML to PDF API is engineered to withstand the rigors of server-side use but is flexible enough for both server and desktop deployments. Several lines of code are all that’s required to generate and post-process your PDF documents in PHP.

This PHP convertor’s API has several different PrintJob types, and each of them let users getting the best and precise rendering results. PDF looks exactly similar to PHP and HTML page in a browser. Both PDF/A & PDF/X standards are supported. Robust error handling mechanism handles many problems during PDF modification, merging and conversion. Conversion speed and reliability were tested on PDFOnline.com free PDF conversion service. It processes thousands of PDF conversions per day and runs non-stop with no human operator.

Leading enterprise software developers and well-known business already benefit from all the features supported by HTML to PDF SDK and convert thousands of HTML to PDF in PHP on a daily bases. You too can benefit from downloading HTML to PDF PHP free SDK trial!

HTML to PDF PHP API references

Our software development kit has the following API and Libraries with outstanding features:

  • PDF Printer API – Convert documents in various formats to PDF with the best quality;
  • PDF Processor API – Merging, Splitting, Rotating, Deleting, Extracting and Optimizing PDF files;
  • PDF Converter API – Rasterizing PDF into BMP, GIF, JPEG, PNG, and TIFF image formats;
  • PDF Document API – Extracting, inserting, and updating data in PDF Forms.

BCL professional helpdesk can assist you in integrating any of those APIs with your desktop or server application. Download and test it now!

Frequently Asked Questions

Read more

Software engineers appreciate our HTML to PDF PHP converter API

“We evaluated many PDF tools and drivers. We even wrote our own. Except for BCL’s easyPDF SDK, all had limitations we couldn’t live with. Some only converted from MS Office and not very well. Others could not do annotation or text stamping on PDF documents. None were as easy to use and as easy to integrate.
– Shaun Hess, Software Architect TaxWorks

BCL technical support team is ready to help you in customizing any HTML to PDF PHP application for your enterprise. Feel free to contact us anytime!

Check BCL easyPDF SDK User Manual for more information and PDF PHP Documentation to be familiar with all HTML to PDF SDK capabilities and become a real professional in PDF developing and manipulation.

If you are looking for another solution feel free to check our PDF Creator API, Desktop Solutions, and PDF Online Converters.