Printing PDFs in duplex mode.

nightowl

Member
Joined
Oct 31, 2006
Messages
9
Programming Experience
Beginner
Hi. I'm using Visual Basic 2005 and I'm trying to do what has become a pretty tough assignment... for me anyway.

I'm trying to print some pre-existing PDF files from a directory to 1 of 2 printers - HP8150 and HP9040 - IN DUPLEX MODE. THey need to be double-sided (long side).

Any ideas? It's not enough to just be able to print the PDF to the printer. I tried that (successfully) using the following code:

Dim p As New System.Diagnostics.ProcessStartInfo
p.Verb = "print"
p.WindowStyle = ProcessWindowStyle.Hidden

p.FileName = "x:\temp\20051InvF_00000.pdf"
p.UseShellExecute = True
System.Diagnostics.Process.Start(p)

I also need to control whether or not the PDF prints in Duplex mode (double-sided). I REALLY NEED SOME HELP WITH THIS. (Deadline's creeping up on me.) Thanks in advance.

(By the way, I found a c utility called 'pdfp.exe' and it's duplex setting doesn't appear to work. HELP!)
 
Just to make sure, are these printers duplex capable? Neither includes duplexing out of the box (per HP) though a duplexer is available for the 8150 and there are models of the 9040 that can.

Before you start on an answer are you sure the printers you have are capable (as they stand) of duplex printing?
 
Raven65 - Yeah. Both are duplex-capable printers. The project lead made sure of that for me. I've been testing locally with a Xerox WorkCentre Pro 55 PS, which is also duplex-capable. I turned duplex both on and off while using the pdfp.exe utility, and it doesn't seem to matter.
 
Figured it out. Well, actually, I located an updated version of the pdfp.exe utility at http://www.esnips.com/web/PDFTools that correctly prints in duplex mode given the correct parameter (of "2").

Here's what I documented in my issues log:

I found a more recent version of the pdfp.exe from http://www.esnips.com/web/PDFTools. This pdfp.exe version is dated '11/01/2005 02:52PM' (not sure of the time zone). A 'sum -r' command on it gives: 13288 96. Alternatively, the pdfp.exe I HAD been using was dated '03/08/2005 12:13 PM (not sure of the time zone). A 'sum -r' command on this one gives: 31258 88'.
 
Back
Top