[WinPrnDev] Re: Creating a Printer Driver

Hi Sam,
I think you are getting there.
The INF file is nothing more than a text configuration file used by the
"Windows Add printer" User Interface. Primarily you don't need to rely on
this and can install a printer driver, portmonitor automatically, BUT if
you wish users to add a printer manually then the .inf is the way to go.
It instructs the interface where files should be placed and what name to
give the driver file with all its dependancies.

Lets see you prefer VB, I have found a VB source site that does everything
you require. Welcome to the world of opensource..

http://www.pdfforge.org/download ( download the source and away you go )
The will install a printer driver, portmonitor, ghostscript. You might
want to do things differently BUT I thought the language syntax would be
familiar so would make more sense than me sending you C snippets.

Have Fun!
Clinton
>
> Sorry everyone, just goes to show how new I am to all of this. I assumed
> the INF file would be produced after compilation when  its just a simple
> text file containing information about the driver and tells windows to
> copy the drivers to the system directory
> I relise this because compiling the local port sample on WDK, it produced
> DDLs
> but RedMon has its own setup, I am assuming that given the RedMon DDLs i
> can easily write an INF file to install the ports, so I need to actually
> manipulate the code to stdout to a .net application instead of ghostscript
> which does the same thing as ghostscript (as in create a temp file then
> PDF) and then upload to server.
> If thats correct then im finally beginning to understand what i need to
> do, but there still the matter of the document name, how will I get it?
> Will the output RedMon produces contain the name of the document
> somewhere? Maybe GhostScript has a field for document name?
> RegardsSam
>
> From: hussam_88@xxxxxxxxxxx
> To: winprndev@xxxxxxxxxxxxx
> Subject: [WinPrnDev] Re: Creating a Printer Driver
> Date: Wed, 7 Apr 2010 11:21:35 +0000
>
>
>
>
>
>
>
>
> Clinton
> Thank you for your email, I am just looking at the RedMon source code, I
> still have no idea how they produce the INF from the code but i am
> assuming that to build an inf of a printer port I will have to maybe work
> with the WDK.
>
>
> I guess im just lost as to where to start with creating the Port, once i
> compile the C Code for the port monitor would that create an inf file?
>
> From what i understood in your email your advising that I write a bridge
> program that creates the temp file of the input(Stdin) that it receives
> from RedMon and then call Ghostscript to create the PDF from the temp
> file, and although Ghost script does this its better if I am in control of
> this process incase of bugs or crashes.
> so the first thing i need to do is create the Redmon that would redirect
> to my program instead of Ghostscript and although i know i can just do
> that via the configure in the port menu I would muh rather get stuck in!
> and start learning by playing around with it.
> how do i create the inf file for my new redirection port though?
> RegardsSam
>> Date: Wed, 7 Apr 2010 12:13:19 +0100
>> Subject: [WinPrnDev] Re: Creating a Printer Driver
>> From: clinton@xxxxxxxxxxxxxx
>> To: winprndev@xxxxxxxxxxxxx
>>
>> Hi Sam,
>> If I remember correctly. REDMON can output to stdout ( Program handles
>> output ). So you would need to create a little app ( C would do ), that
>> accepts stdin, creates a TEMPFile and then calls Ghostscript to create
>> the
>> PDF ( another Temp ). This then can be "remotely sent". Technically
>> GhostScript can accept stdin stdout, BUT I do advise you controlling the
>> file creation ( if something goes wrong, you know where ) and passing
>> these as parameters to the PDF driver type.
>>
>> Hope it helps!
>> Clinton
>> PS: I read in a previous email someone saying that Microsoft were trying
>> to remove sockets/ports, this I don't think will ever happen as the
>> spooler CORE is designed around this also CLUSTERED PRINTING only
>> support
>> TCP/IP printing ( which is socket based through ports )
>>
>> >
>> > That sounds like much neater. OK so the next step is to actuallly
>> learn
>> > how Redmon works and modify it to launch a .Net application. I will
>> also
>> > need to learn how Ghostscript works and how to convert the Postscript
>> file
>> > produced to PDF, but what about naming. Does the port monitor know the
>> > name of the document? or will it be overwritten?
>> > RegardsSam
>> >
>> >> Date: Wed, 7 Apr 2010 11:33:36 +0200
>> >> Subject: [WinPrnDev] Re: Creating a Printer Driver
>> >> From: jjflash@xxxxxxxxx
>> >> To: winprndev@xxxxxxxxxxxxx
>> >>
>> >> On Wed, Apr 7, 2010 at 11:29 AM, Sam Elamin <hussam_88@xxxxxxxxxxx>
>> >> wrote:
>> >> > So what if I print to a redmon port (RE1) which will redirect to
>> >> ghostscript
>> >> > which produces the PDF, then print the PDF to RedMon Port 2 (RE2)
>> and
>> >> the
>> >> > second port will print to a .NET application which was created
>> soley
>> >> to
>> >> > upload a job.
>> >>
>> >> Or have RedMon Port 1 launch your .Net app that first spawns
>> >> GhostScript to do the conversion and next upload the result
>> somewhere?
>> >>
>> >> ;)
>> >>
>> >> --
>> >> Rune
>> >> ---
>> >> Questions? First check the UndocPrint pages at
>> >> http://www.undocprint.org/winspool
>> >>
>> >> To unsubscribe, visit the List Server page at
>> >> http://www.freelists.org/list/winprndev
>> >
>> > _________________________________________________________________
>> > http://clk.atdmt.com/UKM/go/197222280/direct/01/
>> > Do you have a story that started on Hotmail? Tell us now
>>
>>
>> ---
>> Questions? First check the UndocPrint pages at
>> http://www.undocprint.org/winspool
>>
>> To unsubscribe, visit the List Server page at
>> http://www.freelists.org/list/winprndev
>
> Get a free e-mail account with Hotmail. Sign-up now.
> _________________________________________________________________
> http://clk.atdmt.com/UKM/go/195013117/direct/01/
> We want to hear all your funny, exciting and crazy Hotmail stories. Tell
> us now


---
Questions? First check the UndocPrint pages at 
http://www.undocprint.org/winspool

To unsubscribe, visit the List Server page at 
http://www.freelists.org/list/winprndev

Other related posts: