The PostScript Library

The PostScript Library for Clipper

The PostScript Library for Clipper provides an intuitive interface to PostScript printers, dramatically expanding the creative possibilities for your reports. It can be used with Clipper 5.x and Summer '87.

The PostScript Library allows your programs to print any font, any size, any color, any orientation, anywhere--even print portrait and landscape formats on the same page.

Foreign characters and special symbols are easy to add to anything you print. Just use ps_encode.

The PostScript Library can fully justify proportional fonts and wordwrap perfectly, even with mixed fonts, sizes and attributes.

Special effects include hollow letters and reverse text (like white-on-black, color-on-black, white-on-color, etc.) The PostScript Library can also print US Postal and 3-of-9 bar code symbologies.

Graphics include boxes, pie charts and circles (which can be bordered and/or filled with gray tones, colors, stripes or grids), as well as line, scatter, bar and polar graphs. Choose from 24 marker shapes and unlimited line and bar variations.

Added power comes with the ability to download Type 1 fonts from within your application, ensuring that the printer has all fonts and any special characters needed for the document to be printed, even on shared and network printers. This downloading ability means that your choice of fonts is unlimited--even if your printer doesn't have much memory.

Plus: create and/or import Encapsulated PostScript (EPS) files; switch paper trays; specify measurements in inches, centimeters, points or any other convenient unit. Complete support for HP IIIsi printers, including duplex, binding edge, output tray, toggle between PostScript and PCL5, and much more.

Download PostScript Library demo

Basic Design Functions

ps_fillbox( nT, nL, nB, nR, [nGray] )

ps_fillcircle( nT, nL, nRadius, [nGray] )

ps_fillpie( nT, nL, nRadius, [nGray], nDegStart, nDegEnd [, nExplode] )

ps_fillshape( naY, naX, [nGray] )

ps_froundbox( nT, nL, nB, nR, [nGray], nCornerRadius )
     Draw a filled object.

ps_gridbox( nT, nL, nB, nR, nLineWidth, nLineSpacing, nAngle )

ps_gridcircle( nT, nL, nRadius, nLineWidth, nLineSpacing, nAngle )

ps_gridpie( nT, nL, nRadius, ndegStart, nDegEnd, nLineWidth, nLineSpacing, nAngle, nExplode )

ps_gridshape( anY, anX, nLineWidth, nLineSpacing, nAngle )
      Draw an object filled with parallel lines. You can call these functions twice in a row with the same dimensions but with different angles to get hatch filled objects.

ps_icon( nIcon | cIcon )
      Set current icon type.

ps_drawicon( nT, nL, [nScale] )
      Draw new icon.

ps_line( nY1, nX1, nY2, nX2, nLineWidth )
      Draw a line.

ps_lineend( nLineEnd )
      Set the line end shape.

ps_linewidth( nLineWidth )
      Set default linewidth.

ps_dash( nUnitsOn, nUnitsOff | anUnitsOn, anUnitsOff )
      Set the style of dashed lines.

ps_linebox( nT, nL, nB, nR, nLineWidth )

ps_linecircle( nT, nL, nRadius, nLineWidth )

ps_linepie( nT, nL, nRadius, nLineWidth, nDegStart, nDegEnd [, nExplode] )

ps_lineshape( naY, naX, nLineWidth, lClose )

ps_roundbox( nT, nL, nB, nR, nLineWidth, nCornerRadius )
      Draw an outlined object.

ps_pietext( nT, nL, nRadius, nDegStart, nDegEnd, cString )
      Print labels on a pie chart.

ps_pscatter( nT, nL, anAngle, anRadius, [nScale] )
      Draw a polar scatter graph.

ps_scatter( anY, anX, [nScale] )
      Draw a plain scatter graph.

Bar Codes

ps_barcode( nT, nL, cString[, nDegRotate] )
      Print a US postal service barcode.

ps_code39( nT, nL, cCode, nHeight, nWidth, nAdjust )
      Print a 3-of-9 barcode.

Color Setting

ps_gray( nGray )
      Set the default gray level.

ps_hsbcolor( nHue, nSaturation, nBrightness )

ps_rgbcolor( nRed, nGreen, nBlue )
      Set color using HSB/RGB.

EPS Files

ps_epshdr( cTitle, nT, nR )

      Create an EPS file.

ps_epsprint( cFileName, nT, nL, nB, nR )
      Include an EPS file in your output.

General Printer Control Commands

      Clean up VM.

      Mark VM for later cleanup.

ps_handle( nNewHandle )
      Set current output handle.

ps_macro( nHandle )
      Run a macro.

      Finish defining a macro.

ps_macrokill( nHandle )
      Kill a macro.

      Start defining a macro.

Special Text & Fonts

ps_download( cFontName, lPermanent )
      Download encrypted PostScript font to the printer.

ps_encode( cOldFont, cNewFont, [,acCharacters, acAssignments] )
      Define alternate character set.

ps_font( cFontName|XFM, nSize )
      Set font/size.

ps_hollow( [lNewHollow] )
      Print hollow text.

ps_reverse( cString, nOverlap[, nAlign] [, hMacro1, hMacro2] )
      Print reverse text.

ps_underline( cString[, nAlign] )
      Print underlined text.

ps_subscript( cString, nShift )

ps_superscript( cString, nShift )
      Print text shifted below/above current cursor position.

ps_textrotate( nT, nL, cString, nDegRotate [, nAlign] )
      Print text at an angle.

Placement on Page

ps_colcalc( nCol )

ps_rowcalc( nCol )
      Return the distance in current units from top, left for a givencolumn/row


      Set page orientation.

ps_moveto( nT, nL )
      Move cursor to new place.

ps_pagesize( nHeight, nWidth )
      Change the page dimensions for printing on other than letter size paper.

ps_qqout( cString[, nAlign] )
      Place text at cursor position.

ps_scale( nT, nL, nB, nR )
      Change size of space in which to print.

ps_setrowcol( nNewRow[, nNewCol] )
      Set row/column.

ps_units([ nNewUnitSetting ])
      Set units of measurement.

      Set the page back to 8.5 x 11.

Justification - Simple Text

ps_cjust( nT, nL, cString )

ps_ljust( nT, nL, cString )

ps_rjust( nT, nL, cString )
      Center/left/right justify simple text.

ps_rccjust( nRow, nCol, cString )

ps_rcljust( nRow, nCol, cString )

ps_rcrjust( nRow, nCol, cString )
      Center/left/right justify simple text (only one font and size) at row,col.

Justification and Wordwrapping

ps_jadd( cString, nChars, nFontSize, XFM )
      Add text to be printed to the justification machine.

ps_jadjust( nSpaceWidth )
      Set the space width used by ps_jfit()/ps_jadd() to calculate line length.

ps_jbegin( nWidth )
      Start justification of a line.

ps_jbreak( cString, nChars )
      Figure where to break a line of justified text.

ps_jcenter( nT, nL )

ps_jfull( nT, nL )

ps_jleft( nT, nL )

ps_jright( nT, nL )
      Place & justify complex text.

ps_jfit( cString, nFontSize, XFM )
      Measure the amount of cString to print on the next justified line.

      Return the current cursor position.

      Return the number of spaces to be placed between words on the current line.

      Return width of text added to line by ps_jadd().

ps_jwrite( cString, nChars, nFontSize, XFM, [nOffset] )
      Output justified text--the final step.

ps_width( cString, nFontSize, XFM, [nSpaceWidth] )
      Return the width of cString in the font specified by XFM.

Font Info

ps_ascender( XFM )

ps_capheight( XFM )

ps_descender( XFM )

ps_xheight( XFM )

ps_ulpos( XFM )

ps_ulthick( XFM )

ps_weight( XFM )
      Return information about measuring characters in font.

ps_ccount( XFM )
      Number of characters in font.

ps_cfind( XFM, cName )
      Is character in font?

ps_cname( XFM, nI )
      Ith character in font.

ps_family( XFM )

ps_file( XFM )

ps_fullname( XFM )

ps_name( XFM )
      Return the names of the font described by the specified XFM.

ps_readxfm( cFileName )
      Read an XFM file from disk into a variable.

ps_validxfm( XFM )
      Is specified XFM valid?

ps_xflget( nHandle, TOC, cName )
      Retrieve an XFM from an XFM Library.

ps_validtoc( TOC )
      Is specified Table of Contents valid?

ps_xflcount( TOC )
      Number of entries in a TOC.

ps_xflname( TOC, nIndex )
      Return name of Ith entry in TOC.

ps_xfltoc( nHandle )
      Return TOC for specified XFL.

Printer Commands

      Reset the printer to its default mode.

ps_eject( [nCopies] )
      Eject the current page.

ps_init( [Ctrld] )
      Initialize the printer.

ps_manual( lManual )
      Select manual feed.

ps_open( nPort, nBaud, lXOFF, lCTS )
      Set parameters for the serial port driver.

ps_operator( cOperator )
      Pass a one-word command to the printer.

ps_out( cString, [Term] )
      Pass output directly to the printer.

ps_setautotray( lAuto )
      Set input tray auto-switching on or off.

ps_setduplex( lDuplex )
      Set duplex printing on or off.

ps_setouttray( lOutTray )
      Set the output tray.

ps_settumble( lTumble )
      Set the orientation of the back side of a duplex page.

ps_tray( nTrayNumber )
      Select the paper tray.

Download PostScript Library demo