🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.acrobat.reader
Article #13010

Re: Printing PDF from the command line

#13010
From: Scott Haynes
Date: Wed, 22 May 2002 18:50
19 lines
1746 bytes
Here is some VB code that I found on the web. 

Basically "AcroRd32.exe /t <filename> <printer> <print driver> <port>" 

There is a more simplier way of doing this, but I can't find the link right now. 

I think it is: "AcroRd32.exe /p <filename>" 

Sub PrintAPDFUsingTheFreeAcrobatReader()  

Dim strCommandLine As String  Dim strPrinterName As String  Dim strDriverName As String  Dim strPortName As String  Dim strFileNameToPrint As String  

strFileNameToPrint = "c:\temp\filetoprint.pdf"  

strPrinterName = Printer.DeviceName  strDriverName = Printer.DriverName  strPortName = Printer.Port  

' Perform some error checking here  strCommandLine = "c:\acrobat3\reader\AcroRd32.exe /t """ + _  strFileNameToPrint + """ """ + _  strPrinterName + """ """ + _  strDriverName + """ """ + _  strPortName + """"  

If (Shell(strCommandLine, vbHide) <> 0)Then  MsgBox "Job has been sent to the printer using the command " + strCommandLine  End If  End Sub
Technical Details
Message-ID: <ef8a49c.0@WebX.aaQKaf7vad4>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!yellow.newsread.com!netaxs.com!newsread.com!netnews.com!news.maxwell.syr.edu!unlisys!news.snafu.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <ef8a49c.-1@WebX.aaQKaf7vad4>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109513,7c079dd36d4ecde7
X-Google-Attributes: gid109513,public
X-Google-ArrivalTime: 2002-05-22 12:13:37 PST
From: "Scott Haynes" <fletch27278@earthlink.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!yellow.newsread.com!netaxs.com!newsread.com!netnews.com!news.maxwell.syr.edu!unlisys!news.snafu.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.acrobat.reader
Subject: Re: Printing PDF from the command line
Message-ID: <ef8a49c.0@WebX.aaQKaf7vad4>
Date: Wed, 22 May 2002 11:50:30 -0700
References: <ef8a49c.-1@WebX.aaQKaf7vad4>
Lines: 35
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit