I am from Pakistan and have a Croatian temporary residence permit. I want to travel from Zagreb to Beijing via Lufthansa with a connection in Germany.
Do I need a transit visa in this case?
As you're flying with Lufthansa, you will be transiting either at Frankfurt or Munich.
As stated by Timatic, the database used by airlines:
Visa required, except for Nationals of Pakistan holding onward tickets in transit through Cologne/Bonn (CGN), Frankfurt (FRA), Munich (MUC), Hamburg (HAM), Dusseldorf (DUS) or Berlin Tegel (TXL) AND holding a Residence Permit issued by Croatia.
- A maximum transit time of 24 hours through Frankfurt (FRA) or Munich (MUC).
So, you do not need a visa.