Planet PDF Forum Archive

Planet PDF ForumWowsers! This is page is old, head to the LIVE Planet PDF Forum. It features more than 10 conferences, covering everything from beginner to in-depth developer and pre-press discussions. If you wish to continue... one & two archive covers 1999-2011 (160,000 pages).

New Forum | Previous | Next | (P-PDF) Developers

Topic: Question About ActivePDF DocConverter
Conf: (P-PDF) Developers, Msg: 56113
From: GarryAnkrom
Date: 5/29/2002 05:17 PM

I am using ActivePDF DocConverter to convert an uploaded Word97 Document to PDF.  
I am using ASPUpload to upload the document. 

Here is the code I am using. I basicly took the example from and modified it a bit. 
The code seems to run without any errors, but when DocConverter does it's thing, the document 
is not converted and is placed in the errors directory. 
On top of that, if I view the processes on my server, WINWORD.exe is started 6 times.   
If anyone has experienced this, or knows how to help, please let me know. 


Garry Ankrom
Web Developer
ABB High Voltage Technology
Greensburg, PA - USA

Code sample

' Upload the file.

Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.OverwriteFiles = False 
Count = Upload.Save("c:\Inetpub\wwwroot\test\uploads\") 

'  After file is uploaded, Start conversion.

   Set DocConverter = Server.CreateObject("APDocConv.Object")
   IPAddress = "" 
   ServerPort = 0 
   FileToConvert = ("c:\Inetpub\wwwroot\test\uploads\1.doc")
   OutputDirectory = ("c:\Inetpub\wwwroot\test\converted") 
   ErrorsDirectory = ("c:\Inetpub\wwwroot\test\errors") 
   OrigDirectory = ("c:\Inetpub\wwwroot\test\originals")
   ScriptName = "" 
   ScriptLang = ""
   SupportsZip = False 
   ProcessorOptions = "IntelligentPDF=1" 

'  Start it!
   lRet = DocConverter.Submit(IPAddress,ServerPort,FileToConvert,OutputDirectory,ErrorsDirectory,OrigDirectory,ScriptName,ScriptLang,SupportsZip,ProcessorOptions)

   if lRet <> 0 then
      Response.Write("There was an error submitting the document : " & lRet)
   End If

'  This is a new option offered in HotFix 2 (see DocConverter Q.A.A. area for more details)
   DocConverter.StatusTimeout = 180 ' 3 minutes

   lRet = DocConverter.CheckStatus(IPAddress,ServerPort,FileToConvert,OutputDirectory,ErrorsDirectory)
   if lRet = -99 then
      Response.Write("The document converter is not currently running.")
   end if
   if lRet = 0 then
      Response.Write("Your document was not converted...was it a valid type?")
   end if

   if lRet = 2 then
      Response.Write("There was an unknown error converting your document.")
   end if

'  We successfully converted the let's feed it to the user
   Set DocConverter = Nothing 

PDF In-Depth Free Product Trials Ubiquitous PDF

Debenu Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link...

Download free demo

Debenu PDF Tools Pro

It's simple to use and will let you preview and edit PDF files, it's a Windows application that makes...

Download free demo

Five visions of a PDF Day

In the world of PDFs or as we like to say Planet (of) PDF, a year isn't a real PDF year without an intense few days of industry knowledge sharing.

May 15, 2018
Platinum Sponsor

Search Planet PDF
more searching options...
Planet PDF Newsletter
Most Popular Articles
Featured Product

Debenu PDF Aerialist

The ultimate plug-in for Adobe Acrobat. Advanced splitting, merging, stamping, bookmarking, and link control. Take Acrobat to the next level.


Adding a PDF Stamp Comment

OK, so you want to stamp your document. Maybe you need to give reviewers some advice about the document's status or sensitivity. This tip from author Ted Padova demonstrates how to add stamps with the Stamp Tool along with related comments.