troubleshooting Question

How to make cfdocument load pdf faster?

Avatar of dawes4000
dawes4000Flag for United States of America asked on
ColdFusion Language
5 Comments1 Solution1036 ViewsLast Modified:
The rendering of <cfdocument format="pdf"> takes FOREVER.
I have tried using a progressbar and <cfflush> but the document just doesn't render fast enough.
Any suggestions?
<!--- Code Begins --->
<cfquery name="qryClassDetail" datasource="#session.connString#">
SELECT     tblParts.PartID, tblParts.Description, tblParts.Price, tblParts.Unitofmeasure, tblParts.resale, tblParts.NetPricing, tblClass.class AS Class,
                      tblClass.Description AS classDescription
FROM         tblParts INNER JOIN
                      tblClass ON tblParts.class = tblClass.class
WHERE     (tblParts.resale = 'y')  AND (tblParts.Price <> '0') AND (tblParts.PartID NOT LIKE '%BLANK%')  AND (tblParts.class NOT LIKE '%2') AND (tblParts.class <> 'DBME') AND (tblParts.class <> 'ELE') AND
                      (tblParts.class <> 'RMB') AND (tblParts.class <> 'SCC') AND (tblParts.class <> 'TP') AND (tblParts.class <> 'MISC') AND (tblParts.class <> 'M&C')
GROUP BY tblClass.class, tblParts.PartID, tblParts.Description, tblParts.Price, tblParts.Unitofmeasure, tblParts.resale, tblParts.NetPricing,
ORDER BY tblClass.class

<body bgcolor="#FFFFFF" leftmargin="65">
<h3>Please Wait</h3><br>
The pages are loading...<br>
<img name="meter" width="200" height="16" src="../images/progressbar/PercentBlank.gif" border="0" alt="">
<cfloop from="0" to="100" step="25" index="i">
<cfdocument format="pdf">
<table cellpadding="1" cellspacing="0" border="0" width="620">
<cfoutput query="qryClassDetail" group="Class">
      <tr><td colspan="4">&nbsp;</td></tr>
      <tr bgcolor="##4E8FD1">
            <td colspan="4"><font color="##F2F2F2"><h3>&nbsp;&nbsp;#classDescription#</h3></font></td>
      <tr bgcolor="##CCCCCC">
            <td width="140"><strong> Image</strong></td>
            <td width="100"><strong>PartID</strong></td>
            <td width="328"><strong>Description</strong></td>
            <td align="center" width="52"><strong>Retail</strong></td>
            <cfif qryClassDetail.resale NEQ "n">
                  <cfset PartID = trim(qryClassDetail.PartID)>
                  <cfset netPrice=qryClassDetail.netPricing>
                              <td align="left">
                                    <img height="40" src="../images/parts/#trim(PartID)#.jpg" border="0">
                                    &nbsp;#qryClassDetail.Description# (#trim(qryClassDetail.UnitofMeasure)#)                        
                              <td align="right">
                                    #NumberFormat(qryClassDetail.price,'______.__')# &nbsp;
                                    <cfif netPrice EQ "n">
                                          <br />
                                          <font style="text-align:right">(net)</font>&nbsp;
<script language="javascript">
document.images["meter"].src = '../images/progressbar/Percent#i#.gif';

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Log in to continue reading
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform for $9.99/mo
View membership options
Unlock 1 Answer and 5 Comments.
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
The Value of Experts Exchange in My Daily IT Life

Experts Exchange (EE) has become my company's go-to resource to get answers. I've used EE to make decisions, solve problems and even save customers. OutagesIO has been a challenging project and... Keep reading >>


Owner of Outages.IO
Phoenix, Arizona, United States
Member Since 2016
Join a full scale community that combines the best parts of other tools into one platform.
Unlock 1 Answer and 5 Comments.
View membership options
“All of life is about relationships, and EE has made a virtual community a real community. It lifts everyone's boat.”
William Peck

Member since 2004