An Introduction to XHTM L Print Presented to the W 3C Print - - PowerPoint PPT Presentation

an introduction to xhtm l print
SMART_READER_LITE
LIVE PREVIEW

An Introduction to XHTM L Print Presented to the W 3C Print - - PowerPoint PPT Presentation

An Introduction to XHTM L Print Presented to the W 3C Print Symposium 2006 Dean Anderson, Hewlett-Packard Company October 17, 2006 dean.anderson@ hp.com XHTML -Print So why does the world need another print language? W e already have:


slide-1
SLIDE 1

An Introduction to XHTM L Print

Presented to the W 3C Print Symposium 2006

Dean Anderson, Hewlett-Packard Company October 17, 2006 dean.anderson@ hp.com

slide-2
SLIDE 2

XHTML

  • Print

So why does the world need another print language?

  • W e already have:
  • PostScript/ PDF
  • PCL

– HP

  • EscP – Epson
  • And several others…
slide-3
SLIDE 3

In the days of MS DOS – M x N Problem

M Applications N Printer Models

slide-4
SLIDE 4

Basic W indows (and Mac) printing model

PC Application GDI+ (Graphics L ibrary API) Vendor Specific Printer Drivers

Vendor A Model X Vendor A Model Y Vendor B Model Q Vendor C Model W

Printer X Printer Y Printer Q Printer W Font L ibrary

slide-5
SLIDE 5

Advantages of the PC Model

  • Abstraction of the printer – a standard, layered

interface, for supporting printing.

  • Allows the printer vendor to optimize cost tradeoffs
  • The cost historically was mainly in memory size
  • L

aser Engines required a full page bitmap because you could not pause in the middle of the page

  • PCL

5 in HP’s case. Higher level objects are passed to the printer – Text and graphics objects

  • Inkjet Engines could easily pause in the middle of the page.
  • PCL

3 in HP’s case. L

  • w level raster interface
slide-6
SLIDE 6

Device Printing – A N ew Opportunity

slide-7
SLIDE 7

Device Capability

  • Very limited resources – Memory and processor speed.
  • Connectivity challenges
  • N o USB in many cases
  • N o common IO in all cases
  • However, there is a trend towards internet connectivity but usually through

the PC.

  • L

imited operating system – no printer abstraction

  • In some situations, no ability to load new applications.
  • N o ability to load a driver
  • The MxN problem would not be tolerated by vendors that did not see a

lot of value in printing, or by printer vendors that did not see a big return on investment.

slide-8
SLIDE 8

Objectives for a new printer interface

  • Common language across all vendors and printer

models.

  • Allow for printer differentiation
  • Small memory footprint
  • Appropriate for laser engines and inkjet engines.
slide-9
SLIDE 9

Convergence of Standards Activities

  • In 2000, the Bluetooth Printer W G began working on a

Print Profile for printing from mobile phones and PDA’s.

  • About the same time the UPnP Imaging Committee began

working on a Print Service for device-to-device printing in the home.

  • Both needed to specify a mandatory print format and

image format for interoperability.

  • Several formats were considered, but all were found

wanting:

  • Postscript, PCL

, TIFF, J etSend, PDF, etc.

  • Bluetooth – BPP – Blue tooth Printing Profile
  • UPnP – UPnP PrintEnhanced:1
slide-10
SLIDE 10

Enter Modularization & XHTML Basic

  • W hen XHTML

Basic advanced to R EC, a light went on… XHTML modules offer a format that:

  • Is suited for top-down, one-page-at-a-time processing;
  • Utilizes fonts on the printer, but tolerant of differing font

metrics

  • Is network ready (MIME type, http-equiv, etc.)
  • Has a well-defined, rich toolbox and strong standards

process for growth

  • Supports standard image formats
  • Coupled with a suitable CSS subset, provides strong

presentation flexibility

  • Provides an easy off-ramp for printing XHTML

Basic content

  • Allows for the printer to manage it’s own memory
  • resources. In the case of XHTML

image content can be pulled when needed as many times as needed.

