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 www.activepdf.com 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. 

Thanks. 

Garry Ankrom
Web Developer
ABB High Voltage Technology
www.abbhvsg.com
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 = "10.64.132.50" 
   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(sHeader)
      Response.Write("There was an error submitting the document : " & lRet)
      Response.End
   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(sHeader)
      Response.Write("The document converter is not currently running.")
      Response.End
   end if
   
   
   
   if lRet = 0 then
      Response.Write(sHeader)
      Response.Write("Your document was not converted...was it a valid type?")
      Response.End
   end if

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

'  We successfully converted the file..now 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

Back to the past, 15 years ago! Open Publish 2002

Looking back to 2002, it's amazing how much of the prediction became a reality. Take a read and see what you think!

September 14, 2017
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.

Features

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.