I need to be able to convert doc to pdf in an asp script (VBScript or JavaScript) ... Here is what I'm trying to do:
function ConvertDOC2PDF(strFile, strFile2)
{
var AcroApp = Server.CreateObject("AcroExch.App"
var AVDoc = Server.CreateObject("AcroExch.AVDoc"
AVDoc.Open(Server.MapPath(strFile), ""
AVDoc = AcroApp.GetActiveDoc();
var PDDoc = AVDoc.GetPDDoc();
PDDoc.SetInfo("Title", "My Title"
PDDoc.SetInfo("Author", "The Author"
PDDoc.SetInfo("Subject", "The Subject"
PDDoc.SetInfo("Keywords", "Keywords"
PDDoc.Save(1, Server.MapPath(strFile2));
PDDoc.Close();
AVDoc.Close(false);
AcroApp.Exit();
PDDoc = null;
AVDoc = null;
AcroApp = null;
}
ConvertDOC2PDF("Test.doc", "Test.pdf"
But the script times out :-( and I get the following error:
Error Type:
Active Server Pages, ASP 0113 (0x80004005)
The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.
Please help ...
function ConvertDOC2PDF(strFile, strFile2)
{
var AcroApp = Server.CreateObject("AcroExch.App"
var AVDoc = Server.CreateObject("AcroExch.AVDoc"
AVDoc.Open(Server.MapPath(strFile), ""
AVDoc = AcroApp.GetActiveDoc();
var PDDoc = AVDoc.GetPDDoc();
PDDoc.SetInfo("Title", "My Title"
PDDoc.SetInfo("Author", "The Author"
PDDoc.SetInfo("Subject", "The Subject"
PDDoc.SetInfo("Keywords", "Keywords"
PDDoc.Save(1, Server.MapPath(strFile2));
PDDoc.Close();
AVDoc.Close(false);
AcroApp.Exit();
PDDoc = null;
AVDoc = null;
AcroApp = null;
}
ConvertDOC2PDF("Test.doc", "Test.pdf"
But the script times out :-( and I get the following error:
Error Type:
Active Server Pages, ASP 0113 (0x80004005)
The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.
Please help ...