slide-11
SLIDE 11

W hat is XHTML

  • Print?

From the Abstract:

  • XHTML
  • Print is member of the family of XHTML

languages defined by the Modularization of XHTML .

  • It is designed to be appropriate for printing from mobile

devices to low-cost printers.

  • It is targeted at printing in environments where it is not

feasible or desirable to install a printer-specific driver and where some variability in the formatting of the output is acceptable.

slide-12
SLIDE 12

W hat’s Included in XHTML

  • Print?
  • Essentially, it’s XHTML

Basic 1.0, plus:

  • Text Extension Module - Presentation
  • b, big, hr, i, small, sub, sup, tt
  • Scripting Module
  • noscript, script (for printing of noscript; script is ignored.)
  • Style Sheet Module
  • style
  • Style Attribute Module
  • style attribute
  • A requirement for baseline J

PEG support

slide-13
SLIDE 13

W hy N ot J ust Use XHTML 1.0?

  • It is sometimes suggested that modular profiles are not the

best approach; that it would be better to just implement the parts of XHTML that are appropriate to one’s solution; and the parsing rules will ensure graceful degradation for incomplete implementations.

  • That approach would not meet the market requirements of

either printer vendors or client manufacturers for this solution: printed results must be strongly deterministic to control support costs. This implies the author must know which features are supported to ensure consistent output across all printers.

  • This requires specifying which features are mandatory;

ergo, a profile.

slide-14
SLIDE 14

L

  • oking at printing from a W eb centric

point of view

  • Paper does not allow

for a scroll bar – yet.

  • Part of the challenge

was adapting XHTML to paged media – leading to the development of the CSS3 Module: Paged Media

slide-15
SLIDE 15

W hy is Microsoft not interested in supporting XHTML Print?

  • XHTML
  • Print does not guarantee W YSIW YG

printing (W hat You See Is W hat You Get)

  • Basically there is no mechanism for downloading
  • r managing fonts.
  • The design center for XHTML
  • Print was “content is

king” – meaning it was more important to print the information then to meet W YSIW YG.

slide-16
SLIDE 16

The Print L anguage is only half the problem

  • Printers also require a control mechanism
  • A way to submit a print job
  • Track progress
  • Manage exceptions
  • Out of paper
  • Out of ink
  • Paper jam
  • Paper size selection
slide-17
SLIDE 17

UPnP Control Point – Object Oriented

Methods

(remote procedure calls)

  • GetPrinterAttributesV2
  • CreateJ
  • bV2
  • CreateUR

IJ

  • b
  • GetJ
  • bAttributes
  • GetMediaL

ist

  • GetMargins
  • CancelJ
  • b

Properties

  • J
  • b status
  • Printer State

Events

  • Printer state changes
  • Printer errors
slide-18
SLIDE 18

R elated Standards Bodies

(Digital L iving N etwork Alliance)

Universal Plug and Play W ireless Mobile Handsets N etworked digital home services

slide-19
SLIDE 19

DLNA DMPr Device DLNA DMPr Device

UPnP PrintEnhanced:1 Service UPnP PrintEnhanced:1 Service XHTML Print XHTML Print CSS Print CSS Print

UPnP Print Service Page Description Language

CSS2 Print Enhanced CSS2 Print Enhanced

DL N A Printing Profile

slide-20
SLIDE 20

TCP/ IP opens up interesting solutions 2 & 3 Box Printing

UPnP Printer

2 Box Print

Content Control

Printer Controller Digital Media Server

3 Box Print

Printer Controller

Content Control Control

UPnP Printer

slide-21
SLIDE 21

Content beyond the home

Internet

Content Control Control

UPnP Printer

slide-22
SLIDE 22

Image Handling

  • XHTML

Print does not require

  • Embedded thumbnails
  • Image R
  • tation
  • Progressive rendering
  • Side-by-side images
  • Memory limitations in the printer may prohibit side-by-

side image printing. In this case the printer is allowed to reformat the page.

  • In all cases the printer should attempt to preserve the

