BEIJING — #TrumpHasArrived! The Chinese news media broke out the hashtags this week as soon as Air Force One landed in Beijing, delivering both President Trump and an irresistible propaganda opportunity for President Xi Jinping of China.

Mr. Trump made it easy, flattering Mr. Xi at every turn and blaming the massive trade deficit between the United States and China on previous American leaders.

Government censors helped control the message, deleting posts about Mr. Trump’s comments on North Korea.