Please understand that there is difference in "Gross" salary and "CTC". The gross salary is the salary that you earn and pf is deducted on the basic component of the earned salary. The law prohibits deduction on employer contribution from your salary.
e.g. suppose you have earned 4000 as basic, then Rs 480 will be deducted from your salary. The employer has to pay Rs. 480.
The employer cannot deduct Rs960 from your salary.
The CTC is COST TO COPMANY and includes all the cost incurred by the company by hiring you. It will include your Gross salary,
PF payable by employer, ESIC (employer component), Bonus, Gratuity, Transport facility, etc. It will be clear that company can include any components that they incur as cost in calculating your CTC.
Hence if the PF payable by employer is shown in CTC it will not violet any law.