Presentation is loading. Please wait.

Presentation is loading. Please wait.

PDAPI: OpenPrinting Vector Printer Driver API Overview Osamu Mihara Osamu Mihara OpenPrinting WG Japan/Asia Fuji Xerox Printing Systems Co., Ltd. 2004-3-23,

Similar presentations


Presentation on theme: "PDAPI: OpenPrinting Vector Printer Driver API Overview Osamu Mihara Osamu Mihara OpenPrinting WG Japan/Asia Fuji Xerox Printing Systems Co., Ltd. 2004-3-23,"— Presentation transcript:

1 PDAPI: OpenPrinting Vector Printer Driver API Overview Osamu Mihara Osamu Mihara OpenPrinting WG Japan/Asia Fuji Xerox Printing Systems Co., Ltd. 2004-3-23, 24, 25

2 What is a Vector Printer Driver? Send graphics commands to printer, instead of rasterized bitmap image. Send graphics commands to printer, instead of rasterized bitmap image. Called by render engine such as Ghostscript or X print server. Called by render engine such as Ghostscript or X print server. Objectives Objectives Performance Optimization Performance Optimization Achieve full speed printing on fast laser printers Achieve full speed printing on fast laser printers Utilizes graphical acceleration feature supported by printer controllers Utilizes graphical acceleration feature supported by printer controllers Data Size Optimization Data Size Optimization Reduces size of print data using high level graphics commands. Reduces size of print data using high level graphics commands. Contributes to reduce network bandwidth and increase through-put Contributes to reduce network bandwidth and increase through-put Print Quality Optimization Print Quality Optimization Utilizes printer s graphics quality enhancement technology by sending vector graphics command Utilizes printer s graphics quality enhancement technology by sending vector graphics command Color Optimization Color Optimization Driver can recognize the kind of graphics primitives and switch color scheme – natural color for bitmaps and vivid colors for graphics and text. Driver can recognize the kind of graphics primitives and switch color scheme – natural color for bitmaps and vivid colors for graphics and text.

3 Graphic Model Have Studied: Have Studied: Postscript & PDF Postscript & PDF X Window X Window Windows GDI Windows GDI Java2D Java2D SVG SVG PDLs – PCL6, LIPS IV (Canon), etc. PDLs – PCL6, LIPS IV (Canon), etc. Not based on specific graphics model among them. Took practical model for printer support. Not based on specific graphics model among them. Took practical model for printer support.

4 API Overview Job Control Job Control Open/Close driver Open/Close driver Set Job/Document/Page attributes Set Job/Document/Page attributes Graphics State Operation Graphics State Operation Set attributes for each graphics objects Set attributes for each graphics objects Drawing Operations Drawing Operations Path Path Text Text Bitmap Image Bitmap Image Scanline Scanline Raster Image Raster Image Stream Data (embedded PDL) Stream Data (embedded PDL)

5 Printer Context Operations OpenPrinter() OpenPrinter() Create printer context Create printer context Register API entry pointers Register API entry pointers Specify file descriptor for data stream Specify file descriptor for data stream ClosePrinter() ClosePrinter() Closes printer context Closes printer context Driver releases all resources Driver releases all resources

6 Job Control Operations A print job consist of documents. A print job consist of documents. A document consist of pages (document is optional unit). A document consist of pages (document is optional unit). StartJob(), EndJob() StartJob(), EndJob() StartDoc(), EndDoc() StartDoc(), EndDoc() StartPage(), EndPage() StartPage(), EndPage() Job, doc and page attributes are specified by each StartXxx() function. Job, doc and page attributes are specified by each StartXxx() function. page doc job

7 Query Device Capabilities and Information QueryDeviceCapability() QueryDeviceCapability() Query if the device can do number-up, duplex, etc. Query if the device can do number-up, duplex, etc. Information such as media size, media source and etc. which are supported by the device can be retrieved. Information such as media size, media source and etc. which are supported by the device can be retrieved. QueryDeviceInfo() QueryDeviceInfo() Query current settings of the device. Query current settings of the device.

8 Data format for Job and Query APIs (Try to) use notation by PWG/UPDF (Try to) use notation by PWG/UPDF May not accurate. May not accurate. Some are out of scope of PWG/UPDF. Some are out of scope of PWG/UPDF.

