- Set the postscript dirver option TTDownloadFormat ("TrueType FontDownload Option")
- Posted by arnt witteveen on November 3rd, 2004
Hi, I asked this question in 3 other newsgroups
(microsoft.public.windows.print, m.p.w.print_fax, m.p.w.printing), but
didn't get a reply about what I needed, So I'm trying here again. Any
pointers to other newsgroups that may help will also be appreciated.
I'm trying to write a program that creates a printer, with a driver
based on the MS PS driver and a ppd I supply (it has to run under
windows 2000 and XP). If I do this, the printer created has an advanced
option "TrueType Font Download Option" (in XP under the printers
'printing preferences', then 'Layout/advanced/Document options/PS
options/TrueType Font Download Option').
I'd like to set this option to 'Native TrueType' when creating the
printer (or right after it).
I have found no way to do this short of looking at which bits in the
devmode's driver specific portion change and redo that change using
GetPrinter/SetPrinter (I understand from what I read however that
fiddling with the driver specific portion of devmode like that is a very
bad idea).
There seems to be a way to set this through IPrintCoreUI2::SetOptions,
at least that's the only 'SetOptions' I can find that this article could
be talking about:
http://msdn.microsoft.com/library/de...cecb41.xml.asp
However, from what I understand, this call is designed to be called from
a printer property sheet, and structures made available by the system
that calls the property sheet (first parameter: "poemuiobj Points to the
current context, an OEMUIOBJ structure.")
Does anyone know a way to set this option?
---clarification based on earlier answer---
Note that this is not the dmTTOption memeber of DEVMode, that sets
'Layout/advanced/graphic/TrueType Font' (which has options 'Download as
Softfont' or 'Substitute with device font'), while the option I'm
looking to set is under 'Layout/advanced/Document options/PS
options/TrueType Font Download Option' (which has options 'Automatic',
'Outline', 'Bitmap' and 'Native Truetype'), but only for printers that
use the microsoft PostScript Printer Driver (Pscript, documented at
http://msdn.microsoft.com/library/de...d5997.xml.asp).
It is specific to Microsofts PostScript Printer Driver (I think), and is
described as "Driver features are non-PPD features that are synthesized
by the driver" here:
http://msdn.microsoft.com/library/de...02574f.xml.asp
Thanks for any help anyone can give me.
Arnt
- Posted by Ben Kuhn [msft] on November 5th, 2004
There is no way to achieve this that could be gauranteed to be compatible
accross versions of Windows. We don't gaurantee that the layout of the
private portion of the DEVMODE will not change. As such, editing it based on
predetermined offsets may work on one version of PScript, but not another.
You can't work around this by simplying looking at OS version, because
PScrip5.dll and PS5ui.dll, are considered part of the driver, and newer
versions often end up installed on older OSs.
- Ben
This post is provided "AS IS" with no warranties, and confer no rights.
"arnt witteveen" wrote:
- Posted by arnt witteveen on November 8th, 2004
Thanks for this reply! Is there any 'creative' way to work around this?
Things I can think of:
- attempting to detect the DEVMODE 'version' based on it's size?
- writing a PScript plugin that does IPrintCoreUI2::SetOptions to set
this. Can I write a plugin that will set this option when the printer is
created, even if there is no UI during printer creation? The docs say
"This method is supported only for UI plug-ins that fully replace the
core driver's standard UI pages, and is supported only during the UI
plug-in's IPrintOemUI:
ocumentPropertySheets and
IPrintOemUI:
evicePropertySheets functions, and their property sheet
callback routines." which if I understand it correctly means I can only
call it during UI?
Finally, if there really is no way to set this, can you or I log this as
an enhancement request somewhere?
Arnt
Ben Kuhn [msft] wrote:
- Posted by Ben Kuhn [msft] on November 8th, 2004
There's no good 'creative' workaround that I could recommend as being
reliable. However, there are already features in the works for LH that
should solve this problem. Be sure to check out the beta once it's available.
- Ben
This post is provided "AS IS" with no warranties, and confer no rights.
"arnt witteveen" wrote: