
landscape/portrait print problem
Quote:
>I have a simple routine which will change the print orientation to either
>landscape or portrait. It works well, but seems to {*filter*}for some reason with
>some types of printers (injet/bublejet types)
> orient.orientation = o&
> xx% = escape(printer.hDC, 30, Len(orient), orient, 0&)
>Is there anything I am missing here?
Not really. The function you're calling is actually executed by the
printer driver. A different printer means a different printer driver.
That's why the same code might act differently on different printers.
Call it a printer driver bug if you like. :-)
In his API book, Appleman calls this function obsolete, because it can
(and should) be replaced with calls to DeviceCapabilities/ExtDeviceMode.
Obsolete functions are allowed to be buggy ;-).
Unfortunately these are in the printer driver, which means you can't
just do it in plain VB, unless you hardcode the printer driver (=DLL)'s
name in your VB code.
The book is accompanied by a free-to-use DLL which can be used as an
interface layer for these functions to any printer driver.
My advice would be: get the book, and use ExtDeviceMode.
HTH,
Bart.