How to get a physical printer status before printing job is sent?

Question:I have a rather unusual problem. I am using xpdfprint binary for the print job from my application. But if the user has a "directly print to the printer" setting enabled and by mistake if the printer is not available (power failure or cord not plugged in) then the application hangs. It seems to be a standard behavior since in my machine other windows applications also behave the same way. Problem is, in this case the printer timeout is not happening, neither it returns an error. It is waiting on the synchronous call to finish the printing. Is there anyway I can handle this situation? I am forced to find a solution because of a demanding customer. If by some means I get the physical printer status before the printing job is sent, I could solve this problem to an extent. Mine is a windows application and the coding is largely done in C#. If anybody has a win32 sample code please share with me. I hope I can find a solution on VeryPDF?

Answer:According to your needs, software VeryPDF PDF Print is very good for you. This software can help you prompt the user with the print dialog so they can change printer settings and/or select pages manually and prompt the user with print dialog and save the printer settings into a disk file. This software is developed professionally for printing PDF. This software is Window application , it supports both of 32-bit version and 64-bit version. If you need as command line version software, you can also call it from C#. Please check more information of this software on homepage, in the following part, let us check how to use this software.

Step 1. Download PDF Print.

  • As command line version software, when downloading finishes, it is a zip file. Please extract it to some folder then youu can use it normally.
  • There is also SDK version available, please download the proper version according to your needs.

Step 2. Print PDF and get physical printer status before printing.

    • Here is the usage of this software for your reference:pdfprint.exe [options] [Options] <PDF Files>
    • When you need to check printer status, please refer to the following command line templates and parameters.
      pdfprint.exe -prompt C:\input.pdf

pdfprint.exe -savedevmode C:\file.dat -printer "VeryPDF PCL Writer"
pdfprint.exe -loaddevmode C:\file.dat -printer "VeryPDF PCL Writer" C:\input.pdf

Related Parameters:

-prompt                               : prompt the user with the print dialog so they can change printer settings and/or select pages manually
-printer <string>              : printer name to print
-savedevmode <string>   : prompt the user with print dialog and save the printer settings into a disk file
-loaddevmode <string>    : restore printer settings which saved by -savedevmode parameter
-promptdevmode               : prompt the user with print dialog and print the printer settings to screen
-devmode <string>            : restore printer settings which outputed by -promptdevmode parameter

By this software and this method, you can check physical printer status before printing. During the using, if you have any question, please contact us as soon as possible.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!