>Does somebody knows how to access to a printer object like VB's PRINTER object in VFP??
>I am testing an report to PDF library, butt need de handle of the printer...
You need to issue a call to the Win32 API function CreateDC().
DECLARE INTEGER CreateDC IN WIN32API ;
STRING @ lpszDriverName, ;
STRING @ lpszDevicename, ;
INTEGER lpszOutput, ;
INTEGER lpInitData
hDC = CreateDC("<i>Windows Spooler Name</i>","<i>Printer Device</i>",0,0)
Under Win9x,
Windows Spooler Name should be WINSPL16, under NT or Win2K, the name of a supported print provider, normally WINSPOOL
Printer Device is the name assigned to the Windows Printer being used.
See the MSDN Library entry for CreateDC for more details.