Footage of the incident from Czech channel TV Prima shows Vaclav Klaus recoiling slightly but carrying on with the visit apparently unhurt.
Vaclav Klaus was taken to hospital but suffered only minor bruising.
His security detail has come in for harsh criticism for allowing the man to get so close to Vaclav Klaus.
It is also unclear why Vaclav Klaus’ bodyguards failed to react when a gun was pulled on him.
Vaclav Klaus himself rebuked them for failing to handle the situation well, according to the Nova TV station.
He later said the incident happened so quickly he did not have time to be afraid, our correspondent adds.
The attacker, who was dressed in camouflage clothing, pushed his way through a crowd in the town of Chrastava before firing the weapon at Vaclav Klaus.
The weapon was of the sort that is used in “airsoft” gaming.
The man was briefly interviewed by Czech media and said he was a 26-year-old communist sympathizer.
He said he had carried out the attack because the government was deaf to the concerns of ordinary people.
The man was arrested by police shortly afterwards.
Vaclav Klaus has been in the largely ceremonial post of president since 2003 and previously served as prime minister in the 1990s.
He is known for pushing through reforms to the Czech Republic’s economy after the fall of Communism and is a staunch opponent of EU integration.
0nHOjeD2DRIImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…