English | 日本
C++ PDF
Shopping CartContact Us PDF C#
Adobe C++
C# PDF

Create PDF Applications in PHP

A few lines of PHP code are all it takes to convert Word to PDF for your .NET application:

...
 // get the name of the input PDF
  $inputFile = "C:\\PHP\\Test1.docx";
  
  // get the name of the output MS-WORD file
  $outputFile = "C:\\PHP\\Test1.pdf";
  
  try
    {
	  $oLoader = new COM("easyPDF.Loader.8");
      $oPrinter = $oLoader->LoadObject("easyPDF.Printer.8");
      $oPrintJob = $oPrinter->PrintJob;
      $oPrintJob->PrintOut ($inputFile, $outputFile);
      print "Success";
    }
 
  catch(com_exception $e)
    {
      Print "error code".$e->getcode(). "\n";
      print $e->getMessage();
    }
...

Comprehensive PHP PDF API features

BCL easyPDF SDK comes with all the PDF features that you may need in developing enterprise .NET server applications:

  • Create PDF
  • Process PDF
  • Rasterize PDF

Create PDF using PHP in Server Applications

...
 // get the name of the input PDF
  $inputFile = "C:\\PHP\\Test1.docx";
  
  // get the name of the output MS-WORD file
  $outputFile = "C:\\PHP\\Test1.pdf";
  
  try
    {
	    $oLoader = new COM("easyPDF.Loader.8");
      $oPrinter = $oLoader->LoadObject("easyPDF.Printer.8");
      $oPrintJob = $oPrinter->PrintJob;
      $oPrintJob->PrintOut ($inputFile, $outputFile);
      print "Success";
    }
 
  catch(com_exception $e)
    {
      Print "error code".$e->getcode(). "\n";
      print $e->getMessage();
    }
...	
                  


Write PHP Programs to Process and Manipulate PDF (Merging PDFs, Splitting PDF, Extracting Text from PDF, etc)

  • Read the PDFProcessor Object Specification
    This object lets you do post-processing of existing PDF files (such as merging multiple PDF files into one, splitting one PDF file into two, and encrypting/decrypting a PDF file)

Merging PDF Files

...
 // get the name of the input PDFs
  $inputFile1 =  "Test1.pdf";
  $inputFile2 =  "Test2.pdf";
  
  // get the name of the output PDF
  $outputFile = "TestMerge.pdf";
  
	try
	{
		$oProc = new COM("easyPDF.PDFProcessor.8");
		$oProc->Merge ($inputFile1, $inputFile2, $outputFile);
		print "Success";
	}
 
	catch(com_exception $e)
	{
		Print "error code".$e->getcode(). "\n";
		print $e->getMessage();
	}
...
                  

 

Splitting PDF

...
 // get the name of the input PDF
  $inputFile =  "TestMergeBatch.pdf";
  
  // get the name of the output PDFs
  $outputFile1 = "TestSplit1.pdf";  
  $outputFile2 = "TestSplit2.pdf";
  
  try
	{
		$oProc = new COM("easyPDF.PDFProcessor.8");
		$oProc->Split ($inputFile, $outputFile1, $outputFile2, 1);
		print "Success";
	}
 
	catch(com_exception $e)
	{
		Print "error code".$e->getcode(). "\n";
		print $e->getMessage();
	}
...
                  

 

Extracting Text from PDF

...
// get the name of the input PDF
  $inputFile =  "C:\\PHP\\Test1.pdf";
  
  // get the name of the output text file
  $outputFile = "C:\\PHP\\TestExtractText.txt";
  
	try
	{
		$oProc = new COM("easyPDF.PDFProcessor.8");
		$oProc->ExtractText ($inputFile, $outputFile);
		print "Success";
	}
 
	catch(com_exception $e)
	{
		Print "error code".$e->getcode(). "\n";
		print $e->getMessage();
	}
...
                  

 

Write PHP Program to Rasterize PDF

...
  // get the name of the input PDF
  $inputFile =  "Test1.pdf";
  
  // get the name of the output Image
  $outputFile = "Out.jpg";
  
	try
	{
		$oConv = new COM("easyPDF.PDFConverter.8");
		$tImag = $oConv->PDF2Image;
		$tImag->ImageFormat = 1; //Jpeg
		$tImag->Convert($inputFile, $outputFile);
		print "Success";
	}
 
	catch(com_exception $e)
	{
		Print "error code".$e->getcode(). "\n";
		print $e->getMessage();
	}
...
                  

 

Download Free Trial

Request Pricing

Complete PDF Features
  • “easyPDF SDK setup was very straightforward, unlike our experience with other products. We wrote just a few lines of code to start using it.” Read the case study
  • “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.” Read the case study
 
C++ Adobe
© 1993 - , BCL Technologies.
All other trademarks are the property of their respective owners.