Both Berthold Types and Adobe Systems design and sell typefaces. Adobe includes all of its own faces, plus many licensed from other type foundries such as Agfa and Monotype, in the Adobe Type Library, which contains more than 2,750 typefaces in PostScript and OpenType formats. Individual faces (or collections of related faces) can be licensed and downloaded from Adobe’s Web site or purchased on cd-Rom. The Adobe Font Folio, a cd-rom that gives the purchaser access to all of the Library’s type, is available for about $9,000. Berthold Types has been among Adobe’s partners in this endeavor: a contract between Adobe and two German firms (H. Berthold AG and Berthold Types GmbH) gives Adobe a non-exclusive right to include many of Berthold’s typefaces in the Adobe Type Library, and to use Bert-hold’s trademarks in connection with the Library, from 1990 through 2015. Bert-hold Types Ltd., a U.S. corporation that we call Berthold, succeeded to the German firms’ interests in 1997 and the next year signed its own contract with Adobe as a continuation of the 1990 deal.
According to the complaint Adobe first included Berthold typefaces in the Library in 1991, and since 1993 “parties other than Adobe, including Berthold, have marketed the Adobe Type Library as including the Berthold typefaces” (emphasis added). Berthold receives royalties when customers purchase individual Berthold typefaces from the Library or buy the Adobe Font Folio disc; it also believes that the presence of Berthold typefaces in the Library amounts to an endorsement by Adobe (the creator of PostScript and co-designer of OpenType) that has “greatly contributed to Berthold’s reputation as a provider of high-quality typefaces and has materially *774 enhanced the prestige and goodwill associated with the Berthold typefaces and associated trademarks.” Berthold also alleged that some time in 1999 or early 2000 Adobe removed all Berthold typefaces from the Adobe Type Library. This step, Berthold contended, violated the contract, the Lanham Act, 15 U.S.C. § 1125(a) (on the theory that customers have come to expect the Library to contain Berthold faces, making it misleading for Adobe to offer the Library without Berthold type), and the consumer-deception statutes of several states (on the theory that Adobe has falsely told customers that they can get Berthold typefaces direct from Bert-hold at prices higher than Adobe used to charge).
Adobe moved to dismiss the complaint under Fed.R.Civ.P. 12(b)(6) for failure to state a claim on which relief may be granted. The district court agreed with Adobe’s position.
Adobe’s motion to dismiss Count I (breach of contract), Count II (false and misleading advertising), Count III (fraud, deceptive trade and business practices), and Count IV (unjust enrichment) of the plaintiffs first amended complaint is GRANTED, and the complaint is DISMISSED without prejudice. Berthold’s motion to file a second amended complaint is GRANTED as to Count IV only (the intentional interference with contract claim). Counts I — III in the second amended complaint are identical with those in the First Amended Complaint, and so have already been dealt with.
*775 After the district court received Bert-hold’s amended complaint, Adobe filed a motion to dismiss the new claim under Rule 12(b)(6). Before the district court could act on this motion, Berthold filed a document purporting to dismiss its entire complaint voluntarily under Fed.R.Civ.P. 41(a)(l)(i). Adobe objected to dismissal, pointing out that it had already prevailed on three of Berthold’s claims and filed a motion to dismiss the fourth; Berthold replied that Rule 41(a)(l)(i) permits a plaintiff to dismiss as of right “at any time before service by the adverse party of an answer or of a motion for summary judgment, whichever first occurs” and that Adobe had never filed either an answer to the complaint or a motion for summary judgment. The district judge took Bert-hold’s side and dismissed the complaint. Next Adobe sought attorneys’ fees on the claims that earlier had been dismissed involuntarily (¶ 7.10 of the 1998 contract entitles the “prevailing party” in “any suit, action or proceeding in connection with this Agreement” to recover reasonable attorneys’ fees). The district court denied this request summarily.
The district court’s handling of this litigation leaves much to be desired. The order denying Adobe’s request for attorneys’ fees does not explain the judge’s thinking, leaving everyone in the dark about the rationale — and that is just the last of several problems. The first problem, which set the stage for everything that ensued, is that Berthold’s initial complaint should not have been dismissed under Rule 12(b)(6). It pleads a claim for breach of contract and is not self-defeating. The district judge’s reasoning is based not on the complaint but on the text of the contract, which was not attached to the complaint. Cf. Fed.R.Civ.P. 10(c). Under Rule 12(b), when “matters outside the pleading are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and disposed of as provided in Rule 56, and all parties shall be given reasonable opportunity to present all material made pertinent to such a motion by Rule 56.” See
Wilkow v. Forbes, Inc.,
What is more, the district court’s description of its original dismissal as one “without prejudice” is at best misleading. The judge’s rationale for dismissing the state-law deception claim sounds like an invocation of Fed.R.Civ.P. 9(b), which implied that Berthold could plead anew with an express allegation that Adobe had known Berthold’s prices, but the rationale for dismissing the contract and Lanham Act claims did not allow repleading. Perhaps it made sense to describe the dismissal overall as “without prejudice” in the sense that the judge agreed to receive the amended complaint and planned to enter a final judgment with prejudice on the contract and Lanham Act claims at the end of the suit, but, if this was the plan, the court did not carry through, and here as in
Otis v. Chicago,
Seizing on the words “without prejudice”, Berthold insists that Adobe either cannot appeal at all (because it is not aggrieved by the'judgment) or has appealed too late (because it should have appealed as soon as the district court’s order was entered, arguing that the court erred in failing to dismiss the complaint with prejudice). Neither branch of the argument is persuasive. Adobe is out of pocket the amount it has paid its attorneys; this concrete loss means that it is aggrieved by the outcome and entitled to appeal in pursuit of legal fees without regard to the district judge’s decision to apply the label “without prejudice.” See
Citizens for a Better Environment v. The Steel Co.,
Adobe persuaded the distinct judge to knock out Berthold’s contract claim— and to do so in a way that logically precludes revival in this or any later suit. Berthold does not contend that the decision is substantively incorrect, nor does it contest the district court’s failure to employ summary judgment procedures. Adobe therefore is the “prevailing party,” see
Citizens for a Better Environment,
Berthold could not cancel Adobe’s entitlement by amending its complaint and then dismissing the amended complaint. If even the parties’ mutual assent cannot wipe a judicial decision from the books, see
U.S. Bancorp Mortgage Co. v. Bonner Mall Partnership,
One question remains: Whether Bert-hold was entitled to dismiss its new claim (the one alleging wrongful interference with contract) under Rule 41(a)(1)®. The district court allowed Berthold to do this because Adobe had neither answered the amended complaint nor filed a motion for summary judgment. Adobe argues on appeal that its motion to dismiss this claim, although captioned as a motion to dismiss under Rule 12(b)(6), really was a motion for summary judgment because counsel attached (and relied on) materials outside the complaint. For reasons already mentioned, this is not so. A motion to dismiss must be treated as a motion for summary judgment if the judge considers matters outside the complaint, but the judge may elect to treat a motion as what it purports to be and disregard the additional papers. Berthold filed its notice of dismissal under Rule 41(a)(1)® before the district judge could decide whether to consider Adobe’s additional submissions. So far as the wrongful-interference claim is concerned, *777 therefore, Adobe had filed neither an answer nor a motion for summary judgment.
Nonetheless, Rule 41(a)(l)(i) does not speak of dismissing one claim in a suit; it speaks of dismissing “an action” — which is to say, the whole case. This is exactly what Berthold tried to do. Thus the right question is not whether Adobe had filed an answer or motion for summary judgment directed to this claim, newly added by amendment. It is instead whether Adobe had filed an answer or motion for summary judgment in the “action” — and to this question the answer is yes, because Adobe’s motion to dismiss the initial claim had to be treated as a motion for summary judgment once the district judge considered matters outside the complaint, as she did. (Recall that the judge relied on the contract, which was not part of the complaint.) Berthold thus lost its privilege to dismiss the action by notice under Rule 41(a)(l)(i).
The order of the district court denying Adobe’s motion for attorneys’ fees is vacated, and the case is remanded with instructions to determine, and award, the legal expenses reasonably incurred in defending the aspects of this litigation that arose “in connection with” the 1998 contract. The contract entitled Adobe to recover costs and fees incurred in appeal, so the district court should include these expenses in the award. The district court also should proceed to resolve the wrongful-interference claim on the merits, unless that claim is dismissed under authority other than Rule 41(a)(l)(i).
