Printing a Pdf File through indusoft

Greetings
I want to print a pdf file through indusoft but it seems that it only has option of printing text Files. I have tried VB script but in vain. i am trying this for a while.Can any one help me out please .any link or hint will also do
  • You should be able to use acrobat reader to print PDF files

    The VBScript would look something like this (look at Exec function and Acrobat Reader command line options for exact syntax)

    $Exec("<path>AcroRd32.exe /t <filename> <printername> <drivername> <portname>")

    You may need to use additional switches or commands to close the application when it finishes.

  • Hi,

    Creating PDF's using IWS works well but Adobe (free version) leaves a window open no matter which switches you use. The process can be killed and the window closed by WMI each time you print. The other alternative is use a command line pdf print utility. Pdftoprinter.exe (Columbia University) worked for me but there may be others with more features.



    J
  • [code] Samples: The subroutine is called to print a report on demand or using scheduler. Sub PDFPrint() Dim oShell Set oShell = CreateObject( "WScript.Shell" ) oShell.Run("D:\Daily\pdftoprinter.exe D:\Daily\DailyReport_"&$LastDay&".pdf") Set oShell = Nothing End Sub The subroutine below is called to kill a running service. In this case an instance of open office. Be sure when copying/pasting any script code that quotes ("), braces, and brackets, slashes, etc are a text version and not from a stylized font cache or else a VBScript error will result. Sub KillooService() Dim objWMIService, objProcess, colProcessa, colProcessb,strProcessKillb,strProcessKilla strProcessKilla = "'soffice.exe'" strProcessKillb = "'soffice.bin'" Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Set colProcessa = objWMIService.ExecQuery("Select * from Win32_Process Where Name = " & strProcessKilla ) Set colProcessb = objWMIService.ExecQuery("Select * from Win32_Process Where Name = " & strProcessKillb ) For Each objProcess In colProcessa objProcess.Terminate() Next For Each objProcess In colProcessb objProcess.Terminate() Next Set objWMIService = Nothing End Sub [/code]