Originally Posted by
jiejie
If your total time in China from scheduled arrival at PEK to scheduled departure from CAN is not more than 24 hours, you won't need a visa and can use Transit Without Visa. However, both of these airports are sometimes restricting TWOV passengers to the airport, if their layovers aren't deemed sufficiently long. So as to whether you will be allowed to leave the airport and head into the city, depends on the timing of your connection and possibly the disposition of the Immigration officer at the TWOV queue.
Pek-can is a domestic flight. In order to check in for domestic flights, it is usually necessary to go to the departures lobby, which is easy to leave.