The following java script function
function callme()
{
var status = 0;
var AccroApp;
var p;
var a;
var i;
// alert(PrintString );
//alert(printpage);
alert("hai");
try
{
AcroApp = new ActiveXObject('AcroExch.App');
p = new ActiveXObject('AcroExch.PDDoc');
a = new ActiveXObject('AcroExch.AvDoc');
p.Open("c:\abcd.pdf");
a = p.OpenAVDoc(p.GetFileName);
i = p.GetNumPages
a.PrintPagesSilent(1,i,0,0,0);
a.Close(0); // 'close with same name as when opened
p.Close;
AcroApp.Exit;
}
catch (e)
{
if (e.number != 0)
{
alert("Unable to Print - " + e.description);
}
}
}
when this function is called, I am getting an error message when the state a.PrintPagesSilent(1,i,0,0,0); is executed stating that "method is not supported"
I am using Adobe 7.0 Standard edition. Please help me in resolving this issue.
with regards,
Sadhasivam S
Within Acrobat JavaScript there is no "PrintPagesSilent(1,i,0,0,0); " function. Does you applicaton, Acrobat, folder level JavaScript folder contain the code for a custom function called "PrintPageSilent"?
You can call the doc object's "print()" funciton to print a page when you provide the appropriate parameters for the user interface display, the start page, the end page, and silent operation. There are also ohter optional parameters that can be used.
George Kaiser