content.

slide-23
SLIDE 23

UPnP Photo Templates – Adopted by DL N A

  • Photo Printing - A Key emerging application.
  • Printers combine Images with an XHTML

template to create the printed page

+

XHTML Template Document XHTML Template Document =

2006 European Vacation 2006 European Vacation

slide-24
SLIDE 24

XHTML Example – Photo Templates

  • 57 Photo templates were written to make it easy

for vendors to print photos

  • Available at www.upnp.org
  • Allows for printing 1-8 photos on a page
  • Supports many different media sizes.
  • Prints “Standard photo sizes”: 10x15cm, etc..

1-up 2-up 3-up

slide-25
SLIDE 25

2-up, 5x7 on A size Photo Template

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBL IC "-/ / W 3C/ / DTD XHTML

  • Print 1.0/ / EN"

"http:/ / www.w3.org/ MarkUp/ DTD/ xhtml-print10.dtd"> <html xmlns="http:/ / www.w3.org/ 1999/ xhtml"> <head> <title>2up_portrait_A_5x7in</ title> <base href="http:/ / insert.proper.address.here/ " / > <style type="text/ css"> @ media print { @ page {size:letter; margin:0.2in;}} body { padding:0in; } div.page { position:relative; page-break-after:always; } div.page_last { position:relative;} div.img1 {overflow:hidden; padding:0in; position:absolute; top:0.13in; left:0.55in; width:7in; height:5in;} div.img2 {overflow:hidden; padding:0in; position:absolute; top:5.46in; left:0.55in; width:7in; height:5in;}

slide-26
SLIDE 26

/ * 5 x 7 in * / img.img_23_0deg { width:7.5in; height:5in; margin-left: -0.25in; image-orientation:0deg; } img.img_23_90deg { width:7.5in; height:5in; margin-left: -0.25in; image-orientation:90deg; } img.img_23_180deg { width:7.5in; height:5in; margin-left: -0.25in; image-orientation:180deg; } img.img_23_270deg { width:7.5in; height:5in; margin-left: -0.25in; image-orientation:270deg; } img.img_34_0deg { width:7in; height:5.25in; margin-top: -0.125in; image-orientation:0deg; } img.img_34_90deg { width:7in; height:5.25in; margin-top: -0.125in; image-orientation:90deg; } img.img_34_180deg { width:7in; height:5.25in; margin-top: -0.125in; image-orientation:180deg; } img.img_34_270deg { width:7in; height:5.25in; margin-top: -0.125in; image-orientation:270deg; } img.img_916_0deg { width:8.889in; height:5in; margin-left: -0.944in; image-orientation:0deg; } img.img_916_90deg { width:8.889in; height:5in; margin-left: -0.944in; image-orientation:90deg; } img.img_916_180deg { width:8.889in; height:5in; margin-left: -0.944in; image-orientation:180deg; } img.img_916_270deg { width:8.889in; height:5in; margin-left: -0.944in; image-orientation:270deg; } </ style>

slide-27
SLIDE 27

Image R

  • tation

Landscape (Most Common) Use 0deg rotation Reverse Landscape (Rare) Use 180 deg rotation Reverse Portrait (Common) Use 90 deg Rotation Portrait (Common) Use 270 deg rotation

slide-28
SLIDE 28

Center Cropping

5x7 3:4 2:3 9:16

slide-29
SLIDE 29

<body> <!-- Page 1-(n-1) --> <div class="page"> <div class="img1"><img src="image1.jpg" class="img_yy_xxxdeg" alt="photo"/ ></ div> <div class="img2"><img src="image2.jpg" class="img_yy_xxxdeg" alt="photo"/ ></ div> </ div> <!-- Page L ast --> <div class="page_last"> <div class="img1"><img src="image3.jpg" class="img_yy_xxxdeg" alt="photo"/ ></ div> <div class="img2"><img src="image4.jpg" class="img_yy_xxxdeg" alt="photo"/ ></ div> </ div> </ body> </ html>