select * from mytable select * from mytable select * from mytable

CFPDF merge error: Error casting an object of type com.adobe.internal.pdftoolkit.core.types.ASString cannot be cast to [B to an incompatible type

229 views Asked by At

I am trying to merge a series of pdf files I have created with cfthread. I am using the following code:

<cfquery name="data">
select * from mytable
</cfquery>
<cfset threadList = "">
<cfloop index="x" from="1" to="#data.recordcount#"> 
    <cfset name = "threadnumber#x#"> 
    <cfset threadList = listAppend(threadList,name)>
    <cfthread name="#name#">
        <cfloop query="data">
            <cfpdf action="read" name="myPDF#randrange(1,1000)#" source="#Expandpath('/_pdf/#data.cusip#.pdf')#" />
        </cfloop>
    </cfthread> 
</cfloop>
<cfthread action="join" name="#threadlist#" />  

<cfpdf action="merge" name="final">
    <cfloop list="#threadlist#" index="i">
        <cfloop query="data"> 
            <cfpdfparam source="#Expandpath('/_pdf/#data.cusip#.pdf')#">
        </cfloop>
    </cfloop> 
</cfpdf>

However, I am getting errors like this:

Error casting an object of type com.adobe.internal.pdftoolkit.core.types.ASString cannot be cast to [B to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed.
com.adobe.internal.pdftoolkit.core.types.ASString cannot be cast to [B


The error occurred in D:/inetpub/wwwroot/project1/schedulefocuslist.cfm: line 77
75 :    <cfloop list="#threadlist#" index="i">
76 :        <cfloop query="data"> 
77 :            <cfpdfparam source="#Expandpath('/_pdf/#data.cusip#.pdf')#">
78 :        </cfloop>
79 :    </cfloop> 
0

There are 0 answers