WWDC2004 Session 212

Transcript

Kind: captions Language: en okay good morning welcome to the 2004 edition of the in session my name is Paul downed old technology manager evangelist for printing as always we've got a lot of good stuff though let's get started we're going to begin by looking at how far we've come and where we're going in tiger with a printing system see how we're doing in making things easy for you making things easy for the customer will start ways kind of report card on where we stand with compatibility mainly with printers how many you can connect to the mac ease of youth functionality and not just functionality for the user all the bells and whistles in the print dialog for the AP is that you used to interact for the printing system compatibility on a start with a little bit of audience participation who use one of these printers okay so I know how many people are at least 30 years old or older if you don't know that's an image writer printer that's actually an image writer too image writer ship first just over 20 years ago and this is the image writer that I've got in my office I don't know how old it is but it works I went to line xorg downloaded the film attic driver and I can print to it from 10 so pretty good and anybody here who played a part in writing that driver thank you very much I don't use it a lot it's not very fast 144 DPI in best modes so not great but it works Panther shipped with little over 120 PPD's for postscript printers from the well-known vendors close on 300 old-style so-called polgar drivers from HP epson canon lexmark and we got the imprint package in Panther that supports over 250 printers so we're doing pretty well we're planning on building on that list the tiger so you can expect that out of box by call ship is even more drivers and we're working closely with the printer vendors to make sure that happens so we think we're doing pretty well they're on making sure that any user of Mac OS can complete it pretty much to any printer to recognize network etc on the ease of youth topics making things easy for the everyday users professional user thought we'd look at four things that most people do from one time or another discovering printers setting up cues sharing those printers and interacting with the printers through the print dialog and getting them getting access to all the printed features if you remember that old image really remember that users used to have to think about the driver before they venture print have typically drive and then the printer and then in Mac OS 10 when we when we came out with print center we decided that it was better for the user to think about the way the printer was connected to the mac so they picked the connection type USB rendezvous etc and then pick the printer and we had these browsers that were loaded by Prince Center printer setup utility that would provide support for those various connection types well the only problem with that is it took a little while to find those browsers load them call them and get the list of printers and just a little movie I caught on my powerbook back in my office you can see it would take about on a good day maybe about 10 or more seconds to load all those browsers so we weren't too thrilled with that now coming up neck is what we've done on tiger and we don't have a network of printers and the moscone so i'm going to show you another movie that i thought back to gain in my office as you can see if you watch this what we've done in Tiger is we've combined a predator combo browser for all the standard connection types and as you can see here you can sort by name you can sort by connection type you can filter you see there so it's a lot faster basically there's no latency between clicking the Add button and seeing a list of printers having done that you can join set up cues very easily there's a separate rows as an icon so you can go and set up your IP French of course you can't browse for those so easily and they're still access to the third party cuts and browses so we try to cover all the bases and overall we think there's a user experience is going to be a lot better or the folks you have to go out on the network for example to set up the printer queue that said of course you know that even the far back is tumor 10.1 we had also curation for some connection types so we're still expecting the user not even have to worry about printer setup utility for things like USB and rendezvous next thing that people do a lot is they share their printers or they share their printer queues and we introduce that when we integrated cups into the printing system back in 10 point to the UI thread though gave you just one choice share all your printers or none of them and that was okay if you just had one printer queue for failure to rekt make you a see printer it wasn't so good if you had a lot of printer queue set up on your mac especially for network printers so in Tiger you can you'll see this when you get when you install tiger we now have via a print and fax this impression the ability to list the printers you've got the direct connect printers you've got and selectively share them however if you spot a little bit of red text on that you'll see that we haven't quite hooks the UI up to the underlying functionality so a future Tiger seeds will have that working so i think users will appreciate that facility just to share you know the printer that you are happy to share and that expensive princess if you like to use all the time with the expensive inks and papers you can keep that yourself another thing that people do especially in the world where people work with net worth laser printers are typically posted printers when they when they discover the french on the cute on the network they have to configure it they basically have to tell the house computer about the printers capability now it doesn't usually apply if you've got an apple to a printer because we can query the printer and get back it configure but for an IP printer you have to do it manually and this little movie again shows the steps involved in that typing in the address of the printer setting up the cube and has been having done that you have to go to the installable options panel and tell the host computer that you've got that extra paper tray install though you've got the duplexer installed etc so we're expecting a little more for users and should be required just let that move you complete so this is what we're planning to do in tigra you won't see this when you install the the seeds that you have but we are planning and we've already got some coding place to support SNMP is part of the printing system and with SNMP queries embedded in a PPD file we should be able to for an IP printer you should be able to find out how its configured and do that for automatic setup that we do already for apples or printers so again that will make life a little easier for the user and we'll also be using SNMP to monitor printer status during the execution of a print shop so for your LCR printers you will see more about what's going on but wearing the mid during French oh ok one more thing in terms of ease of use is the functionality we provide all the bells and whistles in the print dialog and what we did in Panther as you probably all know we added a bunch more panels a lot of new features things like printing cover pages being able to schedule when you print doing reverse order printing and printing cards even sheets etc that was all well and good but it resulted in a lot of panels in the print dialog so we've decided to go to the cleanup and add and still add some functionality to the print dialog and to show you that we have our fearless demo guy here Allen back which is going to come up in live shows a tiger print dialog demo one screen I'm just going to go ahead and bring up one of my favorite test document King Tut to screams the print dialog and here you'll see that we have somewhat rearrange these buttons down here we've added a PDF button pop down command widget here that basically combines the two save as PDF and they say that's postscript so we have gotten rid of the output Paul said we got rid of the output options TDE so we can just go here and it was just bringing up save us PostScript we'll just bring up the save as dialog another thing we have done is we have a revamp the summary pde to make it more useful so you can see the information that you want and hydration you really don't care about like I really don't care about copies pages but I always really want to know what my layout is so one nice thing about this is it will remember what what PDE summaries you have opened on a per-user basis so next time I bring up the print dialog and show the summary it will still come up in this in this configuration so if we just go back to let's go back to the layout let's change it to end up with a double sin line border and go to the summary pain it shows that okay I'm now doing the double thin line border the other thing that we have done is we have added because the paper handling pde we've added selecting the gestation paper size basically allows us to scale to fit to a certain paper size that you know that certainly in the printer so if we do this we know it's us letter but we know that say we only have envelopes in the printer so what it will do is Gail to fit he says this is our envelope with the King tat scale to fit so we don't get the clipping we don't lose kind of a quick way of getting a printout if you don't have the correct paper size so that's basically all that has changed in the print dialog of thing everything else is basically the same right now not saying it won't change further by the time Tiger shift but this is what was currently planned so let's move on to print center here I have one printer here oh we actually do have a rendezvous printer so if I could just click the Add button and we actually is one round of your printer laserjet for 200 I will select it you'll see that it's gathering information from the printer once it finds it and it's using then we select that PPP automatically we just go ahead and add it if we wanted to and that's the change to printer setup utility now if you just go to the printer proxy one thing we have added is we have added another tab to show your completed jobs it will tell you the knit you know the name of the job how it finished whether it be you finish normally cancel or an error and it will tell you when it completed I think so tell i was doing this final preparation of this demo a little bit earlier this morning a another thing that we have heard from you is from you and other users is they want to a held job you want to resume resume on a certain page so we've added that if you go to the jobs menu you can go to resume on page and you can enter any page number that you want printer isn't really here so I'm just going to go ahead and stop the job the other thing you can do with that is you can we've actually added another two of our widget for it resume on page there hold and then redo it resume my page as well and that's it thanks Alan so just a quick summary things that we've done so far in Tiger we've provided that integrated printer browser as you saw we've got or will have through the fine control of which Quintus you share it's an invisible is going in scales of it in the print dialog improved functionality in the desktop printers and we're off to be working on more the point I want to make here is please test this stuff you know you've got the first you first build the tiger you'll be getting more of course and whether you're writing applications or writing printer drivers or printing utilities whatever I mean please start testing as soon as you can obviously the overall quality of triangles and a lot on your contributions and I'm sure it's really knows how to file bugs please feel welcome change gears a little bit now we're going to talk about api's and for anybody writing applications it's tough going to be relevant to you one thing that you might have noticed over the last few years we've had some API creep in the printing system because these two header files p.m. application p.m. core provides most of the low-level API for printing most of those api's they used internally by the various cocoa print method and as you can see we were up over 200 api's by obviously incrementally improving the printing system we added things like p.m. printer AP is the PM workflow api's etc over the last few releases we thought that we were a little too heavy on AP is so what we've done for Tiger free deprecated 80 of them so if you are using any of the old non session API only if the legacy laserwriter rate printing api's any of the AP is that we're trying to write things out to do with you know the old print record you will get when you try to compile your code on tiger you'll get very polite warning that you're using a deprecated API so that's your signal to go into the header file and if you can see from a comment up here will tell you for everything one of those 80 deprecated api's which one or ones you should be using instead deprecated doesn't mean your code will crash it just means that you'll get a warning at compile time and the strong encouragement from Apple to move on to the recommended API so please stop updating your application printing code as soon as you can and follow those guidelines hey and then I want to take a few minutes to talk about the API so that I hope most of you are using directly or indirectly indirectly if using cocoa to print and we're going to start by looking at a bunch of AP is that usually worth calling before you actually invoke the print dialog so after the print menu thing clicked these are some of the api's you should be using and will explain why one of the things we we recommend is that every time you hit the print menu you start a new print session and you should create new print settings and default them and the reason for that is that the user every time you go to print document starts off with the default sensible set of values for the various print settings and shown here is after you called default print settings obviously reset copies back to one the page range etc and better that than reusing the print settings object and have inherited your life settings from the last print job to the next one users can get confused or annoyed when that happens so try to use that call another one to call if you're printing multiple pay documents at the page range that explicitly tells our copies and pages print panel what the values page range is stop the user typing in you know print to page 99 if you've only got a 10 page document so pretty obvious why you should use that enable printer preset not for everybody but if your application prints images a good idea to enable the driver installed preset for the printer and presets if you are not familiar with that the ones that bundled with drivers are recommended combinations of things like paper types and resolution settings and users will be you know better off using the ones defined by the printer manufacturers and going into the various panels and setting ones that they think are appropriate this is a convenient way of picking ones that will yield good results on paper so you can do this by calling if you're a carbon at enable printer preset there's a API to disable in this you need to cocoa just ask and do this as a job style hint that you can apply to the NS print panel to do the same thing so if you're printing images an able to drive a preset setting the job name is another good thing to do and a sprint operation does this for you automatically so you don't have to worry about it if your cocoa app well of course you need to have a meaningful window title carbon app should call this API this is actually a new API in Tiger but there's an equivalent API for pan through and Jaguar it's p.m. Prince session that's job named EF string so there's an API to do that basically anything's better than seeing untitled in a list of printers the TC eyes are in the desktop printer list or on the cups web page or in all for example when you print to this you want to be primed with a reasonable file name and the other thing is with screenshots here shows if you're looking at print server it's useful to see what's being printed and so try to call that API another one that we've been talking about for years if you're a carbon after you need to be doing this well you should be doing this if you can display multiple windows you see display your friend dialogues as the sheet everybody knows then which window they are actually printing and this is the easy one I don't really have to say anything about this bring up the print dialog having done all that preparation work after the print dialog being dismissed as a few api's you might want to be calling if your application has a panel or panels for the print dialog you probably want to get the settings that the user selected in order to control the way you draw the content and when you get into the print loop so this is the API you can use for that and the sample code explaining that but we've added a new API in tiger this is the 1pm print settings get value this enables you is an application to get any print settings values so since abuses but you can see what the drivers pdes have added to the print settings you probably don't want to be forcing the way you draw your document according to that but you can get any setting out of the print settings object after the print dialog has been dismissed for ignore for example the printer utility might want to do that to get the media type selected so if it's printing a test page it knows whether it's printing a test page on plain paper or photo glossy for example there's a corresponding API p.m. print settings that value that you can also use in tiger so now to the print loop I'm sure everybody heard this week that quick draws being deprecated and think of the session tomorrow on moving to courts 2d so if you haven't already heard all the good stuff about courts duty please go to that session I think it's somebody have to remind me tomorrow afternoon two o'clock thank you so this is the old print loop drawing everything with quick draw and that'll still work but obviously we want you to move on maybe by now you've already started to take it of course 2d and for a while now we've had these api is enabling you to draw some content on your pages in a core graphics context and that begin and CD contacts API enables you to do that effectively to make quick draw and poor graphic and remember the coordinate spaces are different so that was something that hopefully you've been doing there's an even better way in Tiger to explicitly tell the printing system you're going to exclusively use core graphics calls to draw everything on the page and this API begins cg document tells the printing system you know you've moved to course 2d you can do the same thing on Panther or jocular but not with this API because it wasn't available then but you can still set up a core graphics context and draw up singing but we tigers it's just a more convenient way to do that with this new API and talking about that I have to plug a unified PDF imaging model this is applied lipstick from last year I'm not going to go into a lot of details I'm sure everybody knows by now that if you use the recommended PDF print are you get a lot of benefits Print Preview you get to take advantage of the PDF workflow and all the other things mentioned here if for whatever reason you are obliged to generate PostScript code and then our recommendation this is the same recommendation we had last year is to use a job submission API so don't don't use the printing system to generate a poster print job generates the poster printer of yourself and then use the job submission API so send that post good job directly to the print view I'm mentioning here on the bottom bullet item to new api's that may remove one of the excuses you had for using the legacy laserwriter a printer you can now use these api to generate your post script font data and put them into your post clip file that you will submit with the job commission API I should mention that not all applications choose to use the print dialog when you go to print some applications have their own UI some applications or tools though neither UI and they certainly don't want to see the spooling dialogue displayed so there's the so-called no dialogue variants of the print loop API and you can see them here at the old way of course now that you're moving to cause 2d there's a corresponding API to the begin cg document there's a CG document no dialogue which will tell the printing system I'm going through the print loop that I don't want to do the schooling dialogue but and this is no different from last year with Santa there's a better way of doing that kind of thing and that's the job submission API it's very simple to do I'll just I'll forensic Oh does it if you drop a file on your desktop printer we rechecked the printing system we off get does the printer queue accept a file of this mime type if if we get back a an answer that says this mime types supported we submit the job and so that shall show you how good that is I ran a few tests on just my humble old powerbook back in my office with a variety of documents and as you can see any document I print if the files already on death I can print it in a couple of seconds with the job submission API you should be thinking about using this if your application has ability to generate its own printer compatible file format PDF PostScript tiff yes etc so strongly encourage you to explore that and as you can see here you can get huge performance benefits if you take that route take that approach so this point I'm going to hand over 20 no I'm going to summarize these slides I'm going to hand over to Allen deprecated we've got very confused about a pap is watch for those when you compile your code use those recommended api's before you bring up the friend I so that everything works smoothly in the print dialog move away from quick-draw we've got API to help you do that and last but not least the job Commission apos great way of speeding up printing from your application and now something new Coco print panel here's Allen [Applause] Panther shirt last year we were sitting around saying okay what part of the grading system has been rewritten in the past two and a half three years and oh the print dialog code has been rewritten yet so basically what we've been working on is rewriting the print dialog code and paste that dialogue code to enable the inclusion of cocoa pdes so what I'm going to do is I'm going to do build a simple p de coco PDE that basically this is the old this is the old code that sits on your developer examples printing now basically if we go through here we kind of see what what we're doing a comment and then we get to here we have oh we have to define how big we are it's to define is that nut let's see what else we have oh we have a whole I unknown stuff I am I unknown instance and really that's kind of hard to figure out sometimes we have the contact stuff we have we have a prologue and we get into actually coding some of the stuff I unknown address not much having to do with printing when you're writing a tioga based PDE so we have done is we have allowed you to greatly simplify writing a PDE so I'm going to do is I'm just going to take that old a app SDK sample code and i am going to personally do is add into target and i am going to at a loadable glendale cook a little bundle I'm going to need it name it to sample app pde and add it to this project okay first thing I want to do is assistive properties and beans we are a cocoa class I'm going to name it to be an end of principal class and what else do i need to do go to build and we need to add our like this is my kind of cheat file right here at our framework search path our print framework and our add that into here okay those kids close this out ok now listen now this is the fun part I'm going to go to interface builder i'm gonna select an empty cocoa nib oh let's see what's next let's go ahead and save this as [Music] sample at PE i'm going to add it to the sample at pde target okay now i'm going to let's do this get the subclass right that's taken nsobject or is it in a subject go okay there it is and we're going to sub classes in to be a dental appt te and then go back here files owner and custom class I'm here snap pea okay now the fun part let's go up here at this grab the view they're just a NS view let's make it a little bit bigger add a checkbox current selected text only there we go okay now let's go back over here I guess I now we need to add as hit our connections in their custom close connections add some outlet what am I doing here we go huh no classes sometimes wrong oh okay here we go add two outlets the first one is going to be see sample app PE view which is the NFU add another one which be our button right selection button which is a and it's buttons ok now let's let's go ahead and connect these up that's the app now fit button ok so everything's connected up everything basically the nibs done let's go ahead and select this and some plot PD generate the classes that's great to create the file for it that's right in the basic print move ok let's go ahead and create those ok so it should be created and they now should be should have appeared over here in our project builder so now or did they go hey and I'll upper right hmm I don't know where they actually went that is it anyway isn't going so hot if you print loop so they are basically this is it here's here's our here's our God eh file it's basically what we want to do is absolutely it'll teach you to over here first thing I want to do is you want an import one thing we have provided you is a callback object that the PDE can call back into to get information that he needs about the printing system XA your print session your print settings your page format your current printer there are a number of things that you can get back from from the printing system while you're in your pde so you don't have to remember it you just call it whenever you need information the other thing we want to do is a the cocoa pdes are implemented as a protocol so basically what we want to do is make our pde or this object conforms the pde plugin protocol and one last thing we want to save our callback and now let's just go over to the dot m file and i will just basically i'm just going to copy stuff over that we need as we go through so we're going to include our basically we're include a our interface for dialogue extensions get some of the keys we need out of there okay first thing we're going to do is we have three static methods one of them is initialized class and terminate class these are called when when you're just bundles can be loaded for the first time you can return yes or no from the initial a class if you fail on your initialize we pass you the bundle just for your reference so you can get it any other ways and this one caterham a class of its called once on the plugins I'm not going to use anymore we don't do anything next part is to get pdes for plug-in type what this does is basically this is where you stand what did I miss I miss fish basically we do a git plugin for pd type we pass you the pd type or Derby app so the print dialog or page setup we also pass you in the current printer that is selected in the print dialog basically we allocated an array we do in an Alec and knit on our sample app pde add it to the array and base if we got anything back we return that array or return nil next thing we do is we initialize our class and here this is where we path you to call back mechanism to call back object you we pass it in you just retain it and you can use it throughout your other things and the terminate is the same thing we just remember you're done we're terminated pde we're just going to basically release your reference to that one thing knew about the coca pdes of we only ask for your view when we're going to show your view so there is no need to create your view you know during initialize or open we will tell you when we will ask you for the view when when we're ready for it so basically here we are just uh we haven't analyzed it yet we just do a reloader nib and then return the top view next thing is pd name and pd type and pd kind these are fairly similar to what you what we had before and the taiga stuff but here is like we call you when we need it there is no you have to know it up front and we just call it call it whenever you needed and the another change we did was think think kid remember where you're going where you're reading from the ticket writing to the ticket where am I at so we actually separated off these two calls and now we have right values to ticket and reach values to go do right values first basically here we just go to right values ticket we get our button should we say get state create an NS data for that and we here we are using your callback message to get the print settings so we use a call back as callback object get the print settings we get it back and we're using the API that Paul just showed us the peanut reading CM print settings set value which basically sets are the app using your app key and then read Diaries from ticket is basically just the opposite of that basically we get the print settings we get the value out using p.m. print settings get value and then we may finally we set the state based on of the button based on what's in the print ticket another thing we have change is fairly similar but it's a little bit different is the get summary information now we're returning in the array of dicks array of dictionaries for each item you want to show in your summary in your summary area so basically here we do we get the settings we get the value get the value and then I did that you can too yeah basically print selection only yes no we get create the dick with a summary and info this only have one item so we're adding an array and we're adding the item to predict and returning that debt array show hi is basically where those before we call this to Greg before we're going to show that you're pde and hide go hide right after we hide the PD or right before we hide the PD another thing we're doing that's those two and finally we have get supported PPD option keys which is basically for the PM printer module vendors this is in a way of dynamically telling us what PPD options you are supporting in your PDE so they won't show up in the the other settings of the advanced settings of pd pain rather than a static in your daddy and your info dick and soapy list we can return the array right here and the other one here the last one is TPD value change something of working on that's not quite implemented yet dealing with a PPD value constraint the constraint resolution so basically we're not really quite ready to talk about this yet because we're still in the process of figuring out exactly what how we're going to deal with this so it's go ahead and save this hopefully I can build this I wasn't expecting that I'm just compiling oh well okay so basically I will go to the Summer Slide well that reboot and I will show you when that reboots hopefully it's a slides back on a little summary of what we need for Coca pdes bases are in implemented loadable bundles so we don't have any of the CF bundle stuff with the ion own I all that other stuff the other thing is your class must conform to the PDE dialogue protocol plugin protocol we've added the pd callback object which allows you to get information from the printing system such as your print session your print settings or page format your current printer also in there at the end it lets you tell us to do certain things oh the two current methods are to resize the panel it would tell us what's how how high you want it to reset you know what size you want your new the new panel to be so you can do a disclosure widget and that way we will you can resize your view then move resize the print dialog to reflect that view they want to say is you can use a full Coco functionality inside your pde such as the binding you can bind to a dictionary and then in your right right settings a ticket you can basically use the bindings that way and the other thing is this sample code that I just did Plus showing the resize is going to be available on the ADCC searchfeed server are we back up yet no we are ok I'll be back up a little bit using for Richard and maybe I'll have time maybe we back up by then so I can show it to him here's Richard Thank You Alan not just for the demo which kernel panic that's pretty rare actual imprinting but actually for all that work if anybody's written plugins before for the print dialog one the first things you have to fight your way through is the CF plug-in I unknown stuff which I've done a couple times and it was well worth all that for Alan did on this just so I didn't have to do that again so thank you very much and it probably helps you too well we'll see last year we spent an hour I spent an hour with you talking about the two different printing past we have in printing we have our PDF printing path or preferred printing path and we have our laser ID rate legacy printing path and we spent that our really talking about all the benefits with a PDF printing path and doing a lot of begging asking you please don't use the legacy printing Pat and I'm here to beg a little bit more no offense but in the last year would come up with another reason why we really want you to use PDF the PDF printing path and that's automator and it's Automator tied in the PDF workflow so we're going to do a couple demos and we're going to revise to wow I think we're going to do a couple demos and we're going to remind you what was in PDF workflow so a PDF workflow is the feature we added in 10 24 it's been around for a long time but it's always been hidden you had to enable a special folder and put these PDF workflow items in that folder before the print dialog change to show you this new functionality the important parts about PDF work floor well PDF workflow or 21 it allowed you to hook the print system on the user side normally when you print we take the PDF full file we submit it via an IP connection to the print server and then the print job takes place potentially on a different machine but most certainly in a different context and running as a different user and so if you want to put make a back end or a filter that's going to present you I you have a lot of difficulties you may be on a completely different machine then the user submitted a job bad or you just maybe in a different context and not be running as the same user so you can't write to that users folders or access their files so PDF workflow avoids those problems by letting you do that all up front in the users context running as the users ID so that was one about PDF workflow the other what's important part about PDF workflow is that we have this digital master concept we asked all our applications when they print to please render in the full fidelity give us your PI resolution bitmaps give us as many vectors as you can don't give us rasterized images of your vectors give us the best fidelity you can give us the highest fidelity and that's what we call digital master digital master PDF we dutifully capture all of your drawing with workflow you can then write a tool to manipulate the full fidelity digital master from the application so that's the idea behind digital or behind PDF workflow it's been there for a while we have a documented you look at if you never looked at it's pretty exciting it's enabled always now in Tiger and this is a big deal it's always been a great feature but you had to know the secrets so now it's always there and as Alan showed previously it comes to faulting this way on your CDs with save as PDF and save as postscript but as you add your own workflow items this pop-up menu will grow and if you're somebody like me who's written a few of these it can grow quite a bit and you just start making things that are useful you'll see applications drawn in there so i can send my PDF documents over into things like illustrator which is great at handling pdfs obviously sending it to acrobat or spending the tools it'll break down PDF rasterize the pdfs anything you can really imagine you can do with workflow so what kind of things can you put in workflow and again this is the type of list that we supported sense really 10 to four you can put a folder into the work with the PDS services folder into the workflow folder if you put a folder in there that creates a hierarchical menu in your PDF workflow pop-up so this allows you organize your workflow items you put a folder alias in there a full radius when selected from that printer popup menu will take the PDF full file and just move it into the resolved alias of this folder so i use this a lot for web receipts this is an example i just happen to like I make an alias of a web receipts folder I make in my documents folder I put it in PDF services and now whenever buy anything online I go to my workflow menu and I say web receipts and it just makes a copy of my receipt stores it there and now with spotlight it's easy to search the whole thing works pretty well together also hot folders for applications like the still are good this way you can make aliases of applications put him in there when that's selected we sent an open event to the application with the PDF spool file so you can use mail or photo shops when I use a lot you can use Apple scripts and you can write your own tools and the tools can be written in either C or objective c or pearl or Python or anything you want but what's new now in Tiger is automator so we allow you to create an automator pipeline an automator set of actions an automated script the terminologies there put that in your PBS service folder now users can make their own workflow and it's this is incredibly powerful and it's very exciting I've been doing a lot of work on this for example one of the ones you see a lot with PDF workflow is hey I want to take this PDF out of whatever applications printing grab the PDF and mail it to somebody and there are a lot of different ways to do this you can take an alias the mail and drop it in there and then once you get when you select that is a new document comes up in mail a new mail message but it's not doesn't have a person you're starting to doesn't have a destination so here's an example of an automator script where you can set it up and say hey whenever this gets elected I always wanted to send it to this particular person here's the text i want and add the PDF and assuming that we're back up we're going to go to demo one here and i'm just going to show you that quick Automator workflow example because it is nice how easy it is to do so if we go over into Automator i'm sorry back to the preview act back to my previous in this app so this is a cocoa pde it is the print selected text only it does work and here's showing the callback mechanism that allows the pde to to resize resize itself and to progressive disclosure so it does work okay now back to Automator so basically what we're going to do is we are going to put a meal that gets a new email widget or whatever we are calling it now so i'm going to send it to rich oh let's say stuff please let's review okay now i'm going to go ahead and save this i'm going to put it in my PDF services and i'm going to say email and we're going to save it as an application so let's go ahead and save that now okay now is now in our PDF services so let's go over here on my documents and let's go to the Bears a little little league schedule add up rich one to know about so we're going to go to hear we're going to go ahead and try to print it and let me hold there's your email and here is what you're rich and here is our PDF document that is attached to it very simple we'll come back on over to the slides please and again the ideas that's very easy for users do right they just made their own workflow item but because we're so PDF centric we really want to provide a set of auto major actions that will manipulate PDF we want users and you developers to be able to make powerful PDF manipulation automator tools pro item of your workflow so that that workflow item or that workflow menu becomes very powerful so what we're doing at what we've done actually is we've written PDF X items to extract pages from PDF to join them to watermark them and we'll be doing a bunch more I expect we'll have probably a dozen or two of these actions by default in the system and tiger by the time we ship I want to show next we'll go back to the demo machine will see how these work together right inside of another automator actually let's go ahead and see if we can find our PDF items okay here they are we have three of them so let's just go ahead and personally to let's get or odd and even pages let's go and put them in separate files and then we're going to try to watermark them so basically we're going to add what should we add let's add a blue and a green apple basically so the goal here is to put a blue apple on the odd pages and a green apple on the even pages so let's go ahead and make the apple a little bit bigger let's make it show it's underneath and let's just turn it just a bit and let's turn down the opacity of it there we go so now then we offer basically then we've watermark them now we want to join them back together into one one document and we want to shuffle them so we get the odd-even interlace and one last thing we want to do is we want to then we'll just go ahead and open it let's go to finder and see you have open files and let's just couldn't open it okay here we go then we're going to go ahead and save it again we want to go to the PDF services let's name this one say watermark and we want to save it as an application say okay now let's go up and let's look at the all the schedules so has 39 pages in it go ahead and print this go to hear here's our watermark and watching the pipeline ok here's the first page with the blue apple green apple blue apple green apple all the way through to the end thank you all so what I like about that demo is it's a non trivial example of what you can do with automator and workflow and if somebody asks you to do that and I want you to watermark this document and have different watermarks on the aden even pages i know how you can maybe do it manually but if they wanted you to run to a set of documents I would I wouldn't know where to start i guess i would i'd probably go to python scripting and start writing some Python code but maybe a user wouldn't so you can go back to the slides alright so that's the power of Automator that's power PDF workflow put together so the question is well how can your application take advantage of this integration and it is simple it's what we've always told you please use the PDF work flow path or the PDF printing path you can do that by drawing with quartz that's the way we preferred you to do it you can do it drawing with quick draw even though that's deprecated if you go through the normal quick-draw printing path you'll generate a PDF school file what will not work is if you use the laser rider eight legacy printing path that path is not being expanded its not being supported anymore it still exists and I have a tough time with people here we actually have a little times like I can do this analogy last year when I said hey we're deprecating this I had five six seven application riders coming up to me and very worried that means you're taking out the laser writer eight legged see printing path for Panther and say no we're not we're not taking out just deprecated they said well then we'll be taken out for the next version said no we're not taking out there either and you quickly lose any fear that you can put in anybody when you say it's difficult it's not going away so the idea is we have to balance few things one we really don't want you to use this feature but we have to maintain binary compatibility and so I used this historical analogy of baseball in the 1920s well decided they didn't want spitballs around anymore so they deprecated them but they had this binary compatibility problem that they had pitchers who were still working and still in the field using spitballs so what they decided to do is let those pictures keep working they supported them but new pictures could not use the spitball could not use deprecated spitball so the point is if you have a spitball application using the laser a great legacy path we definitely will keep you running we will but if you're working on a new application please don't use it or if you're even revving your application please sit down seriously and consider ways that you can get off of laserwriter a legacy praying path and we'll help you we've done new API like the exhibition dial or they print submissions api's will help you in any way we can we did the font creation ap is for you so let us know what you need and we'll get you off that and you can stop throwing those spitballs just quickly going back to the PDF workflow there are a couple api's that are interesting if you really like the workflow and you want to maybe write an application that will master workflow in a different way than the print dialog does so if you want to do what our print dialogue does here are the two AP is PM workflow copy items will go look in the directory is where the user can install the workflow item and we'll come back with a list it's essentially it's an array of CF URLs that is all the workflow items this user has set up and if you need to run one use called p.m. workflow submit PDF with options give the workflow item you want to run the title of the document a bunch of options and the PDF file you want to process and this is all our print dialog dozen so if you wanted to write something that was not distiller but somewhat akin distilling that you had a batch processing application that you're running works those workflows through these two calls will let you do it