---
title: WWDC2003 Session 210
framework: wwdc
role: article
path: wwdc/wwdc2003-210
---

# WWDC2003 Session 210

## Transcript

Kind: captions Language: en good afternoon I'm Travis Browne the graphics and imaging evangelist at Apple and it's my pleasure to welcome you to session to 10 which is printing so what we're going to be talking about in this session is pretty much the culmination of a lot of work that we've been hard work that we'd be doing in the printing system because we originally shipped Mac os10 dotto we obviously got a lot of feedback at the first WIBC three years ago where developers wanted a system that was far more open and far more flexible even though we had planned long term to build out a lot of these developer features we heard loud and clear that you guys wanted access to the system now so last year we actually made a pretty dramatic change we actually took our printing system and swapped a very significant portion of it to an open source architecture called cups or the comedy X printing system and this new openness has given us a tremendous new capabilities for both the users and developers things like IPP based printing for example and also an expensive filter architecture that gives developers an opportunity to refactor many classes of applications such as rips and output systems that can merely be plugged into the cup sprint path and what we've really focused on this year for Panther is doing the fit and finish work continuing how we're integrating these pieces and then doing new enhancements on top of the integration so that's what we're going to focus on the session it's my pleasure to invite rich Blanchard the engineering manager for the printing team to the stage to take you to the presentation thank you 6 of Travis I think Travis just gave my talk was really good i am the engineering manager for printing apple and i want to thank all of you for coming to our 2003 printing update actually have a double thank you for all of you who actually attended last year last year there were a lot of fireworks i had the dubious pleasure of announcing that we were changing 75% of the printing system and listening to all of you sort of drop your jaws in one smooth motion it was very nice we replaced task of operating system last year the whole back half went away replaced it with open source cuts with traffic explained along with cups came a brand-new printer driver architecture to sit next to the printer driver are sure we had double the number of printer driver architectures always a good thing we rewrote our print center application in Cocoa so that was a brand-new rewrite of our major you I piece that we present to the user user so it was very exciting there was a lot of concerns from the developers that we were changing so much for Jaguar but we were able to do it I was very happy and after the talk last year so in about two weeks having this nightmare that I would have to come back this year sit back in front of you again and my best Yogi Berra voice to explain how is changing the other 75% of the princess in this year the luckily we don't have to do that this year again is trying to explain we're just evolving what we change last room we're taking some cups features that we didn't have you I for and we're putting new UI on top of it print center is going to evolve a little bit internally it's not changing but you'll see desktop printers back again in Panther wow totally there was the reason we're going to it and we're working on the printer driver architecture that comes with cups to make that as powerful as the existing printer architecture we had before cups but primarily we've been focusing on PDF you've gone to all the sessions this conference you've heard again and again especially in the graphic sessions PDF is what Mac os10 is all about Mac extend is built on top of quartz quartz itself built on top of a PDF imaging model a PDF imaging model can import and export PDF documents for your application if you want your application to really do well on Mac OS 10 you have to embrace courts and that means leaving behind some api's are probably very comfortable it means using courts instead of quick draw and for printing it means using the PDF training path instead of our laserwriter eight legacy frame path now that's actually a dirty little secret we have in some of you not know that there are actually two ways to print inside of Mac os10 the PDF printing path is our preferred printing path it's defining characteristic is the fact that after your application is done drawing the end result is a PDF full file now your application can draw with quick draw we'll take those quick draw calls will convert them into courts calls and courts will school out of PDF force will have that PDF school file you can draw directly with courts or you can use cocos and that's drawing commands which are implemented via court and against pullout PDF this is our good printing fast this is the pretty fast we'd like you all to use well there's a good printing path there's got to be another printing path and that's our laser a great legacy printing that this was created for 10 point 0 and the primary purpose was to ease the transition for desktop publishing applications of a carbon based on the Mac os10 and it did a great job for that to make it different from the PDF burning path would differ about this is we actually generate a pic spool file this is exactly the same school files we generated in OS 9 some ways the writer eight so those desktop publishing applications that were comfortable with laserwriter eight work on Mac OS 10 it's only available for PostScript printers the defining characteristic ear the reason people use this is because they can generate poster picture comments embedded within their quick draw and so they only can use poster picture comments if the Fernando phone script printer the next point a sore one and I wasn't sure how to get to it and so the way I usually do a talk when there's a sore point I try and distract you so instead I have a story and in the stories hidden this analogy I'm gonna try and get this right we'll see so the story is about two friends old baseball friends they've been friends forever and spruce and Fred now they've been friends forever they spent their whole life's going to giants games and after the giants game going home and talking about the giants game and they loved it Jackie doctor decades they do this now they're in their 80s to go to a giants game together they go to the bar afterwards was talking about the giants game and Fred suddenly looks concerned looks through school now we're getting up there and I kind of come to grips with the fact that we're gonna be passing away soon and that's fine I can do that but hi my name is baseball you know you think there's baseball in heaven and he was really concerned about it and versatile i know i'm not sure he was worried about company attorney said i'll tell you what we'll make a pact whoever dies first we'll go up to heaven look around figure out what the baseball story hasn't come back and report to the survivor and they agree in Fred felt better well turned out later that night Bruce died dine and sleep went up to heaven looked around figured out whether there's baseball in heaven send a spirit back to report to Fred welcome up in the middle night Friday slicker oh my god don't worry about I died I went to heaven it's fine I checked on baseball though Franco's all well thank you what sort of facebook as well I've got good news and I've got bad news the good news is heaven has baseball fact they play every day the bad news is you're pitching next Wednesday so the bad news is we have a compatibility test we have this laser eyes your legacy printing path it's available on Panther it's been available since 10-point oh that is you have to worry about its life expectancy all right this is as of today deprecated doesn't mean it's going away we ensure binary compatibility for you it's a big thing for us so if your application uses this printing pass you're fine the deprecated means we're not going to be spending work on this we're not going to be trying to improve this if you have a new feature you want on this be prepared for us to tell you you should really go to use the PDF training path so that was a sore point everybody get that all right so that means we want you to use this PDF printing path well how do you do it well the answer is you don't have to do anything it is our default praying path in the system so if you just have a normal printing application you're on the PDF training path and you're fine and again you can draw with quick draw or cocoa reports to get into trouble to use the laser I de-rate legacy path you actually have to do work and we try and help you get in trouble because we have sample code that shows you how to get into trouble very helpfully but the idea is when your application prints or the user print and that print dialog rolls back up your application makes the call into the print system says hey what are the spool file formats I'm allowed to print to given the printer that the user is targeted and giving the print set includes targeted and if the user has printed to a raster printer or selected preview or selected save as PDF refers to hate the only school file available choose PDF to good printing path but if they said print and they're targeting a postscript printer then we're going to publish to you can either do the PDF sprinting past or you can generate this pic spool file on the laser ID rate legacy prank and so what you have to do to figure out and many of you may not know in your applications whether you're in trouble whether you're pitching next Wednesday is to look for this code that's at the bottom look for this PM session set document format generation call do a grep for that if you see that you're on the deck created printing path you're going to keep working but you're not going to be able to take advantage of some of the important features of the system what are those important features in the printing system well I'm going to spend a great many slides going over these different benefits and because you're going to fall into groups as developers are going to be those of you are on the laser iterate legacy printing path and they're going to be those of you who are not we're on the PDF training fast these slides have a dual purpose if you're using the compatibility printing fast the legacy printing path the slides are intended to show you how great it would be if you and said switch brain pass and went back on PDF Bernita if you're already there it's a pat on the back 12 it's also a way to tell you some of the features that you can get because you're already on this good printing pathways you can leverage courts and give the user new features these advantages fall into six categories talk about the unified imaging model you get on the printing fat there's ability to give the user a preview from any of your applications in a good preview save as PDF always important user feature the do PDF workflow feature that we made available in Jaguar 1004 access to courts from even your quick draw based carbon application and the new court filter so you can use them so the unifieds imaging model if you are on the PDF praying that you only need one rendering loop inside your application that rendering loop can draw your view of the document to screen it can draw it when it's printing a raster printer and it can draw it one spring to a postscript printer this is good if you're a developer if you're on the labor a great legacy train pass the reason you have that laser either it legacy printing passes because your application knows how to generate a view of its document extremely well if it's printing to a postscript printer because that's why you're on that path is going to generate PostScript picture comments with dead i'm in the inside of the quick draw but you also have to handle the PDF printing pass be printing to a raster printers that means you have a suboptimal or a poor rendering path for these raster printers so you've got two paths and one of them's bad so we want you if you don't impede to get pretty path to use that thing rendering loop the other thing is you don't know where your PDS going to go you think you're printing but maybe you're not you don't know what's the other end of the print system especially with cups we can put all sorts of cups filters out there that are combining TV apps or spitting them up on some sort of screen for display before they print and if you're using the laser area compatibility path nobody's gonna be able to show the PDF because you didn't generate a PDF you're on the PDF twenty past you can preview in mac OS 10 all applications get preview and i get a great preview that PDF that you spool opens up inside the preview application which has lots of new features inside a panther in particular have search capabilities it has soft proofing so the preview applications gain more and more powerful if you don't know how to generate a good PDF transition if your document then what you're going to get inside of preview is not going to make the user very happy the applications that use the laser eye turret legacy printing path has have two solutions to this problem user hits preview they ask what is available spool path we tell them only PDF they panic and they r after their whole document and they give that to so you get one big raster image of what they think that should look like user gets that in preview they zoom in the goal that doesn't look right or they save it may go man weird those four megabytes come from right it was just one text document so that's a poor substitute for having or to having a good PDF rendition of your document users complain and so the second step or second refinement and some of these applications are doing is they're just disabling the preview button so throughout OSN every application has preview except for yours because you disabled it that's not good save as PDF is a very similar story if you're on the laser eight-legged see printing path that by definition means you cannot make a good PDF version of your document so when the user clicks save as PDF where do they get well they're going to get probably that raster where you're going to disable it we have this concept we call digital master again this is the idea that when the user hits save as PDF your application was going to draw its document the view of this document and its full flower it's going to draw it as fine as you can it doesn't know what the printer is it's not down sampling for the printer just give us everything you know about your document so it looks as good as possible so that when we go save as PDF we have the best document view of your of your document that we could possibly get that means when save as PDF since it we want you to draw vectors we don't rasters we want you to draw fishes because one of plants will get most out of save as PDF is that the file sizes are too big so that's our fault some of its your application fault we're going to talk a little bit more later about ways you can print efficiently or save as PDF efficiently on the PDF print as PDF workflow so we talked about digital master the idea again that you can capture this great digital master rendition of your document from the save as PDF button new and Jaguar send out to dot for with PDF workflow and that was the next step okay now that we can capture this great PDF for most applications it would be great if there were some extra processing steps it could purpose it for the web or for printing or they could open it up in some other application or included an attachment and mail or anything else that you could possibly think of to do with it so that's what the PDF workflow feature is that is in Jaguar and again in Panther one of the other important parts of it is that it hooks the printing or the user side of printing printing is really divided into these two half there's a user space printing where your application exists and it draws its document and once we get that PDF school file we throw it over this wall into the print server which lives out on its own works as a demon works as root works in Los sorts of different user IDs they can't have access back to the original printing users folders and directories so PDF workflow solutions for that we have some great documentation on this you should go look at I'm gonna spend some time talking about PDF workflow it's a pro feature it's not enabled by default there are these two folders that we search for till their library PDF services and lighted library PDF services if they exist we change the look of the print dialog we take that save as PDF button and we turn it into this icon that has a pulldown menu on it you can quibble over the UI element all you want that's what it does and we then enumerate all of the items in those folders and create this popup menu off of that icon so those are the workflow items that a user can select will your application will school as PDF and will hand the PDF to these workflow items to do whatever it wants with it so what kind of things can you put in there you can put in folders that's new in cancer if you put a folder inside of one of those directories it creates a submenu inside of the workflow menu so if you have a bunch of shrinkers things to optimize pdfs you can put them all on a folder inside of the PDF services folder and you'll get a submenu with just your shrinkers in Jaguar random piano you can put a folder alias in that folder a folder alias when the user selects that corresponding item the PDF has just moved into the resolve folder alias so I use this for web receipts i have something my home directory is called web receipts the folder make an alias to it I put it in PDF services and whenever i buy anything online and i got to say that order number but i really want to write it down i go print select the workflow item say web receipts and it just moves that file into that folder never to be looked at again it's very convenient you can put an application or an application alias into this folder when that selected by the use of the PDF school file because you're using that PDF print pass it handed to the application in an open event an application do whatever it wants well I do here is I make an alias of mail and I put that in PDF services when this is selected it opens up a new composition window inside a male and has that PDF as an attachment all I have to do is address it and send it off the great ways for forming websites or pictures that you have unix tools are also supported you can write a unix tool we talk about these more later so I'm skip past that you write Apple scripts the applescript PDF workflow is unique and that the applescript actually execute since I'd of the application that's printing so if you have used or UI that you want to present to the user but you want to look like it's coming from out an application you can use an apple script to do it and the app the script will run with inside that at a new in cancer we have ports filters for processing PDF files so PDF workflow PDF workflow tool is any file that is sitting inside that PDF services directory that has its executable bit set and is not an application now you can write these and see but you don't have to write an executable to land units can be written in these interpret languages that we have built in the system Python Perl Ruby or even shell scripts so I have to do is write one of these scripts drop it in the right folder and now there's this new tool available to the user from the PDF workflow popup menu and the tools actually get a little bit more information some of the other items we talked about they get three command-line arguments they get a title which is the users title the document also awesome that's on title so make sure you set your your document name if you're writing an application before you print you get a the cups set of options tells you everything that came out of that print dialog that user might have selected and you get path to the pdf's law so it's exciting about writing these tools via the PDF workflow is it dips in real well with another technology we announced this week which is court scripting and for those of you missed it the quick to sentence descriptions court scripting is the language bindings for courts and also quick time and also parts of app get that lets you write something like a Python script and call directly into court so you can take advantage of courts without having to write a compiled application so as an example what I've written here is a PDF workflow item a script python script that will take that PDF that comes out of your application and render rasterize each page of the CMYK image and store it off as a jiff so you know that's pretty serious application if somebody asks you to write that okay take PDF file and generate tips for it I don't know how long it would take you know it's certainly a couple hours or the four minutes it would take you to actually do it with this court scripting so just to walk through this you can see this first slide all this code does is make sure it has the right number of arguments so this is a to slide example the first slide has no content and the second slide just want to come up there you go so here's the real work of creating these tiff files first thing you want to do is open up that PDF file that was handed in to you from the print system so that's Fiji PDF document create with provider now you have this PDF document reference you know loop over all the pages in that PDF document very simple for loop to go through the number of pages and on each page you're going to figure out how big that page it because you want to create a raster image to hold that document you create a quartz context that's backed by a raster buffer this particular case we tell that we want a CMYK raster buffer correct size and then we tell courts to draw that PDF page and magically we now have a rasterized rendition of that PDF page we pick some paths from file that we're going to store the tip in and then again this is like magic at least to me you tell the context okay take your bits and write them out at the tiff file and you're done so you can now take this drop it in your PDF service file and you have this new feature for your user we're going to give this demo but this working and some other PDF workflows hollenbeck's gonna come up and help me out and show some of this so we're going to go to demo one so we have a keynote presentation we're going to use as a demo here throughout our demos today well baseball one so now keeping with the theme and that is the user might go to the print dialog and we populated that PDF service file so now we have this different look of the print dialog and click on the workflow item and you see convert to CMYK chips select that your PDF is spooled out in the background the separate processes runs and what I've done is changed the last line to actually open up that first page in the preview and there it is you can go get info and it'll tell you yes indeed this is actually a CMYK raster version of that thing you printed out a keynote the colors are actually interesting you'll notice the colors don't match this is why we tell you don't use device colors I really wanted to do with CMYK demo so how to use device CMYK but there's a great example of why not to use device colors because we can't match them back on the street so that's that particular workflow tool this other demo of workflow I want to do is one that I've tried to other talks I've given and I've always had internet problems so this could be the first successful launch of this one this is an applescript it opens up the PDF document in Illustrator if any of you use illustrator illustrator has this incredible applescript dictionary for manipulating PDF I'd looked at that thing I was amazed it still just amazed me it's an incredibly useful so it opens up an illustrator walks through all the texts in the PDF takes the text run gets it then uses babelfish on the internet to get a translation for that text run gets Spanish pulls it back and it has illustrator to change that text run for Spanish transition so the result is it will convert to Spanish if we have internet access it's kind of fun to watch so there it is opened up an illustrator goes there and now you're in Spanish and again a user can do this so you can write these kind of scripts and provide them for users so we're gonna try one more i think this other demo i like generally these workflow items take that PDF and use it as the source they optimize it they translate it they do something like this it's other demos a little different all I wanted to do today was to show you some sexist at WWDC 2003 but that's kind of boring so what I did is I took the PDF and I used it as a pattern to fill in the background and then fill in the text as you can see what that looks like this one takes a little bit more processing we're not too bad so we have a pattern which build the whole page with that one page from the keynote presentation it's the background we used no capacity maybe point2 and we drew this text and we drew the tech using that same pattern but with a one-point no opacity and it's kind of cool if you look you'll see that there's a continuous because we're using patterns runs from the whitish areas of the document into the letters which are now Boulder so you don't have to use your PDF documents as the source you can actually use them for special effects and I had some other cool things I was doing with this was taking source code and running it through this thing so you get source code whipping through the letter whatever you can imagine I photo is another one so thank you alan all right so we're gonna move back on to some of the advantages we're done with work flow this is a big one this is one of the ones where people are already on the PDF path don't have to pat themselves on that this is one of those advantages you get and things you can take advantage of if you're on the PDF or a PDF print path you can draw or you already drawing probably a four-carbon application with quick draw but you can if you have new graphics or something new feature you want to put in application draw with course you might want to draw with court because you want to render a PDF document inside of your traditional carbon application that's pretty cool you might want to use transparency also pretty cool and it's an easy way for a carbon application to start transitioning to using courts piecemeal it's also a great way to efficiently draw there are some things you can draw a much more efficiently in court when they're going to a PDF file then you can in quick draw we're gonna look at some of those so first how do you mix quick throw imports we showed this I think two years ago first but it's incredibly simple you have a graph port and that's what you normally printing into or drawing to the screen very that's the quick draw grass-court and you make this call QD begin CG context and what you're really saying when you make that call is well here's this graph where I'm done with it when you hold on to it for a while I'm really done with it but i'm done with it for now give me a quartz context that i can draw into your grand for it becomes disabled anything drawn there doesn't work and now you have the cg context and you have all the cg open to you that cg context is freshly initialized so there's no sharing of state between that CG context and your quick draw drawing so you don't have to worry about any strange interactions no pen colors none of that and every time you call us you get a fresh instantiation so you can draw independent pieces of your drawing without any crossover when you're done drawing with quartz you call cg ncg contacts your graph port become pot again your cv context is no longer valid and we go back to drawing with quick draw again this has been available since 10.1 and we have a very nice sample it's available on developer.apple.com flash printing there are a couple things to be careful us when you're mixing one of them is that quick draw and court they don't agree on which way is up right so quick draw likes to have that y axis running down to the top of the port and quartz likes to have it running up from the bottom left of the port so this can be a problem you're not expecting it but now you are no problem and it's actually very easy to handle all you have to do is tell court that you want to flip things so you just have a scale back up to the top part top left corner of your graph port and you flip that y coordinate and now the two-match don't draw text because it'll be upside down but everything else will be fine and text is pretty easy to you can use hgf to flip the checks scale as well so 23 magic lines and also in your mixing courts quick draw and having some great drawing applications and this isn't hypothetical this isn't something boy it would be cool if every people but he did there are major applications that mix courts with quick draw and do it to generate new features and this is XL I love this example they're charting package is amazing it has some credible shading and transparencies they do and I do it with quartz even though this is a major carven quick-draw based application they were able to mix the two and have this really great feature so you can do the student they've been doing this since they shipped so that's access to courts and courts with quick draw once you start doing that you can also start drawing more efficiently because you're using courts rather than a quick draw in order to explain how that works I have to give this to sent and it's worth no more than that overview of what a PDF document looks like a PDF document is made up of a set of page streams one for each each page in the document those page streams of the drawing commands what it takes to render that document but a page stream is allowed to reach out of itself back to this object sex objects part of the document where maybe big parts or big images in particular might be stored so they can be used out of line so the drawing stream to be more efficient so you generally get something like this diagram where each page stream has references into this other part of the document into the objects part of document if you're using quick draw and the type of hypothetical case you have multiple pages and both pages page wanted two are both drawing the same image the using quick draw you're going to get a PDF document that looks like this your objects portion of your PDF document is going to have two images identical two separate sets of bits and each page page one is going to point to one of those page two is going to point together so you have this duplication that you do not want you can get rid of it you can get rid of this by going to court if you use quartz quartz has a cgm address cgm it's refs are immutable once you make one of those and they're incredibly easy to make you can make them from kings or JPEGs or raster buffers once you make one of these you have an image rep you can draw it on any page you want and the system knows it's pointing to the same bit that means we can make them point to the same set of this the same image in that objects portion of the document you can't do this with quick job because of pics maps fix macs are not immutable there's nothing to stop you as a quick draw application from drawing with the pixmap with the underlying set of rafters then kind of messing with the rafters and then using that same fix map same corner same handle again we don't know the bits have changed and you don't really want us when your school and documents checking all your bits so we don't so if you use quartz you can get rid of that redundancy and you get something like this which is exactly what you want you have two different page streams pointing and sharing the same image and there's some c code up there that shows you how you create this CD image rest from the jpeg so you on page one how you draw it on page two it's very simple in fact it's so simple you can do it with court scripting so this is another example of a PDF workflow I don't we're just going to walk through it very quickly but the idea here is it's just going to stamp your PDF document with an image in the bottom right corner of every page so if you have a 20-page document you get stand for 20 images but there's only one image in the resulting PDF so again we check the number of arguments we find the PDF path in the image path so the PDF half the document were going to generate the stamp document the image path is the thing we're going to stamp the Stamper we figure out where we want to put it and then we loop over all the documents in the original PDF the ones coming from your application printing we find the bottom right corner we call begin page in the PDF we're creating we draw the page that's coming in to us we draw the image and we call em page and when this is done executing you've got a brand new documents that is now stamp and is efficiently done so images are cool and images are the most common case of redundant drawing we see in PDF and both iPhoto and keynote both had problems where they were not efficiently using cgm addressed and so the resulting PDFs were not as optimal as you might like they fix those and now you get much smaller PDFs out of both those applications which is great especially your printing contacts out of iphone and you print the same thing 20 times you don't want 20 times five MiG's good but you can do the same thing with PDF drawing so this is actually exciting what you can do is capture set of PDF drawing courts drawing with CG PDF context create that's the context that anything you draw into it we turn into a PDF stream capture your PDF create a PDF document from that captured PDF that's a CG PDF create with provider and then wherever you need that logo or that footer for that form throughout your document you just call CG context draw a PDF document and it will draw at PDF again and again but that drawing will be shared so again that footer will only appear once in the objects portion of the document and again you can only do this with course so our last advantage is something that's new inside of Panther its corpse filters and this is again is the printing guys rendition of what courts filters are if you go to the color stank session will give you the real answer what I think it is it takes a PDF document and it breaks it into three streams they'll sell meet you there's really four but first three I breaks it into images everything out at PDF documents an image goes into one stream everything that's text goes into another stream and everything thats vector-based drawing goes into a third-string each of those streams could be separately processed by a color stick profile so you can change the color of images or the rendering intent of images different than you do text different than you do vectors the image steps with image stream actually has the second step which is an image processing scripts they can do resampling compression and then all three of those streams are stuck back together and you generate a PDF file so this is a way to purpose PDF files you can imagine something that has three different profiles in the sports filter all those profiles convert the colors into web safe colors the image stream up on the top has a step we're down samples all of your image to say hundred DPI and it stops back into a PDF and what that quartz filter is done it turns your what some people will tell you is a big PDF your digital master PDF and its purpose fit for web view so you can do quartz filters or you get to use quartz filters if you print on the PDF print that they get used when you're printing there's a new color sync panel on the print dialog that'll show you an available set of quartz filters and allow you to create your own court filters inside of the cloche link utility so you can print and force all your images to go to sepia or whatever else you can think of to create we also use it for host-based color matching when you print in Panther to a color postscript laser we can do color matching on the host which we just do all the color matching the printer which was great it was device independent and I was a big proponent of it it was flow in the printers had bugs in it and people would complain so being a proponent of it didn't save it so we now have host base color matching where we can do all the stuff on your faster cpu and do the translations preview can also use the courts filters save as PDF can use quartz filters so you can just put one in your PDF services folder select it and you'll do whatever kind of purposing you set up that quartz filter to do and that was PDF so we've got a quick demo Alan's going to come up and help me again of soft proofing this is new and Panther we're going to look at soft proofing and we're going to look a little bit at some of the filters that are built in related to color stick one thank you we'll go back to keynote again recognize this document let me get high go ahead and print and hopefully we have selected a monochrome printer this widget is the laser 8500 just go ahead and hit preview and here the DNA's a mono laser it is showing the grayscale image and here is a new check box down here going to turn it off and this is what you would normally get for the preview and you just turn it off and on again just to see exactly what you get so what's important here with the PDF preview is which sent over to preview your digital master captured all of your content but we've also set along with it the profile for that device that you are going to be praying to this case the monochrome device and preview can show it either way is it can apply that output profile for that would represent your printer and show you in monochrome or it can take it off take it off and show you what that a digital master look like so you can use this also for color printers to see what the gamut looks like on your printer so come by lexus so we're going to look at some of the color stick filters now within the collection panel you Cosentino look and see let's go ahead and add the color sync filters which will bring it to be colors ink utility and here is our PDF and between just select different and it yeah it's fine i think recalled sorry there's the black and white blue tone I don't say that word great tone and yeah so again what's important here digital master everything your application drew pipe through this Court's filter to change what viewed on screen or what's printed but we didn't touch your original document thanks Alan we're going back to slide so we'll go back over to the five thank you so those were the advantages unified imagery model your applications easy to write because you have one rendering loop your PDFs that come out to be repurposed user can redirect them between postscript around two printers preview your users get good preview of your applications drawing they appreciate that save as PDF they can capture your documents output and reuse it send it to people via mail would have a PDF workflow they can post process it and purpose that PDF access to port young Peter perhaps your applications can do more interesting drawing and you can use quartz filters which can be very exciting moving on so why isn't everybody on the PDF printing path well there's two reasons that people generally give me they tell me they can't get there because their application depends upon the ability to import eps and the print eps file eps capsulated postscript therefore they need to generate PostScript therefore they need the laser editor legacy printing classes they can generate poster picture comics into quick draw so that's one the other one is their application generates all its own PostScript they don't want to deal with quartz they just have a PO script rendition and that's what they want to print a lot of desktop publishing applications fall into this and more and more of the UNIX applications that are moving over tomorrow Mac os10 fall under this category they're used to generating on their own post script and that's what they want to do well supporting ApS is easy I can handle that first complaint with our first concern you can go to Coco alright you don't take your carbon application Coco but if you did there is NS VPS image rep and that'll take care of you in cocoa but if you want to stay with carbon there is a call and it took two engineers to type P MCG image create with GPS data provider what that call does is you give it a data provider there's a way to give core graphics the EPS post grip portion of the EPS and you give it an image rep which is an image that represents the preview portion of your EPF in other words if we can't render the PostScript this is what we're going to draw it combines those two things up into one rapper gives you back this new composite in a dress that composite image raft is smart when you draw with that composite image rep the system courts will either use the PostScript that's wrapped up in there the EPF or it will use the preview image so if you go to screen say in Jaguar it's called available Jaguar it will use the preview to go to a rapture printer will you preview if you go to a postscript printer it will use the encapsulated postscript it's incredibly powerful you have to do is use this and all the sudden you have eps support and then you've lost that one reason you gave me the why you can't be on the PDF print at the apple works guys lost their one reason why they couldn't be on the path so they've now moved I remember what version it was a while ago but they were one of those applications to complain they needed for TPS so they were on the legacy bring past they used this call they got off another a PDF printing application oh wait there are some other people who use this call again this is a microsoft application i use them because again they're a great example of a large carbon applications quick draw base they had to support eps they use that call so that they can render that will show the preview image here on screen and when they print this to a poster printer you'll get the eps output so the slightly harder cases the applications will generate all their own PostScript well they have two choices they can use that laser iterate legacy printing path and what they have to do when they do it is take their PostScript put it in postscript picture comments so that the printer driver the postscript printer driver we have will intermix it generated PostScript as it's also converting quick draw into postscript with the applications generated PostScript and that's a very complicated convoluted lots other words I could think of process and the only way it works is because it worked once you fool with your application till it works then you stop and you're done and you can now intermix your applications postscript with the drivers PostScript anybody has done this things like space hack and PS begin dos save and flushing the quick-draw state are not a mystery to you and I apologize that you had to learn all of those things it would be better if you can generate the entire PostScript job that's what you want to do anyway you'd rather get the driver out of your way but up until Panther there's been no way to print that you generate your old post good job how do you get to it well we have these new job submission api's in camp there and they allow you to handle whole file to the print systems they get this to the printer for me please we can't get any file to the printer so there actually has to be a quarry you have to make first p.m. printer get mimetypes you passing the printer you want to print to you pass from the print settings that came out of the user's interaction with the print dialog and you get back a set of strings that are mime types for those settings on this printer here are all the mime types you can give us the file types you can give us so you scan that and if you find the mime type you like postscript in the case we're talking about then called p.m. printer print with file on you hand the print file in we'll take it throw it over into the print server and you're done so what kind of mime types can we take the sides postscript Vogel tools poster points versus actually post to post script mime types that are of interest application postscript this is what we call nan finished PostScript if you have fasted something with mime type application PostScript we will take the feature so the print settings of the user ask for we will generate PostScript features and will interject them into your PostScript be a DSC comments at the beginning the document so this is the way if you don't want to deal with feature code but you want to generate all your own PostScript rendering you can use that line type if you really don't want us involved use applications n cups PostScript that's called raw PostScript or finished PostScript you give that to us and it just goes right to the postscript printer we're done you can also have some PDF if you have a PDF condition to document give it to us and we'll get it to the printer image types gifts JPEG TIFF lots of different text types playing RTF even HTML I think staff kit and cups raw cups raw is really for the printer vendors but what cups Ross says is don't process file at all just send it to the printer it's usually going to be printer specific escape codes that you want to send down to have the printer to do something specific and there are lots more if you actually make that call you'll get a list about 20 plus line types so who would use this will preview is actually one of the clients on Panther for this as i mentioned preview in Panther is enhanced right now when you click preview the PDF documents pools it opens up in preview there it is previous got the PDF file you just generated on Jaguar when you tell preview to print what does it do well it dutifully uses courts have sports to render that PDF document into a conducts which will create PDF so you end up going PDF to courts calls to PDF and that's why when you print from a print preview in preview on Jaguar your hundred page document you get to watch it spool as it goes through that conversion for each page in Panther doesn't do that anymore it's got this file so just ask this hey can I get PDF to this printer we always say yes for PDF and goes okay here's the file and the user sees no spoiling it's instantaneous and it's great they're also going to do it for PDF files they don't do that in the feed right now flexpa Panther you'll be able to do open up a PDF file in preview when you say print the file gets copied over the print server and that's all so the big advantages full timing from printing and it users are very happy that's a dramatic portion of printing times or your schooling times alright so Mac os10 has this PDF page graphic system we really want you to use PDF printout so you can take advantage of it if you can't we have the job submission api's they're very cool we hope they're going to let you get off of that legacy printing fast and if they don't tell us why they don't we'll add more API we'll do what we can to get you off of that legacy print that once you're off especially once you're on the PDF print path you can grow as the OS growth applications that use PDF printing passes pamphlet comes out where at least Jaguar got PDF workflow with pants with Panthers they get courts filters court scripting and more stuff in the future as we enhance courts and we enhance the PDF part of the system you get that for free so hopefully that's a good reason to be over there all right so we're pdf.pdf days system we're very proud of our PDF support but there are some legacy formats and it's actually kind of nice to be up here and call post crippled legacy formats but that's why we view it and it would be great if we had some support for that legacy format in endless OS we're great if you could take a render dps and actually show the vector rendition of that rather than that crummy preview that comes with the eps it would be great if you could print a poster file onto a raster printer you know take that hundred-dollar raster printer plug it in why isn't it a postscript winter and it would be good if you were great if you could take a postscript file and convert it to PDF so you could use the rest of the Mac os10 to handle and process that PDF and you can't in Panther and this is incredibly exciting we have this Panther PostScript converter and it's a postscript level 23 interpreter and it converts whole script files to PDF it does not rasterize PostScript it is not a postscript brick it's a post group converter it does the best job at can converting your post script directly in the PDF and that's it but we do have something in the system that can rasterize PDF we have courts so you could imagine writing something that took a postscript file ran it through this post code converter that's now in cancer get the PDF file use that resulting PDF file feed it to courts courts generate the raster just like we saw earlier when we were generating those tips raster files from PDF so you could write this and who's actually core graphics API to call this a postscript to PDF converter but I really wanted to show you guys how you could write your own PostScript Britt and I really wanted to do in one slide but I couldn't find a guilt free font to use so I'm going to give you the to slide PostScript interpreter on the first slide doesn't do a whole lot this is a little tool called PS trip to take the postscript file and take the fifth base metric spaces the base name that we're going to create for you file so if you call it out we're going to create how I want is now talk to Jeff so the first thing you do is you take that PS file and you create this data provider and that's what courts pro graphics is going to suck on to get the PostScript out of the file create a PDF consumer that's where it's going to write the PDF that it's going to get as a result of converting we created it converter instance and we pass it the two things here's the PS provider to get the post crook here's the consumer to write the PDF call it it'll tell you to succeed or not it might fail right there might be a postscript there might not be a postscript file it can fail but if it succeeds we've got a PDF rendition of that postscript file and now all we have to do is get to bit and we have the exact same code we had earlier today to go to tip loop over the pages create a bitmap context for each one of those pages in the PDF draw it and then tell that context to write out its fits into test so there's your two slides dozen line in Python interpreted PostScript interpreter which I thought was pretty exciting but you might not want to ride your own post-trip interpreter every day although it is easy we have the converter integrated into the system as well we I mentioned earlier cocos eps image rep that can show for coco applications eps file will it now with the converter will show the vector rendition it'll actually convert that EPS file into PDF and I'll show that PDF rendition so now Coco applications can have this incredible view of your eps documents PostScript jobs can be printed to raster printers we have this great printer server in the system and in Panther it can take in jobs over IP p ltd or SMB there are lots of ways to get jobs into the system and now that we have a poster converter and then a PDF of rasterizer so essentially can put those two things together and get from quick or from PostScript all the way to raster for your master printer schools can set up a lab can put it in there hundred-dollar photo printer attached it to a client Mac os10 Panther system share it and print to it from units Windows Mac OS 9 system send PostScript jobs and will rip it and send the resulting bits to your Q raster printer so it's great for schools great for printer vendors right you you don't have to go license or rip any more you shouldn't have to issue or should be good enough and of course the jobs Commission aight guys if you have a raster printer with this in the system you ask the raster printer will say yes I take quote script you pass in postscript and we'll get it to the printer for you so Alan back one more time we're going to look at some of the places where this is integrated in the system coco eps support which i mentioned and then opening up some documents here we go first of all let's first take in eps document and we'll just drag it on to preview and it's going to quickly generate PDF let's go ahead and copy this PDF and let's bring up our favorite case you get bat and just go ahead and paste it in see it is a true PDF image you can grow it see rotated work is around like this then you can even where is it showing Specter there do the opacity and let's let's get it correct there we go so it is a true true PDF image inside keynote so an application that is absolutely nothing about eps can take the results of an eps composite it rotate it deal with it as if it were and it is a PDF representation that graphic that's pretty good but we also have postscript support this is a PS file let's just stop on the text edit see yes it is a true that Bank es adobe and we will just drop that on Dupree you again and then convert it point try it one more I think if we did so good we were doing so good that's right so I'll talk you through that so what woulda happened preview got wedge there a little bit of you drag that PostScript document or you double-click it it converts the whole thing in the PD app and preview can show you that PDF now PDF has some great new features in it you can search a PDF document you can actually then result it search a postscript document because it's converted into PDF and now the search capabilities when preview is available preview lets you select text and copy and paste out a preview so again you take your postscript file convert it into PDF bring it into preview and copy and paste text out of it like we're still wedged that just go on that's alright we'll go back to the slides and you all have your own Panther so you can try this at home and reboot when it gets stuck alright so that is the PDF sermon we also have some new AP is that are in the system this is by popular request there this new p MK / AP i-- we've had a PM page formatted instance for a while objects for a while that's the result the PM page format of page setup and that dialogue goes away the CM page format objects that captures the paper that was selected the targeted printer the scale and the orientation p.m. paper is part of that PM page format and it's going to capture just the physical characteristics of the paper that that was picked so it's just the physical paper size and it's just the margins there's some attributes that you can get again the idea to name the height the width and you can get in this is the important part to list of papers that are supported by a printer if you really want to know what a particular printer supports what the real physical paper sizes are p.m. printer get paper list what people really want to do they want to end up creates their own page format for whatever their crazy paper sizes so the steps are create yourself a PM paper to represent the physical dimensions and then from that you can create a page format so PM paper create lets you create your 12 inch by two mile paper size talk to you pulse is inside api's PPD api's again this is only for specific class of applications but we're installers in fact oh we now have ways for you to get the installed set of PPD's once you get the installed set of PPD's and you find one you like you can ask for one that's localized appropriately for the current user and most of our PPD's are compressed we zip them and you don't have to worry about that all you do is call p.m. copy PPD data will unzip it if we need to or we'll just give you the raw data that's available so these three api's will allow you to do things with PPD's just like we do cups update so that whole part of the talk was the part about the left hand side of this diagram it was the user space part of printing there's the whole right side which is what we changed last year it's the cups d serves the print server where your documents go and then start running in with all these different crazy user IDs the demon running as root these filters running is this LP user and then your backends ringing again is root that's where your jobs go when they've left your user application so what's going on with cups well for cups in Jaguar we shipped cups 1.1 15 and over the last year as we were doing Jaguar updates we've moved back important security fixes and important bug fixes from the cups main line which was going about 16 17 18 back onto our dock 15 days a lot of people didn't understand this and I'm complaining that we were stagnating our cupboard space it wasn't true we just had a stable base we liked about 15 base and we were putting important bug fixes on top of it and because our cup space is available in Darwin and because it's live every day there was no reason for people to get confused you can go there any given day and see what we checked in any given day we went to cups to be incredibly transparent to be incredibly open for our developers and we are and people should feel comfortable going there and seeing what we're doing you might have gotten some early hence without facts and there's some other interesting things you might see as we check things in and out Panther is moving away from that dot 15-day moving up to 1 dot 119 there you go there's some people who are not happy with just our bug fixes but that's okay so all the way up to 1 dot why 19 which is the latest cups right now if there's a1 dot one dot 20 and the right time frame I could see us possibly going to that we pick up the new PPD support the PPD parser and cups is much more strict good for the better or worse other stack support so we're building some of our facts support on top of the custom stacks sport this TV CP support so we can do some better binary printing over different channels and there's some denial of service security fixes we picked up almost all of the security fixes that were cups related during the Jaguar time frame except for this final batches denial service which we're going to pick up for Panther got this one provide fixes we've been live with our cups repository for over a year now and I'd had one person one developer send us a bug fix and it was a great bug fix he found a real bug in the demon provided to fix we took it we set it back to the main line it was great and it'd be great for more especially with our printer vendors we're looking in there and got used to go in there to find some answers because it's all there in fact they get a lot of questions ask me some nuances of the way the demon works and a general answer is well you know I don't know sorry but you know there's a source go look and actually had one developer tell me I'll yeah the typical open-source answer kind of blew it off but now there's source code you'll figure out how it works it's good so what are we doing with kept so we've got new UI to support some of the cuffs features cups is very powerful we only bring out certain features but we have sm d printing support we're bringing out UI for that most of our users who wanted and figured out how to do it with Jaguar that was great we have direct socket and I PP printing we have you I to create printers based on those we have printer pools this is one of my favorites it's definitely an H case but a printer pool allows you to take a set of print queues find them up into one virtual queue and his jobs come into that Q it round robins them to the first available printer I particularly like this because I was Sebold a year and a half ago maybe and a professional photographer came up to me and say hey you know I really like cuts like what you've done I've got these eight photo printers they're all identical and my job depends on printing as fast as i can to these printers and so here's his answers coming in Panther he'll be able to sprint to this virtual pool and we'll find the first available printer and yet I all eight of his printers going at the exact same time it's a very cool feature I meant PVC p will have you I to enable that we're adding a lot of new support for cups dates printer drivers as I mentioned earlier in the talk we have two printer driver architectures we have the cup space printer drivers and we have the older tioga base printer drivers we're working to get the tub space printer driver so they have the same if not more set of fee that are available in tioga and primarily we're doing that by adding some new support for some new PPD keywords here for them they allow a cub Speights printer driver to specify the color stink profile that should color should be converted to before it's handed to it what's really great about this particular implementation that you can provide CMYK profile you can say here's my printer driver and I really want colors in the CMYK space and if the application draws in CMYK we will get the CMYK colors all the way from the application to the printer without going through any RGB not whole without any of these funny conversions its CMYK all the way to CMYK if that's what the application started with we have a new link in the PPD's for print dialog extensions so a cub space printer driver can now have its own UI and the print dialog it can link to a printer utility so the user in the printer setup utility can click on a printer and say hey launch the utility and we'll know what utility you want and it can have an icon you're not a printer driver ki have an icon going forward we're going to be focused on cups dates printer drivers we're going to support the tioga days printer drivers but that's not our focus we're going to be putting all our effort into the cup stuff we're going to be making that more and more powerful so if you have a type of this printer driver we're not going to leave you behind we're not going to purposely break you but we want you on that thai Yoga for any path especially for some or the cup spring path especially for some of your new drivers if there's something there something you do with the tiger printer driver that you can't do with the cups printer drivers please let us know and we'll work to fix that there are a couple open-source printer projects that have been great for us over the last year Kim print and HP ijs or two of them open source projects generally because the vendors do a good job supporting their most current models are important for some of the legacy printers but because the cup space printer drivers they also allow the user access to some features that are only available for cups printer drivers most of the printer drivers available from the major vendors are the older type o dates printer drivers GIMP print is in Panther this was a big deal of a huge thing that go out to the GIMP print team Robert Kravitz you organizes that team and runs it it's an incredibly vibrant team to have a sourceforge home lots of bug reports go in there they address them incredibly quickly in fact if any bugs it's stuck it's because they usually assigned to me their team is great there's also been this incredible support for the Mac os10 version the Kemp print which means a great installer d installer documentation and that's all been done by Tyler blessing who's favored us all this week with being a VIP for us and coming to the conference you see him the hallway make sure you thank them by himself he's brought support for over 500 printers to Mac os10 that's one man so we had printing in 2002 changed the whole print system 2003 were just evolving what are we going to be looking forward in 2004 we're going to keep our focus on PDF we're going to bring more and more new features more and more optimizations to that PDF praying path if you want new features please get on that path please let us know what great features you'd like out of PDF file size is one we always hear but if you have other things please let us now cups 1.2 that's still out there on the horizon when it's available we're going to be moving to that except one point to offer some important accounting features some back-end bi-directional communications features it's going to be X credibly exciting there are well there's a source tree you go out there and see what's already been done and follow it and we're going to be focusing on cups based drivers so that's going to be 2004 when I come back for more information we actually have a lot of printing documentation give you a quick overview of it we have the overview of the printing system it's a little dated but most of what's in there is true we have separate documents for supporting printing for carbon and cocoa we have documentation for writing print dialog you I references for the carbon printing and for writing plugins descriptions of how we use postcard printer description files so if you wonder how we use PPD's there's a document that explains it how to create presets for iphoto how to use the workflow feature and how to write new workflow items there's the cup software programming manual if you want to know how cups of self works below us and then there's our developer site developer apple com flash printing and there's just a lot of documentation off of that so please go to these reference take to find a lot of interesting documentation then we have some good sample code as well sample codes will show you how to use sheets that's always a great touch how to mix ports with your carbon quick-draw application and a PD project how to write a print dialog extension so please go look at those Travis clinical come up and talk you through the roadmap actually what I do is since those are some pretty long URLs you only really have one day obsessions I'll skip to that and then I'll go back to the URLs or we can be in the Q&A so you have time to copy them down so pretty much left with is Friday sessions which a lot of them are going to be for example court services which relates to essentially managing displays on Mac OS 10 and that's Friday morning then we have one more OpenGL session this one hosted by a TI who is our hardware partner who's going to be showing us all the latest visual effects you can accomplish using their hardware and programmability we also have a session on macros and accessibility this would be an interesting session if you want to ensure that users with disability can successfully use your software the Nazi we have the feedback forum where you can feel free to come and give us feedback on the session and also you know questions issues you have a Mac os10 printing in general that we can often incorporate into our planning for the next major release of Mac OS 10 so let me thought I'd invite the printing team so we can get our Q&A going you
