hi
i am a software engineer & i am working on a UNIDRV printer driver
using Microsoft plug-ins
IPRINTOEMUI & IPRINTOEMUNI .
I have some queries:
1. how can i reduce the size of TIFF image?
2. how can i get the name of Document from which i give a print
command.
ex: suppose i give a print command from Microsoft Word document name
tmp.doc so i want to get the name (tmp.doc & Microsoft word) using
functions & structures given with above mentioned plug-ins?
3. how i can implement TIFFSetField(tiff *, TIFFTAG_COMPRESSION,7).
when i am trying this i am not able to build the TIFF file.?
4. how i can implement TIFFSetField(tiff *, TIFFTAG_COLORMAP,???)..
what is the value of ?? in TIFFSetField function/
5.how can i get the typeface of all the FONTS used in a document from
which i give print command.
ex: suppose i give a print command from a document named tmp.doc & i am

using Times New Roman, Arial, Gothica fonts in that document so i want
to know the name of these fonts using functions & structures given with

above mentioned plug-ins?


regards
Himanshu
himanshu.agar...@netcreativemind.com

RE: query regarding printer driver by bobbym

bobbym
Tue Feb 07 19:49:16 CST 2006

------=_NextPart_0001_A7C3D5D0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit


--------------------


hi
i am a software engineer & i am working on a UNIDRV printer driver
using Microsoft plug-ins
IPRINTOEMUI & IPRINTOEMUNI .
I have some queries:

>how can i get the name of Document from which i give a print
command.
ex: suppose i give a print command from Microsoft Word document name
tmp.doc so i want to get the name (tmp.doc & Microsoft word) using
functions & structures given with above mentioned plug-ins?

OEM hook for DrvStartDoc has a pwszDocName which would give the doc name.
You can't get get the name of the printing application unless you are doing
RAW printing.
In RAW printing the driver is called in the context of the application and
you can use GetModuleFileName to get it.


>how can i get the typeface of all the FONTS used in a document from
which i give print command.
ex: suppose i give a print command from a document named tmp.doc & i am

using Times New Roman, Arial, Gothica fonts in that document so i want
to know the name of these fonts using functions & structures given with

above mentioned plug-ins?

Please check out the FONTOBJ_pifi function.




Hope this helps.

Thank you,
Bobby Mattappally
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.

------=_NextPart_0001_A7C3D5D0
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20
\par \pard\li720 --------------------
\par
\par
\par hi
\par i am a software engineer & i am working on a UNIDRV printer driver
\par using Microsoft plug-ins
\par IPRINTOEMUI & IPRINTOEMUNI .
\par I have some queries:
\par
\par >how can i get the name of Document from which i give a print
\par command.
\par ex: suppose i give a print command from Microsoft Word document name
\par tmp.doc so i want to get the name (tmp.doc & Microsoft word) using
\par functions & structures given with above mentioned plug-ins?
\par
\par OEM hook for DrvStartDoc has a pwszDocName which would give the doc name.
\par You can't get get the name of the printing application unless you are doing RAW printing.
\par In RAW printing the driver is called in the context of the application and you can use GetModuleFileName to get it.
\par
\par
\par >how can i get the typeface of all the FONTS used in a document from
\par which i give print command.
\par ex: suppose i give a print command from a document named tmp.doc & i am
\par
\par using Times New Roman, Arial, Gothica fonts in that document so i want
\par to know the name of these fonts using functions & structures given with
\par
\par above mentioned plug-ins?
\par \pard
\par Please check out the FONTOBJ_pifi function.
\par
\par
\par
\par
\par Hope this helps.
\par
\par Thank you,
\par Bobby Mattappally
\par Microsoft
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par
\par
\par }
------=_NextPart_0001_A7C3D5D0--


Re: query regarding printer driver by Maxim

Maxim
Tue Feb 07 20:14:37 CST 2006

> 2. how can i get the name of Document from which i give a print
> command.

