For best results measure the piston heights as per the workshop manual, otherwise fit the same thickness gasket that came off.
Skimming: TD5 heads can normally have a light skim, up to around 12thou or 0.3mm. If the head has been skimmed previously or requires more material removed than this then your head is most likely too far gone and you should seek professional advice.
Always use NEW head bolts and STEEL locating dowels when fitting the head.