
Tips and Tricks
Create
PDF from COLD FUSION with BCL’s
easyPDF SDK
Now you can create PDF documents from COLD Fusion quickly with
some simple code. Simply modify the code below and include in
your program, and you can create, merge and manipulate PDF documents
from our Cold Fusion application. BCL easyPDF SDK allows true
unlimited multithreaded code and robust error handling.
Sample
code for managing easyPDF from COLD Fusion application:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<cfobject type= "COM" action="Create" class
= "easyPdfSdk.Loader" name = "oLoader">
<cfset printer = oLoader.Printer>
<cfset oPrintJob = printer.PrintJob>
<cftry>
<cfset oPrintJob.PrintOut("c:\input.html", "c:\output.pdf")>
<cfoutput >"Success"</cfoutput>
<cfcatch>
<cfoutput>
<p>an exception is caught #cfcatch.Message#</p>
<p>#oPrintJob.ConversionResultMessage#</p>
<p>#oPrintJob.PrinterResultMessage#
</p>
</cfoutput>
</cfcatch>
< /cftry>
< /body>
< /html>
Learn
more about easyPDF SDK page
|