# Hewlett-Packard Appliance Printing Software Development Kit

#

# Printing

#

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.

# Printing

##

## Introduction

The Hewlett-Packard Appliance Printing Software Development Kit (SDK) is designed to offer basic printing support for “thin client” environments. As such, the breadth of available features is secondary to supplying optimal speed and print qualities over several printer families, while maintaining a small code-space/ run-time footprint.

The following topics discuss printing and the SDK in greater detail:

> Printers and Features Supported

> Minimum Functionality

> Print Modes

> Resolution and Scaling

## Printers and Features Supported

The following features are supported by the SDK and apply to all printer families and family members:

- 24-bit RGB input

- Multiple Paper Sizes (Letter, A4, Legal)

- Grayscale (Black-Only) Mode

- Comprehensive Error Handling & Notification

- Online HTML-Based Help System

Currently supported printer families, their family members, and particular features available are listed in the following table. Printer family derivatives are available on the market and should be considered to have similar feature functionality as other members of their family type. (8xx Series Only - The scope of this Series does NOT include the older 850C, 855C, 870C or 890C printers.)

## Printer Family / Functionality Table

Printer Family | Model Number | Functionality
Photo Cartridge | Photo Loading Tray | Duplexer Module | Banner Paper | Photo Quality Mode | Grayscale | Device Text | USB | Pages Per Minute | Dots Per Inch | Connectivity

600 Series
| 600 | N/A | N/A | N/A | N/A | No | Yes (with pen change) | Yes | N/A | 4 | 600 | IEEE 1284
| 610C 612C | Yes | N/A | N/A | N/A | Yes (with photo pen) | Yes | Yes | N/A | 4 | 600 | IEEE 1284
| 640C | Yes | N/A | N/A | N/A | Yes (with photo pen) | Yes | Yes | Yes | 4 | 600 | IEEE 1284, USB
| 648C | Yes | N/A | N/A | N/A | Yes (with photo pen) | Yes | Yes | Yes | 6 | 600 | IEEE 1284, USB
| 660C | N/A | N/A | N/A | N/A | No | Yes | Yes | N/A | 4 | 600 | IEEE 1284
| 670C 670TV | N/A | N/A | N/A | N/A | No | Yes | Yes | N/A | 4 | 600 | IEEE 1284
| 680C 682C | N/A | N/A | N/A | NS | No | Yes | Yes | N/A | 5 | 600 | IEEE 1284
| 690C 692C 693C 694C 695C 697C | Yes | N/A | N/A | NS | Yes (with photo pen) | Yes | Yes | N/A | 5 | 600 | IEEE 1284
800 Series
| 810C 812C | N/A | N/A | N/A | NS | Yes | Yes | Yes (except in photo mode) | N/A | 6.5 | 600 | IEEE 1284
| 830C 832C | N/A | N/A | N/A | NS | Yes | Yes | Yes (except in photo mode) | No status support | 8 | 600 | IEEE 1284, USB
| 840C 842C | N/A | N/A | N/A | NS | Yes | Yes | Yes (except in photo mode) | Yes | 8 | 600 x 1200 | IEEE 1284, USB
| 880C 882C | N/A | N/A | N/A | NS | Yes | Yes | Yes (except in photo mode) | No status support | 9 | 600 | IEEE 1284, USB
| 895C | N/A | N/A | N/A | NS | Yes | Yes | Yes (except in photo mode) | No status support | 11 | 600 | IEEE 1284, USB
900 Series
| 930C 932C | N/A | N/A | NS | NS | Yes | Yes | Yes | Yes | 9 | 600, 2400 x 1200 | IEEE 1284, USB
| 950C 952C | N/A | Yes | NS | NS | Yes | Yes | Yes | Yes | 11 | 600, 2400 x 1200 | IEEE 1284, USB
| 970C | N/A | N/A | NS | NS | Yes | Yes | Yes | Yes | 12 | 600, 2400 x 1200 | IEEE 1284, USB
| 990 | N/A | N/A | NS | NS | Yes (with photo paper) | Yes | Yes | Yes | 17 | 600, 2400 x 1200 | IEEE 1284, USB, IR
2000 Series
| 2100 2150 | Yes | N/A | N/A | N/A | Yes (with photo pen) | Yes (with black pen) | Yes | Yes | 4 | 600 | USB
| 2200 2250 | Yes | N/A | N/A | N/A | Yes (with photo pen) | Yes (with black pen) | Yes | N/A | 4 | 600 | IEEE 1284
e-Series
| e-20 | N/A | N/A | N/A | N/A | No | Yes | Yes | Yes | 4 | 600 | IEEE 1284, USB

> NS - No Support. This feature will be ignored or actively return an error.

> N/A - This feature does not come with this printer.

The following Hewlett-Packard DeskJet printers are not supported by this SDK:

