Connecting Tech Pros Worldwide Forums | Help | Site Map

Automation Server can''t create object While copiying A PDF file in Textarea

Newbie
 
Join Date: May 2007
Posts: 5
#1: May 18 '07
hi all..

when im copying a PDF file content to a textarea using JavaScript i am getting an error "Automation Server Can't creat object" why it is coming...
im copying my code here.
[HTML]<html>
<head><title>PDF File Load document</title>
<script language="JavaScript">
function loadpdf()
{
var PDF=new ActiveXObject("pdf.PdfCtrl");
(PDF != null)
{
PDF.visible = true
PDF.Documents.Open("C:\\Documents and Settings\\trainer\\Desktop\\job.pdf");
}
//copy the content from my pdff document and throw it into my variable
var txt;
txt = PDF.Documents("C:\\Documents and Settings\\trainer\\Desktop\\job.pdf").Content;
document.all.myarea.value = txt;
PDF.quit(0); // quit pdf (very important or you'll quickly chew up memory!)
}

</script>
</head>
<body>
<p><input type=button onClick="loadpdf();" value="Load">
<p><textarea name=myarea cols=100 rows=25>nothing here yet</textarea>
</body>
</html>

[/HTML]
What z wrong in this... anyone pls help me..
neha

acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: May 18 '07

re: Automation Server can''t create object While copiying A PDF file in Textarea


Moved from the Articles section.
Reply


Similar JavaScript / Ajax / DHTML bytes