Cannot print .pdf files on HP laserjet

When trying to print .pdf files on a HP Laserjet P1005, I get a few smudges on the page. However if I open a terminal and type (for example) lp mydoc.pdf - it prints successfully. I am confused and would like to know what to try next. I am running latest versions of Ubuntu and HPLIP, etc.