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: Run ActivePDF DocConverter across the network?
Conf: (P-PDF) Developers, Msg: 58999
From: rpd7
Date: 5/29/2002 05:36 PM

I'm writing a VB program that takes a document (word, excel, etc...), converts it to PDF, and place it on the web server depending on other information that the user inputs. The VB program will be used by many users and I don't want to install ActivePDF each user. I talked to the ActivePDF people and they said that they do not support network use of DocConverter, however, it can and has been done.

Below is the VB code that the ActivePDF people gave me and it works if the VB program, ActivePDF, and DocConverter are on the same machine. I need help in making this VB program work where the user has the VB program on his/her machine and the ActivePDF Server/DocConverter are on another machine.

The VB program failed at
Set APServer = CreateObject("APServer.object")
OF course it failed because the client doesn't have ActivePDFserver and DocConverter.

Your help is greatly appreciated,

Robert Dang


*****************************************************
Private Sub Form_Load()
Set APServer = CreateObject("APServer.object")
APServer.OutputDirectory = (App.Path & "\" & "results")
APServer.Orientation = 2
APServer.GeneralFlags = APServer.GeneralFlags Or 16
r = APServer.StartPrinting()
Set XLObject = CreateObject("Excel.Application")

XLObject.DisplayAlerts = False
Set NewDoc = XLObject.Workbooks.Open(App.Path & "\" & "TestXL.xls", , True, , , , True, , , False, False, , False)
' Due to a screwy issue with excel you have to "activate it" to print it
NewDoc.Activate
NewDoc.PrintOut 1, 999, 1, False, APServer.NewPrinterName, False, False
NewDoc.Close 0
XLObject.Quit
Set XLObject = Nothing
APServer.StopPrinting
r = APServer.Wait(30)
uniqueID = APServer.NewUniqueID
Set APServer = Nothing
End Sub


Here's the code for activePDF Server converting an Word file.

Private Sub Form_Load()
Set APServer = CreateObject("APServer.object")
APServer.OutputDirectory = (App.Path & "\" & "results")
r = APServer.StartPrinting()

Set WordObject = CreateObject("Word.Application")

WordObject.DisplayAlerts = False
Set NewDoc = WordObject.Documents.Open(App.Path & "\" & "testdoc.doc", False, True)
' Since Word2K has a problem setting ActivePrinter...we have to use this method instead..works for Word97 too
Set WordDialog = WordObject.Dialogs(97)
WordDialog.Printer = APServer.NewPrinterName
WordDialog.DoNotSetAsSysDefault = 1
WordDialog.Execute

NewDoc.PrintOut False
NewDoc.Close False
WordObject.Quit False
Set WordObject = Nothing
APServer.StopPrinting
r = APServer.Wait(30)
uniqueID = APServer.NewUniqueID
Set APServer = Nothing
Set WshShell = Nothing
End Sub
*****************************************************

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.