topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 6:05 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: How to print more than 10000 .ps files  (Read 8429 times)

Blaster

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 85
    • View Profile
    • Donate to Member
How to print more than 10000 .ps files
« on: March 07, 2007, 06:37 AM »
Hello!

I need to make an application to print  more than 10 000 .ps files from a folder.

I don't know much about .ps files, or even how to open it except with adobe destiller

or, let's even forget about file extension...

How would you print more than 10000 regular .doc or .pdf files ...???



mwb1100

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,645
    • View Profile
    • Donate to Member
Re: How to print more than 10000 .ps files
« Reply #1 on: March 07, 2007, 09:31 AM »
Assuming that you have a PostScript printer, you can dump the file(s) to the printer since they contain the raw print stream.  Set up a DOS mapping for LPT1: to the printer:

1) make sure the printer has sharing enabled (on the Sharing tab of the printer's properties page)
2) map LPT1: to the printer (using a command something like "net use lpt1: \\ComputerName\PrinterName")
3) copy the .ps files to the new device: "copy *.ps lpt1:"

The above might only work on NT-based Windows versions (NT, 200, XP, Vista) - I'm not sure about Win 9x.

If you don't have a postscript printer, you'll need a program that knows how to interpret .ps files.  I don't have experience with any, but I understand that Adobe Acrobat (not Reader, but the full Acrobat) or GhostScript can do it.

For files that need a program to print them since they are not in a printer-native format (like *.doc or *.pdf), you can usually drag-n-drop them onto a printer icon - that'll cause the system to invoke the program associated with the file (ie., Word or Acrobat) to print the files.



tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Re: How to print more than 10000 .ps files
« Reply #2 on: March 07, 2007, 11:23 AM »
For files that need a program to print them since they are not in a printer-native format (like *.doc or *.pdf), you can usually drag-n-drop them onto a printer icon - that'll cause the system to invoke the program associated with the file (ie., Word or Acrobat) to print the files.

far as I know you can set up Directory Opus to send files directly to the printer from the file manager. Havent done it myself, requires a bit of customising.
If you have it, have a look in the manual or go to forums.
Tom

Blaster

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 85
    • View Profile
    • Donate to Member
Re: How to print more than 10000 .ps files
« Reply #3 on: March 07, 2007, 05:14 PM »
First of all, thank you for your answers...

I'm affraid I didn't explain my problem so well...  :)

I need code examples of it ( C , C++ ) , because I need to build an application myself to do all this...  :D

Hints and links to BCB components are welcome as well!

Once again , thanks for your answers!

mwb1100

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,645
    • View Profile
    • Donate to Member
Re: How to print more than 10000 .ps files
« Reply #4 on: March 07, 2007, 09:23 PM »
I need code examples of it ( C , C++ ) , because I need to build an application myself to do all this...  :D

This should do the trick for your .ps files (as long as the destination printer has PostScript):

http://support.micro...com/kb/138594/EN-US/

For other documents that need to be printed by an application, you should be able to use ShellExecute() or ShellExecuteEx() with the 'print' verb to have whatever application handles the particular file type print it for you.

Blaster

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 85
    • View Profile
    • Donate to Member
Re: How to print more than 10000 .ps files
« Reply #5 on: March 08, 2007, 11:41 AM »
 mwb1100 , thanks for the answer.

I am using ShellExecute() for printing files. It is not the problem. The problem is how to print successfully more than 10 000 files . No matter which extension they have. How to know (with code) is the printer bussy with printing or not , for example...

Program must print all the files one at another after pressing "Print all", not one by one manually...

Thank you again, I'll check this link...