Advertisement

09.08.2008 at 04:29PM PDT, ID: 23713888 | Points: 500
[x]
Attachment Details

ColdFusion COM METHOD errors while generating PDF's using ActivePDF

Asked by hc1619 in Cold Fusion Markup Language, ColdFusion Application Server, ColdFusion Studio

Tags: , ,

I have CF page which generates a lot of PDF documents in one go, about 10 in total.  Each document is generally created using cfdocument, but I have cover pages for each document that I create with ActivePDF.  I have one master cover template which sits in my root directory.  I then include the attached code snippet (abbreviated, there's more in it), which goes through and generates the cover page for each document.

At seemingly random occasions CF will spit out this error and stop the process:

An exception occurred when executing a Com method.The cause of this exception was that: AutomationException: 0x80010105 - The server threw an exception..

I will go on to the server and see sometimes that a few cover files were created in the directory, but then one will be there with a 0kb and this is where it stopped.  If I try to delete them out of the directory I get a Windows error that the files are in use.  I need to wait a minute or so before I can delete them.

While I was testing the site in worked OK, very rarely got the errors.  Went live this mornign however and it's happening far too regularly.  

Does anyone know how I can fix this - or what is causing it?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
<CFOBJECT ACTION="Create" TYPE="COM" CLASS=APToolkit.Object NAME="TK">
	
	
	
	
<!---------------------------------------------------------------------------- DEED COVER ------------------------------------------------------------------>
<CFSET r = TK.OpenOutputFile("#test_docs#cover_deed.pdf")>
<CFSET r = TK.OpenInputFile("#root_docs#front_cover_again.pdf")>
 
<cfset usefield = "TrustDeed">
<cfset usevalue = "Fund Deed">
<CFSET TK.SetFormFieldData("#usefield#","#usevalue#",-997)>	
 
<cfset usefield = "TrustName">
<cfset usevalue = "#info.fund_name#">
<CFSET TK.SetFormFieldData("#usefield#","#usevalue#",-997)>	
 
<CFSET r = TK.CopyForm(0,0)>
<CFSET TK.CloseOutputFile()>
 
<!----------------------------------------------------------------------------- PDS COVER -------------------------------------------------------------------------->
<CFSET r = TK.OpenOutputFile("#test_docs#cover_pds.pdf")>
<CFSET r = TK.OpenInputFile("#root_docs#front_cover_again.pdf")>
 
<cfset usefield = "TrustDeed">
<cfset usevalue = "Product Disclosure Statement">
<CFSET TK.SetFormFieldData("#usefield#","#usevalue#",-997)>	
 
<cfset usefield = "TrustName">
<cfset usevalue = "#info.fund_name#">
<CFSET TK.SetFormFieldData("#usefield#","#usevalue#",-997)>	
 
<CFSET r = TK.CopyForm(0,0)>
<CFSET TK.CloseOutputFile()>
 
<CFSET ReleaseComObject(TK)>
 
 
Loading Advertisement...
 
[+][-]09.08.2008 at 06:50PM PDT, ID: 22423743

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.08.2008 at 08:19PM PDT, ID: 22424050

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.09.2008 at 06:06AM PDT, ID: 22426949

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.09.2008 at 01:29PM PDT, ID: 22431895

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.09.2008 at 02:30PM PDT, ID: 22432507

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.09.2008 at 02:39PM PDT, ID: 22432583

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.09.2008 at 03:30PM PDT, ID: 22432985

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.09.2008 at 03:42PM PDT, ID: 22433090

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.10.2008 at 05:01AM PDT, ID: 22437363

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628