|
-
December 29th, 2011, 08:43 PM
#1
PDF shell - batch opener
Hello,
Im wanting to write a basic VB application that will allow the user to select a bunch of PDF files then print them in bulk. I have achieved something similar with Microsoft Excel, using the shell command to do this. (ie, VB app allowing users to select a bunch of .xls files and batch them to print in Excel using a shell)
Furthermore, it woul dbe nice to be able to pass in parameters to specify the papersize, orientation
etc. is that at all possible?
Is there something similar to the shell command for Adobe Acrobat?
Thanks,
Jac
-
December 29th, 2011, 10:15 PM
#2
Re: PDF shell - batch opener
The shell command is a VB function that allows you to execute an external program. It has nothing to do with Excel or Adobe.
If the target program accepts command line parameters to perform the function you desire then you can use shell with the required parameters to make any program do as you wish so long as the program in question provides the interface for the command line parameters/switches needed.
Always use [code][/code] tags when posting code.
-
December 29th, 2011, 10:23 PM
#3
Re: PDF shell - batch opener
You can license the SDK (supposedly) from Adobe.com, but if you talk about it, they KILL you
-
January 13th, 2012, 04:27 PM
#4
Re: PDF shell - batch opener
Hello,
So i have a way around it, im using the shellexecute, as seen by the following:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
ShellExecute Me.hwnd, "print", "c:\etc.pdf", vbNullString, vbNullString, SW_SHOW
My next question is, can i specify printing parameters when using this? im particulary interested to specify the paper orientation and paper size?
Thanks,
Jac
-
January 13th, 2012, 09:11 PM
#5
Re: PDF shell - batch opener
If you set the printer FIRST, the settings should remain for the remaining jobs in the queue
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|