There are two options to prevent components from reflecting on the PDF payslip:
Option 1: Edit the component and enable the "do not show on payslip:" check box under "extra options" on the Payroll Components screen.
Option 2: Edit the component and enable the "show on mock payslip only" check box on the General Ledger Parameters screen.
Navigate > Payroll > Payroll Config > General Ledger Parameters