The 36-year-old had failed to win a Grand Slam title since 2012 when he made a decision to end his season after Wimbledon in July, 2016, which raised a number of questions about his future in the game. "He obviously wasn't in his top form", Daniel said post-match "So I was able to take advantage of it".
Federer hit five aces and won 74 % of his first serve points in the match which took a total of one hour and 41 minutes over the two days.
Dimitrov, victor of the ATP World Tour Finals in 2017, lost the first set on a tie-break 7/4 but took the second 6-4 after breaking the 34-year-old on both of his first two service games.
After handing back an early break to allow Krajinovic to draw level at two-all, Federer moved into cruise control.
"For me it felt like first match I ever played on the tour". I am on a good run right now and I want to maintain that.
Frenchman Gael Monfils survived a match point before beating big-serving American John Isner 6-7 (5) 7-6 (3) 7-5 in a contest that had only one break. It's what tennis players do.
The 36-year-old will play Jeremy Chardy in the fourth round.More news: AfDB signs deal to scale up solar energy development
More news: Rajya Sabha MP Rajeev Chandrasekhar joins BJP
More news: Pakistan, Iran to strengthen ties: Maleeha
"I was grateful to be out on the court after surgery that quickly".
Federer and 10th seed Djokovic both came into the tournament seeking to become the first six-time victor of the event.
Japan's Kei Nishikori withdrew through illness before playing his opening match of the tournament.
There were no such problems for Kevin Anderson or Tomas Berdych, who were straight-sets winners over Evgeny Donskoy and Max Marterer respectively, while Dominic Thiem saw off Stefanos Tsitsipas 6-2 3-6 6-3.
109 kept his focus to hand a 7-6 (3) 4-6 6-1 loss to the Serb.