Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Printing

Status
Not open for further replies.

JPBURBE

Programmer
Jun 12, 2001
37
CA
I am trying this to print a PDF file to a specific printer over a network.....it works great for text files but when i try it with PDF files it just prints out as garbage..It prints the file where i want but the PDF document isn't ledgible.....the pdf image does not show up.....just the text that is entered in my vb program and it is overlaping..any ideas?

Dim FSO As New FileSystemObject
FSO.CopyFile strFileNameToPrint1, "\\servername\printername"
Set FSO = Nothing

thanks in advance
 
That's because you're sending the .pdf file as araw file. It needs to be interpreted by the Acrobat Reader before it can be printed.

Take a look in your registry. On my machine, I find this:

HKEY_CLASSES_ROOT\AcroExch.Document\shell\print\command

Which shows the command to call via ShellExecute to get the document to print.

It also lists the DDE messages that it understands, which might be a better way.

Chip H.
 
the document is printing....i guess what i am asking is: is there a way to get the document to change to postscript before sending it to the printer? is that what you described in the above message? not to sure how to do it...help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top