9 Graphics State Object Operations Graphics State is managed as GS object Graphics State is managed as GS object Operation to GS – InitGS, SaveGS, RestoreGS Operation to GS – InitGS, SaveGS, RestoreGS Controls to each items in GS Controls to each items in GS CTM (Coordinate Translate Matrix) CTM (Coordinate Translate Matrix) Color Space Color Space Raster Operation – ROP3 Raster Operation – ROP3 Fill Mode – even/odd or winding Fill Mode – even/odd or winding Alpha Constant Alpha Constant Line Style – width, dash/solid, cap, join Line Style – width, dash/solid, cap, join Paint Mode – opaque or transparent Paint Mode – opaque or transparent Stroke and fill color – brush control Stroke and fill color – brush control Foreground and background color – solid brush Foreground and background color – solid brush

10 Path Operations A path is a virtual track object A path is a virtual track object Will be visible by stroke or fill operations Will be visible by stroke or fill operations Will be used to define clip region Will be used to define clip region Lines, rectangles, polygons, arc/pie and bezier are all treated as path. Lines, rectangles, polygons, arc/pie and bezier are all treated as path. Operations: Operations: NewPath() – Declare start of a path NewPath() – Declare start of a path EndPath() – Declare end of a path EndPath() – Declare end of a path StrokePath(), FillPath(), StrokeFillPath() – make visible path StrokePath(), FillPath(), StrokeFillPath() – make visible path SetClipPath(), ResetClipPath() – defines clip region by current path SetClipPath(), ResetClipPath() – defines clip region by current path

11 Text Operations Still under investigation … Still under investigation … Current DrawBitmapText() will be removed. Current DrawBitmapText() will be removed. Text Operations will includes: Text Operations will includes: Define and Query font metrics Define and Query font metrics Device Font Utilization Device Font Utilization Font Downloading Font Downloading

12 Bitmap and Scanline Operations Bitmap is a bit oriented image data drawn in rectangle region Bitmap is a bit oriented image data drawn in rectangle region DrawImage() DrawImage() StartDrawImage(), TransferDrawImage(), EndDrawImage() StartDrawImage(), TransferDrawImage(), EndDrawImage() Scanline is a horizontal line defined by start and end point pairs. Scanline is a horizontal line defined by start and end point pairs. Used to draw graphics rendered by renderer Used to draw graphics rendered by renderer StartScanLine(), ScanLine(), EndScanLine() StartScanLine(), ScanLine(), EndScanLine()

13 Raster Image Operation If the device does not any graphic primitives, raster image can be sent by these operation. If the device does not any graphic primitives, raster image can be sent by these operation. StartRaster(), TransferRasterData(), EndRaster() StartRaster(), TransferRasterData(), EndRaster()

14 Stream Data Operations Direct PDL embedding is possible by these operation. Direct PDL embedding is possible by these operation. Can be used for form printing, eps embedding, or direct device control. Can be used for form printing, eps embedding, or direct device control. StartStream(), TransferStreamData(), EndStream() StartStream(), TransferStreamData(), EndStream()

15 Linking with Render Printer driver is provided as a dynamic library. Printer driver is provided as a dynamic library. Driver can be linked dynamically or via RPC. Driver can be linked dynamically or via RPC. avoids license problem avoids license problem Render libxxx.so (printer driver) API data direct linking R: GPL D: GPL or R: MIT D: Closed or LGPL glue code Render libxxx.so (printer driver) API data RPC linking R: any D: any glue code RPC library RPC server RPC Protocol API data

16 Plan for 2004 and beyond Refinement by feedback from opfc project. Refinement by feedback from opfc project. Define Text Operations Define Text Operations Make consistency with PWG/UPDF spec. Make consistency with PWG/UPDF spec. Fallback Mechanism Fallback Mechanism

17 Thank you!


Download ppt "PDAPI: OpenPrinting Vector Printer Driver API Overview Osamu Mihara Osamu Mihara OpenPrinting WG Japan/Asia Fuji Xerox Printing Systems Co., Ltd. 2004-3-23,"

Similar presentations


Ads by Google