ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

How to print more than 10000 .ps files

(1/2) > >>

Blaster:
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:
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:
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.
--- End quote ---

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.

Blaster:
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:
I need code examples of it ( C , C++ ) , because I need to build an application myself to do all this...  :D
-Blaster (March 07, 2007, 05:14 PM)
--- End quote ---

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

http://support.microsoft.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.

Navigation

[0] Message Index

[#] Next page

Go to full version