Why is it taking so long to create a pdf