Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Sunshow Pro V3.0 - <b>primerapcx()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PrimeraPCX()

Prints a PCX image file on a Primera 76000/76001 Thermal Color printer


Syntax

PrimeraPCX(<cFILE.PCX>, <cDevStr>, <nLeft>, <nTop>, ;
           <nNewWidth>, <nNewHeight>,               ;
           <nBrightness>, <nHeatSetting>, [<nOptions>])


Arguments

<cFILE.PCX>
Name of the image file, and optional drive and path.

<cDevStr>
Output device string: "lpt<n>", "com<n>", "prn", "file:<FILE>".

<nLeft>
Left offset into the page in inches.

<nTop>
Top offset into the page in inches.

<nNewWidth>
New print width in inches.

<nNewHeight>
New print height in inches.

<nBrightness>
Change brightness value between -255 dark to 255 light. Suggested value 30.

<nHeatSetting>
Set heat setting. Acceptable values range from 1 (coldest) to 96 (hottest)). 
Suggested value 25.

<nOptions>
FORMFEED, FASTFLAG.


Returns

0
Success.

-1
Cannot open <cFILE.PCX>.

-2
Cannot allocate memory for line buffers.

-3
This is not a PCX file.

-4
Print terminated by user.

-5
Printer does not acknowledge.

-6
Printer is out of paper.

-7
Printer timeout error.

-8
(Reserved)

-9
<cDevStr> must be "lpt<n>", "com<n>", "prn", "file:<FILE>".

-10
Write Error: Disk Full.

-11
<nLeft> plus <nNewWidth> must be less than 8.5".

-12
<nTop> plus <nNewHeight> must be less than 11.5".

-13
<nBrightness> should be between -255 and 255.

-14
<nHeatSetting> should be between 1 (cold) and 96 (hot).

-99
Parameters are invalid.


Remarks

PrimeraPCX() prints a ZSoft PCX image on a Fargo Primera 76000/76001 
Thermal Color Printer. FORMFEED disabling and FASTFLAG are optional. You 
must set brightness, port, or file.PrimeraPCX() has the capability of 
printing images larger than screen sizes to 2550x3300 pixels.

The printer requires RGB temp files for quantizing, thus sufficient hard 
disk space is required. Use Sunshow rotation functions for image rotation.

The image will be quantized on your computer in 3 to 5 minutes, with a 
typical total print time of about 9 minutes. Printing with the FASTFLAG 
option is recommended.

The FASTFLAG option writes directly to printer ports, and supports LPT 
ports only. It does not support COM ports, PRN, FILE, and is not network 
redirectable. Therefore, it cannot be used with a network prionter. The 
FASTFLAG option is compatible with a non-networked local printer at your 
current workstation.

Network use of PrimeraPCX() requires network print services, which are 
redirected BIOS print functions. Therefore, <cDevStr> must be "LPTn", 
"COMn", or "PRN" or "file:cFILENAME.PRN" If you choose to print to 
cFILENAME.PRN, you must send the binary PRN file to your remote printer 
(networked printer) with network print services.

A two step method is also available. By printing to a file, SendBIN can be 
used to print the file. Actual print time using SendBIN will almost as fast 
as the FASTFLAG option.


Example

To print ASMUSSEN.PCX 4.0" x 3.0" at 360 dpi with a left margin of 1.75 
inches, a top margin of 3.5 inches, and in the approximate center of the 
page:

cFILENAME = "ASMUSSEN.PCX"
nStatus = PrimeraPCX(cFILENAME, "lpt1", 1.75, 3.5, 4, 3, ;
                     30, 25, FASTFLAG + FORMFEED)
IF nStatus < 0
    DO CASE
    CASE nStatus = -1
        ? "Cannot open", cFILENAME
    CASE nStatus = -2
        ? "Cannot allocate memory for line buffers"
    CASE nStatus = -3
        ? cFILENAME, " is not a PCX file"
    CASE nStatus = -4
        ? "Print terminated by user"
    CASE nStatus = -5
        ? "Printer does not acknowledge"
    CASE nStatus = -6
        ? "Printer is out of paper"
    CASE nStatus = -7
        ? "Printer timeout error"
    CASE nStatus = -9
        ? "cDevStr must be lpt<N>, com<N>, " + ;
           "prn, file:<FILENAME>"
    CASE nStatus = -10
        ? "Write error: Disk Full"
    CASE nStatus = -11
        ? "nLeft plus nNewWidth must be less than 8.5"
    CASE nStatus = -12
        ? "nTop plus nNewHeight must be less than 11.5"
    CASE nStatus = -13
        ? "nBrightness should be between -255 and 255"
    CASE nStatus = -14
        ? "nHeatSetting should be between 1 (cold)" + ;
          " and 96 (hot)"
    CASE nStatus = -99
        ? "Parameters are invalid"
    ENDCASE
ENDIF



See Also: PrimeraGIF() PrimeraSCR()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson