PageScript 32 - User guide for [x]Harbour and Xbase++ - Version 3.0.3

Print Preview Window

The Print Preview Window

Function reference

PSAbort()

PSAsciiToAnsi()

PSBarCode()

PSBeginDoc()

PSBeginDocEx()

PSBeginEmuDoc()

PSBeginRawDoc()

PSBitmap()

PSEllipse()

PSEllipseEx()

PSEndDoc()

PSEndEmuDoc()

PSEndRawDoc()

PSFrame()

PSFrameEx()

PSGetAsciiToAnsi()

PSGetBin()

PSGetBorderColor()

PSGetBorderThickness()

PSGetCaps()

PSGetCoorSystem()

PSGetCopies()

PSGetCPI()

PSGetDecimalSep()

PSGetDefPrinter()

PSGetDefaultPrinter()

PSGetDuplex()

PSGetFillColor()

PSGetFillPattern()

PSGetFonts()

PSGetFontAngle()

PSGetFontBColor()

PSGetFontCount()

PSGetFontFColor()

PSGetFontJustify()

PSGetFontName()

PSGetFontNames()

PSGetFontSize()

PSGetFontStyle()

PSGetJustify()

PSGetLPI()

PSGetMaxHeight()

PSGetMaxWidth()

PSGetOrientation()

PSGetPageSize()

PSGetPaperBin()

PSGetPaperBins()

PSGetPaperBinCount()

PSGetPaperBinNames()

PSGetPaperBinNumbers()

PSGetPaperCount()

PSGetPaperNames()

PSGetPaperNumbers()

PSGetPrinter()

PSGetPrinters()

PSGetPrinterCaps()

PSGetPrinterCapsEx()

PSGetPrinterCount()

PSGetPrinterHandle()

PSGetPrinterNames()

PSGetTextHeight()

PSGetTextWidth()

PSGetTitle()

PSGetUnit()

PSGetUseDIB()

PSGetVersion()

PSGetXerox()

PSInit()

PSIsPreviewVisible()

PSLine()

PSLineEx()

PSNewPage()

PSPrintDialog()

PSPrintFile()/PSPrintEmuFile()

PSPrintRawFile()

PSSetAsciiToAnsi()

PSSetBin()

PSSetBorder()

PSSetBorderColor()

PSSetBorderThickness()

PSSetClipperComp()

PSSetCoorSystem()

PSSetCopies()

PSSetCPI()

PSSetDecimalSep()

PSSetDevice()

PSSetDirectPrint()

PSSetDuplex()

PSSetFileName()

PSSetFill()

PSSetFillColor()

PSSetFillPattern()

PSSetFont()

PSSetFontAttributes()

PSSetFontAngle()

PSSetFontBColor()

PSSetFontFColor()

PSSetFontName()

PSSetFontSize()

PSSetFontStyle()

PSSetJustify()

PSSetLPI()

PSSetOrientation()

PSSetPageSize()

PSSetPaperBin()

PSSetPDFOwnerPassword()

PSSetPrinter()

PSSetPWBounds()

PSSetPWColors()

PSSetPWPosition()

PSSetPWSize()

PSSetPWState()

PSSetPWZoomLevel()

PSSetRowCol()

PSSetTitle()

PSSetUnit()

PSSetUseDIB()

PSSetXerox()

PSTextBox()

PSTextBoxEx()

PSTextOut()

PSTextOutEx()

PSVersion()

PSWaterMark()

RGB()

Obsolete or unsupported

These functions are either unsupported or became obsolete in this version of PageScript 32 for xbase like programming languages.

PSPrnChanged()

PSRefreshPrinters()

PSSendMail()

PSSetPrintPreview()

PSSetTimeSlice()

PSShowIcon()

PSShutDown()

PSSetRowCol() - Obsolete / Compatibility

Syntax

Function PSSetRowCol([<nRows>, <nCols>])

Returns

An array with two elements : Always {60, 80}.

Arguments

<nRows> Number of virtual rows.
<nCols> Number of virtual columns.

Description

This function may be used in conjuction with two different units of measurement; APS_TEXT and APS_CLIP.

With APS_TEXT : This function is used for backward compatibility reason only. It's recommended to use PSSetCPI() and PSSetLPI(). PageScript 32 will try to set the correct CPI, LPI based on the passed values. PSSetRowCol() is located in TPSCRIPT.PRG and can be adjusted to fit your needs, if necessary.

With APS_CLIP : Calling this function AFTER setting the unit to APS_CLIP will set the coordinate system to the number of rows and columns passed in order to be 100% compatible with PageScript for Clipper (see description below).

The APS_CLIP unit

Use PSSetRowCol() to set the number of virtual rows and columns used to place text and other graphic components when using text coordinates (Unit is set to APS_CLIP). PageScript 32 divides the page in <nRows> and <nCols>. For example, if the horizontal printable area is 8 inches wide, and <nRows> is 80, then each position is at 1/10th of an inch.

What PageScript 32 actually does, it builds a virtual grid of nRows rows by nCols columns. When you print something at, let say R10, C20, PageScript 32 starts printing at the intersection of these coordinates of the virtual grid. The characters printed do not necessary fit in each of the following cells. It may be the case if you are using a fixed font such as Courier New.

The image below shows how PageScript 32 works with the virtual grid created with PSSetRowCol(). The code that produces the output is also shown.

PSSetUnit(APS_CLIP) // Must be called BEFORE calling PSSetRowCol()
PSSetRowCol(60, 80) // Creates a grid of 60 rows by 80 columns, no matter the physical paper size.
PSSetFont(APS_ARIAL, APS_PLAIN, 10)
@1,4 TEXTOUT "ABEELABS SYSTEMS - PageScript"

PSSetFont(APS_COURIER, APS_PLAIN, 12)
@3,4 TEXTOUT "ABEELABS SYSTEMS - PageScript"

PageScript 32 creates it's internal grid by dividing the physical printable area height and width by the number of rows and columns. It's up to the programmer to calculate the correct number of rows and columns to reproduce standard Console / DOS output.