0

Hello,

I need to know this one. How can we get printer status using JavaScript and also how can we give MS word document print command using JavaScript.

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by farhan386
0

perhaps not a direct answer but to determine if the local pc

  • has an application that can read the particular version .doc file you intend to print
  • has a printer
  • has security settings that allows scripts to take over their hardware (MALWARE ALERT)

it would be better to output the .doc as html then printing is easy

0

Hi bob,

Thank you for your suggestion. But my client requirement is to print a word doc. He need a printer management system. The client has a Local Area Network in his infrastructure, where his students make word document and those documents are to be printed.

The doc should be validated before it is printed (doc should meet prerequisite page settings). When the document is page setting meets the prerequisite, the system should send the document to the printer...

That system also should get the status of the printer. Depending upon the printer status the system should change its functionality.

So, I need JScript that could:

1)Get printer status(out of paper, ready and printing)
2)Read doc page settings(number of pages, page size and margins)
3)Finally, give doc print command

perhaps not a direct answer but to determine if the local pc

  • has an application that can read the particular version .doc file you intend to print
  • has a printer
  • has security settings that allows scripts to take over their hardware (MALWARE ALERT)

it would be better to output the .doc as html then printing is easy

0

I don't think you can do that with JS. For security reason, JS should not be able to deeply touch inside client's PC. A website shouldn't be able to force your PC to print all your doc, or shutdown your PC.

You may try to use server side script such as PHP. PHP is able to communicate with COM and working with Word documents.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.