adding pdf reduce script