Hewlett-Packard Appliance Printing Development Kit

# Hewlett-Packard Appliance Printing Software Development Kit

#

# Getting Started

#

Version | Date | Comments
2.0.0 | 11.29.00 | Version 2.0.0 documentation reflects code changes from code Version 1.1.0. (Note: Documentation and code version numbers are designed to be independent of each other, and may not agree.)

Notice

The information contained in this document is subject to change without notice.

Hewlett-Packard makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material.

All SDK documentation included in this list, received with the Hewlett-Packard Appliance Printing Software Development Kit, or received at a later date as a result of communication with any Hewlett-Packard employee regarding the Hewlett-Packard Appliance Printing Software Development Kit, is Hewlett-Packard "confidential" information.

Licensee shall not export or re-export the Hewlett-Packard documentation, or copies or variations thereof. Licensee may use Hewlett-Packard documentation only to develop Licensee Printer Drivers for exclusive use only on Hewlett-Packard printers.

Licensee shall assure that all Hewlett-Packard Software and all documentation based on Hewlett-Packard Documentation include the following notice:

"Copyright © [year]

Hewlett-Packard Company.

All Rights Reserved."

Hewlett-Packard Documentation has been developed entirely at private expense and is provided as "Commercial Computer Software" or "restricted computer software." Use, duplication or disclosure by the US Government or a US Government subcontractor is subject to the restrictions set forth in subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer Software clauses in DFARS 252.227-7013 or as set forth in subparagraph (c) (1) and (2) of the Commercial Computer Software-Restricted Rights clauses in FAR 52.227-19, as applicable. The Contractor is Hewlett-Packard Company, 3000 Hanover Street, Palo Alto, California 94304.

Copyright ă 2000

Hewlett-Packard Company.

All rights reserved.

# Getting Started

## Introduction

This section gives you the information you need to begin merging the Hewlett-Packard Appliance Printing Software Development Kit (SDK) with your host system.

The following topics are covered in this document:

> Minimum System Requirements

> Building Your Driver

## Minimum System Requirements

Before starting the SDK, ensure that you have the following hardware and software.

### Equipment Needed

Hardware:

· A development system of the developer's own choosing (such as a PC running Windows NT, etc.)

· A supported Hewlett-Packard printer. (See the Printing document's Printers and Features Supported list.)

· Parallel or USB Cable (IEEE STD 1284-1994 compliant recommended).

Software:

- C ++ compiler and linker.

- Standard libraries supporting string and other functions.

The SDK code has been built and tested using both GNU and Microsoft compilers.

[Back to top]

## Building Your Driver

The following is a skeletal makefile to compile the core source files. Auxiliary files containing components such as the code to implement the SystemServices object as well as system-specific compiler options and linking commands, must be added to your makefile. (Note: There are several different versions of make, not all of which support the same code - this makefile may not work on all platforms. An excellent source of information on Makefiles is, Managing Projects with make, by Andrew Oram & Steve Talbott.)

In order to maintain simplicity, (and because developers should not change any of the core files,) the only dependencies shown are of the object (.o) files upon the source (.cpp) files. Note however, that with some versions of make, a separate rule is required for each of these individual object (.o) files.

The skeletal makefile also lists the build symbols that define basic build parameters, including what printer classes will be included in the build. These classes do not match specific DeskJet printer models, but rather group all models into five equivalence classes representing the types of ink cartridges or other features requiring separate code paths.

The purpose of providing these compiler switches is to allow separate drivers of significantly smaller size to be built – presumably to be downloaded into devices after the printer model connected to the user’s device has been identified, (either automatically or with user input). If code size is not an issue, simply include all of the printer-model compiler switches.

Symbols also exist to provide support for the various font families when Device-Text is desired. If no font families are selected, all Device-Text support is removed from the build. Symbols also exist to correctly compile for LITTLE_ENDIAN vs. BIG_ENDIAN platforms, and to turn on script-recording when generating scripts for Hewlett-Packard review – see Recording a Script File in the Debugging document.

# flags for build:
# CAPTURE for generating scripts only
# _LITTLE_ENDIAN if platform uses little-endian byte-order
# NO_FONTS to exclude device-text support
# _APDK_C_API to include 'C' interface functions
# printer-model selection:
# DeskJet600c _DJ600
# Series 600 including 660,670,680 _DJ6xx
# Series 600 including 610,640,690 _DJ6xxPhoto
# Series 800 _DJ8xx
# Series 900 including 970, 950, 930 _DJ9xx
# Series 900 including 990 _DJ9xxVIP
# Apollo P-2100 series _APOLLO2100
# DEFINE FLAGS HERE
# example: production build for all series 600 printers,
# with text support, for Intel platform
# FLAGS = -D_LITTLE_ENDIAN -D_DJ600 -D_DJ6xx -D_DJ6xxPhoto
CC = g++ -c $(FLAGS)
.cpp.o:
echo "compiling $(<F)"
$(CC) $(<F) -o $(*F).o
OBJS = aladdin.o ap2100.o breaks_open.o broadway.o capture.o cgtimes.o courier.o \
Compression.o Context.o create_so.o creator.o \
DJ600.o DJ630.o DJ660.o DJ690.o DJ6XX.o DJ895.o DJ600_maps.o DJ660_maps.o \
DJ690_maps.o DJ895_maps.o DJ895_maps2.o DJ970_maps.o DJ970_maps2.o \
filterhpa.o Font.o globals.o Header.o htfed_open.o imager.o imager_open.o \
interp_open.o IO_Utils.o Job.o ltrgothic.o Printer.o Registry.o ResSynth.o \
rgbtocmyk.o scaler_open.o script.o SystemServices.o TextManager.o \
TextSupport.o Translator.o univers.o version.o versioncode.o

[Back to top]