FSG Open Print

PAPI (Open Printing API)

Norm Jacobs

Sun Microsystems, Inc.

Norm.Jacobs@Sun.COM

Introduction

PAPI stands for:

Printing Application Programming Interface

Pronounced “pappy” or “P.A.P.I.”

PAPI contains:

Data Structures for interacting with basic print service objects.

Functions to perform various operations against a print service or it's objects.

PAPI is an API for applications to use to perform print service interaction.

Objectives

To provide applications a means of interacting with print services without being tied to a particular service or protocol

To allow a rich, extensible set of information to flow between application and print service

To support a rich enough set of operations to be useful to most applications with printing needs

Overview

Provides abstraction of server, queues (printers and classes), and jobs.

High-level API focuses on providing a common interface to multiple printing systems and protocols.

Uses extensible attribute sets based on IPP for representing queue and job information.

Multi-valued and typed

Overview (cont)

Currently supports

Server connection (and authentication were applicable)

Basic queue operations:

enumerate, query,enable, disable, modify, enumerate/purge jobs

Basic job operations:

submit, stream, query, cancel, hold, release, modify

Details

Data types introduced by the PAPI:

papi_status_t	status/error code enumeration

papi_service_t	server/service connection

papi_printer_t	printer object/handle/context

papi_job_t	job object/handle/context

papi_attribute_t	object attributes

papi_stream_t	stream object/handle/context

papi_job_ticket_t	job ticket

papi_filter_t	filter for limiting printer lists

Details

Service API

papiServiceCreate

create a new service object for submitting jobs, listing printers, etc.

papiServiceDestroy

destroys a service object and all associated resources

papiGet*() / papiSet*()

Get or set the corresponding service object attributes

UserName, Password, Encryption, AuthCB, AppData

Details

Printer API

papiPrintersList

Retrieves a list of printer/class queues

papiPrinterQuery

Queries for detailed information about a printer object

papiPrinterModify

Sets printer object attributes

papiPrinterPause / papiPrinterResume

Stop and start job processing on a printer object

Details

Printer API (cont)

papiPrinterPurgeJobs

Cancels all jobs on a printer

papiPrinterListJobs

Lists jobs on a printer

papiPrinterGetAttributeList

Retreive an attribute list from printer object

papiPrinterListFree / papiPrinterFree

Deallocate resources associated with a printer object or list of printer objects

Details

Job API

papiJobSubmit / papiJobSubmitByReference

Submit a print job either immediately copying or postponing copy of the job data

papiJobValidate

Verify that the document format and job attributes are valid for and supported by the designated print queue

papiJobStreamOpen / papiJobStreamWrite / papiJobStreamClose

Open/write/close a stream for printing data on-the-fly

Details

Job API (cont)

papiJobQuery

Request job information from print service

papiJobModify

Modifies the job attributes

papiJobCancel

Cancels a print job

papiJobHold / papiJobRelease / papiJobRestart

Hold, release, or restart a print job

Details

Job API (cont)

papiJobGetAttributeList

Retreive the corresponding attribute list from a job object for further lookup or enumeration using the Attribute interface

papiJobGet*

Retreive the corresponding PrinterName, Id or JobTicket from a job object

papiJobListFree / papiJobFree

Free a job object of list of job objects and their associated resources

Details

Attribute API

papiAttributeListAdd / papiAttributeListAdd*

Adds a single attribute (and value) to an attribute list

Supported types include

String, integer, boolean, range, resolution, datetime, collection, metadata

papiAttributeListGet*

Retreive the value associates with an attribute

papiAttributeListFind

Search for an attribute in a list

Details

Attribute API

papiAttributeListGetNext

Walk through an attribute list

papiAttributeListFromString

create/append an attribute list using a text-based format

PapiAttributeListToString

Convert an attribute list to a text base string form

papiAttributeListFree

Deallocate resources associated with an attribute list

Details

Miscellaneous API

PapiStatusString

Return a textual representation of a papi_status_enumeration

papiLibrarySupportedCalls

Enumerate all papiCalls that do not simply return PAPI_OPERATION_NOT_SUPPORTED

PapiLibrarySupportedCall

Determine if a specific function is supported by the implementation

Accomplishments

Sep 2002

Published template code for v0.5 of specifcation

Nov 2002

Published v0.9 of specification

Dec 2002

Released implementation of v0.9 on top of CUPS

Implemented, but have not released implementation of PAPI on top of System V LP

Jan 2004

Published v0.91 of specification

Accomplishments (cont)

Feb 2004

Released PAPI based code on SourceForge

PAPI dynamic library

PAPI over CUPS

BSD/SYSV print commands implemented on top of the PAPI

March 2004

Released PAPI over RFC-1179 support

What’s next - schedule

Expand funcionality in PAPI

Administrative operations

Document object

Implement and Release PAPI over IPP support

Release IPP server implemented over PAPI

Integrate support for various Open Source projects:

GNOME, KDE, OpenOffice, Mozilla, Samba, etc.

PAPI Working Group Info

Participants

Norm Jacobs (Sun) – current editor

Alan Hlava (IBM)

Mike Sweet (EasySoftware)

Ira McDonald (High North Inc)

Glen Petrie (Epson)

PAPI Working Group Info (cont)

Email

printing-spool@freestandards.org

Subscribe

http://freestandards.org/mailman/listinfo/printing-spool

Archive

http://freestandards.org/mailman/listinfo/printing-spool

IRC:

irc.gnome.org#openprinting

Source

http://sourceforge.net/projects/openprinting

Thanks for your time and interest!

Questions and/or comments

This presentation is located at

CIP4 - Cooperation for the Integration of Processes in Prepress, Press, and Postpress

FSG Open Print

Claudia Alimpich

2003-03-07T21:07:08

Norm Jacobs