Depends of the scenario. Only Schrödingers Wizard(or some cheated Sorcerer) beats Schrödingers Dragon.
That being said, I'd think in an open battle a Zen Archer might be great here. You can outdamage dat dragon by spamming arrows and have high saves to fend off most spells.
Kitsune Fey Sorcerer Cha 34(20+6 Headband+5Tome+3 levels) can reach a DC of 52(19+12Cha+2Bloodline+2Greater Spell Focus+5 Favored Class) on his Dominate Monster. If the dragon doesn't do research you in advance and casts Protection from alignment you could make him your pet.
Ready another Doninate Monster spell via contingency to pierce it's SR.
Dragon probably doesn't needs spells for a Zen Archer, unless it's something silly like Fickle Winds. He just needs to grapple to stop their archery.
Also, doesn't that DC calculate to 40? 19+12+2+2+5?