libsc85_86s.so Specifications

Copyright (C) SEIKO EPSON CORPORATION 2004.

Contents
1  Outline
2  API Function
    2.1 libprt_init
    2.2 libprt_page_init
    2.3 libprt_out & libprt_out_at
    2.4 libprt_page_end
    2.5 libprt_end
3 Error Codes


1 Outline

pips-closed(libsc85_86s.so) is a library that converts the RGB data into the ESC/P data.
The user is able to write the codes using this library.


2  API Function

2.1 libprt_init

Initialization of the library.

int
libprt_init (
           HANDLE*,            The pointer to HANDLE used in the internal library.
           LP_LIBPRT_INIT      Initialization structure of the library.
        );

    Return value : Error Code

    Structure :
        typedef struct _LIBPRT_INIT_STRUCT
        {
          FILE* output;         The pointer to output.
          char* paper;          Paper
                                    "A4"        :A4  210x297 mm
                                    "B5"        :B5  182x257 mm
                                    "A5"        :A5  148x210 mm
                                    "LT"        :Letter  8 1/2x11 in
                                    "LGL"       :Legal  8 1/2x14 in
                                    "EXE"       :Executive 7 1/4x10 1/2 in
                                    "HLT"       :Half Letter 5 1/2x8 1/2 in
                                    "A6"        :A6 Index card 105x148 mm
                                    "INDEX5"    :Index card  5x8 in
                                    "INDEX8"    :Index card  8x10 in
                                    "ENV10"     :Envelope #10  4 1/8x9 1/2 in
                                    "ENVDL"     :Envelope DL  110x220 mm
                                    "ENVC6"     :Envelope C6  114x162 mm
                                    "ENV5X8"    :Envelope 132x220 mm
                                    "PHOTO"     :Photo Paper 4x6 in
                                    "4X6FULL"   :Photo Paper 4x6 in No Perforations
                                    "PP100"     :10x15 cm Photo

          char* format;         Print format
                                    "MONO"  :Black print
                                    "COLOR" :Color print

          char* resol;          Resolution
                                    "180"   :180dpi
                                    "360"   :360dpi
                                    "720"   :720dpi

          char* high_speed;     High Speed Print
                                    "ON"    :Bi-directional Print
                                    "OFF"   :Simplex Print

          char* bin_id;         Paper Source
                                    "AUTO"    :Auto Sheet Feeder
                                    "T4AUTO"  :Sheet Feeder-No Margins

          char* media_type;     Media Type
                                    "PLAIN"        :Plain Paper
                                    "PLAIN_BKSAVE" :Plain Paper (Black Ink Save Mode)
                                    "BWP"          :Bright White Paper
                                    "PMMATT"       :Matte Paper - Heavyweight
                                    "EPP_P"        :DURABrite Photo Paper
                                    "GPAPER"       :Photo Paper
                                    "OHP"          :Ink Jet Transparencies

          char* qlevel;         Quality Level
                                    "DRAFT"     :Draft
                                    "STD360"    :Standard (360dpi)
                                    "FINE720"   :Fine (720dpi)
                                    "SFINE720"  :Super Fine (720dpi)
                                    "PHOTO1440" :Photo (1440dpi)
                                    "PHOTO2880" :Photo (2880dpi)
                                    "SPHOTO2880":Super Photo (2880 dpi)

          POINT margin;         Margin
                                    x = Top Margin[0 - bottom(maximum) value](pixel)
                                    y = Left Margin[0 - right(maximum) value](pixel)

          POINT paper_size;     Paper Size
                                    x = Width(pixel)
                                    y = Length(pixel)

          POINT paper_area;     Print Area
                                    x = Width of printable area(pixel)
                                    y = Length of printable area(pixel)

          char* mw_type;        Micro Weave
                                    "ON"    :MicroWeave ON
                                    "OFF"   :MicroWeave OFF

          char* inkset;         Ink Set
                                    "DEFAULT" : default (N/A)

          char* auto_cut;       Auto Cut
                                    NONE

          char* clear_ink;      Clear Ink
                                    NONE

        } LIBPRT_INIT, *LP_LIBPRT_INIT;


2.2 libprt_page_init

Initialization of the printing.

int
libprt_page_init (
        HANDLE,                 The variable used in the internal library.
        LP_LIBPRT_PAGE          Initialization structure of the page print.
        );

    Return value : Error code

    Structure :
        typedef struct _LIBPRT_PAGE_STRUCT
        {
          char* color_mode;     Color mode adjustment
                                    "PHOTO" :Photo - realistic
                                    "GRAPH" :Vivid color
                                    "NONE"  :No adjustment

          char* halftone_type;  Halftone Type
                                    "ED"    :High Quality Halftoning

          int brightness;       Brightness                 = [-50 - 50]
          int contrast;         Contrast                   = [-50 - 50]
          int saturation;       Saturation                 = [-50 - 50]
          int r_strength;       Red color compensation     = [-50 - 50]
          int g_strength;       Green color compensation   = [-50 - 50]
          int b_strength;       Blue color compensation    = [-50 - 50]
          void* reserved;       reserved

        } LIBPRT_PAGE, *LP_LIBPRT_PAGE;


2.3  libprt_out & libprt_out_at

Conversion of RGB data into Printer code.
When "Color mode adjustment" is "AUTO", libprt_out_at it.

int
libprt_out (
        HANDLE,                 The variable used in the internal library.
        LP_LIBPRT_BAND          Initialization structure of the print data.
        );

    Return value : Error code

    Structure :
        typedef struct _LIBPRT_BAND_STRUCT
        {
          long width_pixel;                   Values of the raster's pixel
          long width_bytes;                   Values of the raster's byte
          long line_number;                   Values of the raster's number
          unsigned char* byte_data;           Image of raster
          LP_LIBPRT_ATBMP_BAND lp_atbmp_band; "Color mode adjustment" sets LP_LIBPRT_ATBMP_BAND in case of "AUTO".
                                              Set null besides it.
        } LIBPRT_BAND, *LP_LIBPRT_BAND;

        typedef struct _LIBPRT_ATBMP_BAND_STRUCT
        {
          long width_bytes;                   Values of the raster's byte
          unsigned char* byte_data;           Attribute Bitmap of raster
        } LIBPRT_ATBMP_BAND, *LP_LIBPRT_ATBMP_BAND;


2.4  libprt_page_end

It terminates the printing operation and also sends interruption to the printing operation.

int
libprt_page_end (
        HANDLE,                 The variable used in the internal library.
        int                     Cancel flag
                                    When the process is interrupted by some reasons,
                                    it sets the cancel flag to TRUE.
                                    The cancel flag is normally set at FALSE.
        );

    Return value : Error code


2.5  libprt_end

Terminates the library process.

int
libprt_end (
        HANDLE                   The variable used in the internal library.
        );

    Return value : Error code


3  Error Code

The meaning of the returned value is shown below.

        0   Normal termination
        1   Failed to keep the Memory space
        2   Wrong parameter was given into the input
        3   The function was called in the wrong order
        4   The cause of the error cannot be specified

[EOF]
