Help with a printer driver.

I am trying to write a printer driver that will ultimately allow me to take
any print job

and convert it to any graphics file format. I have all of the tools needed
to create the

various file formats such as .tif, .gif, .bmp etc. I am using the unidrv
approach and have

created my own UI.dll, Print Processor and UNI.dll (plugin).

To date I have created functions that will allow me to take a SURFOBJ and
create a DIB

which I can then write out to file in any format. My problem is that I am
trying to use the

OEMNextBand approach and I do get the data, however, I am having difficulty
in 2 areas.

  1. The size of the surface in the nextband call is wider than the
    devmode settings I get in

Startdoc.

  1. The POINTL param passed in to nextband is negative and I do not know
    how to interpret

these values.

If I take each of the bands separately I do see all of the content, but I am
having a difficult time

with trying to ‘assemble’ the page. Any ideas?

Tim

This has already been done, and you might be able to simply buy a
solution. Google is your friend, “bitmap printer driver” or “virtual
printer driver”.

ScottR

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Timothy W. Okrey
Sent: Wednesday, October 31, 2007 2:10 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Help with a printer driver.

I am trying to write a printer driver that will ultimately allow
me to take any print job

and convert it to any graphics file format. I have all of the
tools needed to create the

various file formats such as .tif, .gif, .bmp etc. I am using
the unidrv approach and have

created my own UI.dll, Print Processor and UNI.dll (plugin).

To date I have created functions that will allow me to take a
SURFOBJ and create a DIB

which I can then write out to file in any format. My problem is
that I am trying to use the

OEMNextBand approach and I do get the data, however, I am having
difficulty in 2 areas.

  1. The size of the surface in the nextband call is wider
    than the devmode settings I get in

Startdoc.

  1. The POINTL param passed in to nextband is negative and I
    do not know how to interpret

these values.

If I take each of the bands separately I do see all of the
content, but I am having a difficult time

with trying to ‘assemble’ the page. Any ideas?

Tim


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars
visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Scott,

I did look for solutions before I decided to write one. The specific application I have requires the assembling of separate printed documents into a consolidated output file by requirement before it is sent by either by fax or email.

Anyways I got past my issue. Thanks for your time.

Tim