I am implementing a program that is the same as google cloud printer. It is a virtual printer using postscript class driver. As the picture shows(I add the 64 suffix). The chinese translating to english is
Helpfile, ConfigurationFile DataFile DriverFile Dependency.
I use redmon to catch the standard input and use ghostscript to convert it to pdf. At the same time I get the job infomation from printer queue. With the pdf and job infomation, I can send them to my server. Then my server can print the document. I invoke ghostscript as the picture shows.
When I use WPS(a chinese application which is the same as Microsoft Word) to print docx document, the job infomation in job queue is correct. For example, when I print test.docx and select three copies, collate, color, I get the right result from job queue. Things get weird when it comes to Microsoft Word. When I use Microsoft Word to print docx, I get the job infomation from queue. No matter how much copies the user specifies, the copies is always one. At the same time, the converted pdf contains one copy too. This means that I have no way to achieve my goal(get pdf and job infomation like copies. Then send them to my server). Does anyone know how I can get the right number of copies, or at least it should behave as Microsoft Print to Pdf printer(as the ps illustrates). My written english is not good. Thanks!
ps: I also have tested Microsoft Print to PDF. If I select three copies in Word, the job infomation in job queue is always one. However, the destination pdf file contains three copies(If the docx is one page, the destination pdf is three pages).