If I'm printing a Pagelayout, is there any API for hiding the MapFrame or stop it from getting draw on the printout? I would like to only print the Legend on the paper.
Create a Mask [white fill polygon with no outline] of the Map Extent, but keep the legend on top of the Mask you create.. Can be done programmatically with ArcEngine.
Another route would be to create a polygon at the top in the Data Frame (either a graphic or new feature class, note:graphics blocks annotation too) and use the map extent of all features and use that to temporally block out all features in the layout view. Legend would remain. Simply remove graphic/polygon after printing of the legend. again programmatically acheivable.
you need to turn off the autoupdates for the legend. once you build the legend from the frame and turn off the only display layer that are checked on. then you can simply move the data frame off the page layout. and resize the legend.
There's no rule that I'm aware of requiring the mapframe to always be located within the page. When I move the mapframe off the page (but leave the legend) all I see is the legend when I do File>Print Preview. This could be done programatically.
You can just easily use the Map Server's SOAP API if you want only the legend swatches. Otherwise you could export a page layout with the MapElement hidden.
Check out the ArcObjects documentation for MapServer, (MapServer -> IMapServerLayout -> exportLayout method)