I'm using CFPDF to merge multiple PDFs together. The PDFs were created using wkhtmltopdf 0.12.1. In most cases the code works fine, but 2 of my documents error whenever merged together. My online searches came up empty and I'm really at a loss. Any help is greatly appreciated.
<cfpdf action="merge" destination="#outputFile#" overwrite="yes">
<cfloop index="i" from="1" to="#arrayLen(pdfFiles)#">
<cfpdfparam source="#pdfFiles[i]#">
</cfloop>
</cfpdf>
The error occurs on line 173
<cfpdfparam source="#pdfFiles[i]#">
cfcatch.message
com.adobe.internal.pdftoolkit.core.types.ASString cannot be cast to [B
StackTrace:
java.lang.ClassCastException: com.adobe.internal.pdftoolkit.core.types.ASString cannot be cast to [B
at com.adobe.internal.pdftoolkit.services.interchange.structure.StructureUtil.calculateSuffix(Unknown Source)
at com.adobe.internal.pdftoolkit.services.manipulations.impl.PMMNamedDestinations.getNewDestName(Unknown Source)
at com.adobe.internal.pdftoolkit.services.manipulations.impl.PMMNamedDestinations.cloneNamedDestination(Unknown Source)
at com.adobe.internal.pdftoolkit.services.manipulations.impl.PMMNamedDestinations.cloneDestination(Unknown Source)
at com.adobe.internal.pdftoolkit.services.manipulations.PMMBookmark$AppendBookmark.cloneBookmark(Unknown Source)
at com.adobe.internal.pdftoolkit.services.manipulations.PMMBookmark$AppendBookmark.firstAction(Unknown Source)
at com.adobe.internal.pdftoolkit.services.manipulations.PMMBookmark.walkBookmarksTree(Unknown Source)
at com.adobe.internal.pdftoolkit.services.manipulations.PMMBookmark.walkBookmarksTree(Unknown Source)
at com.adobe.internal.pdftoolkit.services.manipulations.PMMBookmark.appendBookmarks(Unknown Source)
at com.adobe.internal.pdftoolkit.services.manipulations.PMMService.insertPagesinRange(Unknown Source)
at com.adobe.internal.pdftoolkit.services.manipulations.PMMService.appendPages(Unknown Source)
at coldfusion.pdf.PDFDocOperation.merge(PDFDocOperation.java:435)
at coldfusion.tagext.lang.PDFParamTag.doStartTag(PDFParamTag.java:196)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722)
at cfcombineDocs2ecfm834801932.runPage(D:\inetpub\wwwroot\BUSINESS_APPS\rmsouf\docs\combineDocs.cfm:173)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2722)
at cfapplication2ecfc1314889339$funcONREQUEST.runFunction(D:\inetpub\wwwroot\BUSINESS_APPS\rmsouf\application.cfc:155)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:88)
at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:280)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:356)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:79)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62)
at coldfusion.CfmServlet.service(CfmServlet.java:200)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)