Robert Pattinson did not appear in the 2004 film Vanity Fair.
The principal cast of Mira Nair's adaptation:
Pattinson's breakout was Harry Potter and the Goblet of Fire (2005) and Twilight (2008). He may be confused with another period drama or a minor uncredited role, but he is not in this film.