- 400 series

- 700 series

- 850C, 855C, 870C or 890C

Any non-Hewlett-Packard printers, or Hewlett-Packard non-DeskJet printers (including OfficeJet LaserJet and PhotoSmart printers) are also not supported by this SDK.

[Back to top]

## Minimum Functionality

### Print Quality

The quality of printed output can vary widely in the thin-client environment, due to host limitations. Some factors that can affect quality are:

- The presence of a scalable font engine in the thin client host.

- The use of internal printer fonts where possible.

- Composite black printing on single pen printers (DJ400, DJ600).

- The quality of document to be printed.

- The quality, scaling, and compression of document images.

- Anti-aliasing and other algorithms designed to make text look good on a TV screen.

During testing, it is important to keep these limitations in mind. Print quality problems should still be reported though, even when they can be attributed to the limitations listed above. This data will help Hewlett-Packard identify areas of the thin client host where print quality can be improved the most.

[Back to top]

## Print Modes

The firmware in most DeskJet printers is written to accept various kinds of tradeoffs between speed and print quality, and to optimize output for different types of paper and ink cartridges (pens). The differences involve a complicated variety of parameters including resolution, number of inks, and special printer commands; for each printer model, only a small handful of such combinations are allowable. The SDK packages these combinations inside a structure called a Print Mode. The Print Mode hides technical details and presents the packaged combinations in such a way that they can be concisely related to the conditions for which they were designed.

The number of print modes for each printer type is given by the GetModeCount function in PrintContext. Typically, there is a default color mode and a grayscale mode; other modes with special properties such as high-resolution photo quality are available for certain printer models. In some cases, the developer must choose between features such as device-based text and photo quality. This is accomplished by selecting the mode (Print Context member SelectPrintMode,) and then querying with PrinterFontsAvailable. Every mode has a string identifier (for potential use in a user interface) given by GetModeName.

When bi-directional communication with the printer is available, the PrintContext constructor selects a default mode based on the installed pen. (The default mode is the “lowest” or fastest mode still compatible with the pen.) In order to override this setting, (possibly due to selected user preferences or unavailable bi-directional communication,) the SelectPrintMode method is provided in PrintContext.

SelectPrintMode takes a zero-based index. By convention, index 0 always refers to the Grayscale mode GRAYMODE_INDEX=0). Index 1 DEFAULTMODE_INDEX refers to the "normal" color mode; other values up to <GetModeCount-1> refer to specialized modes. If the selected Print Mode parameter requested is incompatible with the installed pen, SelectPrintMode returns a WARNING. Because it is a warning and not an error, it is possible to proceed using the requested mode even under the incompatible conditions. Examples of incompatibilities include using GRAYMODE when the pen has colored ink. The results are a gray-looking output that was wastefully produced by combining colored inks. Another incompatibility, using DEFAULT MODE when a "photo-pen” is installed, results in “normal” pen output quality instead of output the more expensive photo-pen was intended to deliver. Some incompatibilities may even result in no useful output whatsoever.

Changing the Print Mode may also change the Effective Resolution; therefore, resolution should be queried again after changing the Print Mode. (In general the “normal” modes under release 1.0 will all use an Effective Resolution of 300 d.p.i., while certain “special” modes may use 600 d.p.i.) For older printer models, the Print Mode may also determine whether printer fonts are allowed or not.

[Back to top]

## Resolution & Scaling

### Resolution

Effective graphical output resolution depends on the PrintMode selected for the attached Printer model. For version 1.0 of the SDK, only two resolutions can be selected: 300 d.p.i. (dots per inch,) or 600 d.p.i., (the latter being used only for various “Photo/Best” modes.)

To determine the acceptable resolution for the currently selected printer and mode, call the PrintContext function, EffectiveResolution. Remember that the calls must be in the appropriate order, or the results will not be valid. For example, if SelectDevice and/or SelectPrintMode are called after EffectiveResolution, the result of the EffectiveResolution call will no longer be valid.

### Scaling

When the graphical source data exists at resolutions lower than EffectiveResolution, the data must be scaled up to reach the desired resolution. The SDK code does this automatically, based on the relation between the two values InputPixelsPerRow and OutputPixelsPerRow - the two parameters to the PrintContext's constructor or SetPixelsPerRow function.

When the graphical source data exists at resolutions higher than EffectiveResolution, the host must sub-sample in order to reach the desired input resolution. The SDK code provides no assistance in this regard - in other words it is illegal to set InputPixelsPerRow greater than OutputPixelsPerRow.

Also, note it is always preferable to obtain original data at a higher resolution and sub-sample the data, rather than to take previously sub-sampled data and scale it up.

For more information, refer to the Best Practices for Optimal Printing, Image/Test Resolution Problem.

[Back to top]