You cannot.

You only have the Job Name at this level, which is some string invented by the
app like "Microsoft Word - MyDoc.doc", and there are no reliable ways of
resolving it back to the document file name.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com


Re: query regarding printer driver by h

h
Tue Feb 07 23:30:59 CST 2006

hi Bobby
Thankyou for replying
but for your kind information i had already implemented pwszDocname
parameter of drvStartDoc & i am getting the string "Microsoft
Word-temp.doc" for example in case of MsWord but in case of Acrobat i
am getting "temp.pdf" not "Adobe Reader-temp.pdf" & in case of
iexplorer i am getting URL. I had also implemented getjob function
which returns a handle to JOB_INFO_1 structure but not able to solve
the problem what i actually want is that is there any function or
structure avilable which give me "temp.doc" & "Microsoft Word" for
example seperately.
As far as FONTOBJ_pifi function it returns only IFIMETRICS structure
handle .
but i am not able to extract info from IFIMETRICS structure. & second
thing in which function i should use this structure is also not clear
to me because FONTOBJ structure is avilable in 3-4 functions.
regards
Himanshu
himanshu.agarwal@netcreativemind.com

Bobby Mattappally [MS] wrote:
> --------------------
>
>
> hi
> i am a software engineer & i am working on a UNIDRV printer driver
> using Microsoft plug-ins
> IPRINTOEMUI & IPRINTOEMUNI .
> I have some queries:
>
> >how can i get the name of Document from which i give a print
> command.
> ex: suppose i give a print command from Microsoft Word document name
> tmp.doc so i want to get the name (tmp.doc & Microsoft word) using
> functions & structures given with above mentioned plug-ins?
>
> OEM hook for DrvStartDoc has a pwszDocName which would give the doc name.
> You can't get get the name of the printing application unless you are doing
> RAW printing.
> In RAW printing the driver is called in the context of the application and
> you can use GetModuleFileName to get it.
>
>
> >how can i get the typeface of all the FONTS used in a document from
> which i give print command.
> ex: suppose i give a print command from a document named tmp.doc & i am
>
> using Times New Roman, Arial, Gothica fonts in that document so i want
> to know the name of these fonts using functions & structures given with
>
> above mentioned plug-ins?
>
> Please check out the FONTOBJ_pifi function.
>
>
>
>
> Hope this helps.
>
> Thank you,
> Bobby Mattappally
> Microsoft
>
> This posting is provided "AS IS" with no warranties, and confers no rights.


Re: query regarding printer driver by Shankar9483

Shankar9483
Sat Mar 18 04:29:27 CST 2006

"h.01cs25@gmail.com" wrote:
> hi Bobby
> Thankyou for replying
> but for your kind information i had already implemented pwszDocname
> parameter of drvStartDoc & i am getting the string "Microsoft
> Word-temp.doc" for example in case of MsWord but in case of Acrobat i
> am getting "temp.pdf" not "Adobe Reader-temp.pdf" & in case of
> iexplorer i am getting URL. I had also implemented getjob function
> which returns a handle to JOB_INFO_1 structure but not able to solve
> the problem what i actually want is that is there any function or
> structure avilable which give me "temp.doc" & "Microsoft Word" for
> example seperately.
> As far as FONTOBJ_pifi function it returns only IFIMETRICS structure
> handle .
> but i am not able to extract info from IFIMETRICS structure. & second
> thing in which function i should use this structure is also not clear
> to me because FONTOBJ structure is avilable in 3-4 functions.


Use the FONTOBJ_pifi function in OEMTEXTOUT function
still have dbts pls go thru the attached sample code u will get some idea.

IFIMETRICS *ifi;
LPWSTR lpbuf;
lpbuf = (LPWSTR) (&ifi->dpwszFamilyName + ((ifi->dpwszFamilyName)/4)-2);
OutputDebugString(lpbuf);

this code will return the name of the font.