Hmm…my response got rejected the previous time. So posting again…
By “good solution in the pipeline”, I was talking about Vista. Since the
spool file on Vista is an XPS file, you can parse it and perform any
amount of processing you want on it. We are providing some amount of
downlevel support for this. But it isn’t going to be as seamless as on
Vista.
As for “very difficult to go with your approach”, I meant that trying to
capture EMF in all the scenarios that will typically matter here isn’t
going to work. It is just not possible to cover all the cases since it
wasn’t designed to be that way.
I think you have two options. One is to evaluate if you can move your
primary target platform to Vista. As I mentioned, this should still work
downlevel…but might need a little more tweaking. Option two is to go
either the postscript or generic-text-only driver route. In the
postscript case, you will get a stream of postscript data that you can
then parse for whatever information you want. In the generic-text-only
driver case, you will get the data as plain text in your driver.
Based on what you mentioned about wanting to get the plain text, option
2 sounds better to me. You can find a sample of the generic-text-only
driver in the ddk under src\print\tty.
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Zed y
Sent: Wednesday, May 17, 2006 2:07 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Forcing spool files to contain EMF
Thanks for the fats reply.
I need to get the plain text from the EMF. Because i can only get the
text from EMF, i have to “force EMF”.
Targeting platforms = winx xp, win 2000. Vista is not an issue at the
moment.
You said i have a “good solution in the pipeline” and then that is “very
difficult to go with my approach”, What do you mean by that ?
After reading “When RAW is used” in “undocumented prining”, it seems
that local printer with “Advance…” turned or should be good enough, but
you calim it isn’t. What did i miss?
Do you have a suggestion to this matter? ( i know that writing directly
to the port can bypass EMF spoolfile)
Regrading to network printers, i don’t need to support vista.
Also, the idea was to change in the registry the network printer driver
and UI dll to mine and produce the EMF spoolfile. Then, change the
registy back, and send the spoolfile to the original printer.
On 5/17/06, Ashwin Needamangala wrote:
What analysis do you need to perform on the EMF? What platform
are you targetting? The spool file format on Vista is XPS which is well
documented. So if you are shooting for Vista, then you have a very good
solution in the pipeline.
Besides the fact that EMF is undocumented, it is very difficult
to go with the approach you have outlined due to the following reasons:
- There is no way to guarantee EMF printing for a given print
job. The decision on whether to print EMF vs. RAW is made based on many
heuristics within GDI and while enabling “Advanced printing features”
results in EMF most of the times, it is definitely not something you can
count on for every print job.
- If this has to work in the network printer case, you also have
to consider the matrix of cross-platform clients and servers. In Vista,
we are introducing a new feature called Client-Side-Rendering (CSR)
which as the name suggests will perform the rendering on the client.
Since you have to consider that the matrix could involve Vista machines
either as a client or server, this complicates your solution further.
It really depends on why you need to analyze the EMF and what
analysis this is.
- Ashwin
Microsoft Corp.
________________________________
From: xxxxx@lists.osr.com [mailto:
xxxxx@lists.osr.com
mailto:xxxxx] On Behalf Of Zed y
Sent: Wednesday, May 17, 2006 12:54 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Forcing spool files to contain EMF
Hi again,
After reading some material on printers, and asking questions in
forums, I am still confused.
So I thought I might try to rephrase my question and get a
better answer.
My final goal - Get an EMF from EVERY print that is issued (on
every printer installed and from every application), analyze it, and
stop or resume the print.
I know EMF is undocumented, but these are my requirements so I
want to stick to it in the meantime.
My idea was to somehow make sure all spool files will contain
EMF and not text or RAW. (And extract the EMF from the spool file)
If I’ll send all prints through a dummy printer driver (maybe
I’ll change in the registry and put my printer driver for all installed
printers) which is local and always uses “Advance printing features”
(set from the code) I should accomplish this?
Is there another way?
After I analyze the EMF, if I decide so, I can resend the spool
file to a real printer to be printed. (Using OpenPrinter and
WritePrinter).
Again, this solution has to work on both local and network
printer (eventually, I need the EMF on my system not on a remote one)
Thanks.
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
http:
— Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</http:></mailto:xxxxx>