# Open > [HTML Version](open_m148.htm) **xcall MIAMEX, MX\_GDICALC, MXGDI\_OPENPTR, handle, status, printer, mapmode \{,length, width\}** Establishes a printer context, returning a handle to it which must be passed to all the other MX\_GDICALC operations. | **Parameter** | **Type** | **I/O** | **Description** | |------|------|------|------| | handle | B,4 | in/out | Name to be used for other MX\_GDICALC operations. | | status | F6 | out | [MX\_GDICALC Status Codes](mx_gdicalcstatuscodes.htm.md). | | printer | [String](string.htm.md) | in | Any form of printer name allowed by SPOOL[xs](keyword-types.htm.md)—e.g. a null string for the A-Shell or Windows default; a printer ini file name, a printer share name, or a printer local driver name. | | mapmode | [String](string.htm.md) | in | One of the map modes allowed in the GDI SETMAPMODE statement (LOENGLISH, HIENGLISH, LOMETRIC, HIMETRIC, TEXT, TWIPS, DECIPOINTS). | | length, width | Num | out | If specified, the page length/width (in the specified map mode units) will be returned here. |