[WinPrnDev] Re: Creating a Printer Driver

  • From: Abdul Qader <abqader.iqbal@xxxxxxxxx>
  • To: winprndev@xxxxxxxxxxxxx
  • Date: Thu, 25 Mar 2010 15:17:14 +0530

Sam,
Yes.
What I am trying to tell you is that instead of trying to access the file
from the driver (which is nearly impossible) what you ought to be doing is
getting access to the content of the file.
That is possible by accessing the spool file.

While you install your print processor you have the option to specify the
print format.(Goto Printer and Faxes,right click on any
printer,properties->advanced->print processor).Here you can find a list of
Print Processors and the format available.

So now we install a print processor that will extract the information from
the spool file and create a new EMF file.You will have to write a new
application to get this EMF file and then play it to whichever device
context you want.

The sample Print Processor is available in the genprint folder of the print
folder of DDK.Goto PrintDocumentonPrintProcessor functionality. That is
where you will have to do most of the work.
There are some more additional constraints that you will need to take care
of for this to work.

Abdul

On Thu, Mar 25, 2010 at 3:03 PM, Abdul Qader <abqader.iqbal@xxxxxxxxx>wrote:

> Sam,
>
> The SPL file is the spool file created by the spooler service . It can have
> two formats EMF and RAW. A RAW format is just a bit by bit description of
> ever pixel and so it would be dumped to the printer by the driver.
> In case of EMF format all the commands that we use to paint the window are
> stored .So by using the EMF you can play the commands to the desired context
> to reproduce the whole image that you had created in your window.
> Technically extracting the EMF from the spool file is undocumented. You can
> find the details in Windows Graphics Programming<http://www.fengyuan.com/> 
> written
> by Feng Yuan .
>
> Abdul
>
>
> On Thu, Mar 25, 2010 at 2:54 PM, Sam Elamin <hussam_88@xxxxxxxxxxx> wrote:
>
>>  Abdul
>>
>>
>>
>>
>> I am trying to understand what you are saying.
>>
>>
>> Do you mean the spool file by "SPL"? and what do you mean by the EMF? what
>> does the Virtual Print Processor exactly do?
>>
>> I am sorry for my complete ignorance but I am very new to the Print Driver
>> world (2 days to be exact) so these terms are all new to me.
>>
>>
>> Regards
>>
>> Sam
>>
>>
>> ------------------------------
>> Date: Thu, 25 Mar 2010 11:12:18 +0530
>>
>> Subject: [WinPrnDev] Re: Creating a Printer Driver
>> From: abqader.iqbal@xxxxxxxxx
>> To: winprndev@xxxxxxxxxxxxx
>>
>> Sam,
>>
>> You can get the SPL files from the Printers folder.You will need to
>> extract the EMF from the spool file and play the EMF on the corresponding
>> context.
>> So you will need to create a Virtual Print Processor.The path where the
>> spool files are stored are kept in the registry.
>> The PrintProcessor exports some calls of which
>> PrintDocumentonPrintProcessor is what you need to look out for.
>>
>> Please let me know if you need more info on this.We had implemeted some
>> thing close to what you did.
>>
>> Thanks
>> Abdul
>>
>> On Tue, Mar 23, 2010 at 9:48 PM, Sam Elamin <hussam_88@xxxxxxxxxxx>wrote:
>>
>>  Hello Everyone
>>
>>
>> I am trying to develop a printer driver which will be installed on a
>> client side, what i need this driver to do is just save the path of
>> documents sent to it to a string and forward that string to an 
>> ASP.NETapplication which will upload the document to a print server.
>>
>>
>> now i already have the upload client working so here is the scenario which
>> the printer will work on.
>>
>>
>> Document "X" is printed to a printer with the installed driver (Printer
>> "A")
>>
>>
>> Printer "A" will then get the path of the given document and save it to
>> string "Path", "Path" will then be sent to a Webpage which will upload it.
>>
>>
>>
>>
>> I kept it as basic as possible because i just want to know if it could be
>> done?
>>
>>
>> Regards
>> Sam
>>
>> ------------------------------
>> Do you have a story that started on Hotmail? Tell us 
>> now<http://clk.atdmt.com/UKM/go/195013117/direct/01/>
>>
>>
>>
>> ------------------------------
>> Not got a Hotmail account? Sign-up now - 
>> Free<http://clk.atdmt.com/UKM/go/197222280/direct/01/>
>>
>
>

Other related posts: