Description
The Get_Printer function returns the width and height of the page when the PAGESIZE message is specified. The width and height is the actual page size, and does not include the margins or indents, so the actual printable area is equal to the page height and width minus the margins and indents.
Parameters
Message | Fields | Description |
---|---|---|
PAGESIZE | <1> | Page width |
<2> | Page height | |
<3> | PageSize (See OIPRINT_EQUATES) |
Comment from Anonymous User
Do the width and height parameters actually represent the true values for a specific Page Size? I'm asking this because I noticed two anomalies: 1. Regardless of which Page Size was included in the INIT parameters, the same Width and Height are always being returned via Set_Printer("PAGESIZE"). Whether the page size is A3 or A4 or whatever, the same values are returned. 2. I could live with the above (e.g I'm working with TWIPS). The values returned (for Portrait) are always: 11849 and 16841. However, these are not precise because when I tried to check whether any object that needs to be printed (e.g. RECT or ELLIPSE) falls outside these values, I realized that these values do not correspond to reality.
Has anyone come across this problem and found a solution? Thanks
I'm the same one who posted the above comment. I've continued to test the OIPI SET_PRINTER("PAGESIZE") feature and I've discovered the following anomaly. Not all pages listed in OIPRINT_EQUATES work correctly. In fact, out of a possible 69 printers listed, only 14 work as expected, namely: 1, 5, 7, 8, 9 (A4), 11, 12, 13, 17, 20, 27, 28, 34, 37. All the others apparently assume an A4 printer all the time, with the corresponding width and height. This anomaly seems consistent regardless of which measure one opts to use (e.g. twips or cm). Incidentally, it also seems that the SET_PRINTER("INIT") prefers numbers rather than their equates (i.e. 9 rather than A4).
Finally, one needs to be careful because not just with SET_PRINTER("TERM") but also with graphics (e.g. ELLIPSE), horizontal and vertical positions 0 start on the margins and not on the page edge, as I was expecting.