Can a PDF contain a virus? If yes, then how?
Could a PDF file contain any type of malware?
vulnerability. One example is given by Didier Stevens. Basically, he embeds an executable and has it launch when opening the file. I am not sure how today's versions of readers handle this but it is considered a good method of using PDF features in malicious ways.
How can a PDF file contain a virus?
PDFs can have viruses that come embedded with a code that makes documents signable and (somewhat) editable. The mechanics are very similar to virus-infected Microsoft Word files. While their malware hides inside macros scripts, an infected PDF file will contain malicious JavaScript code.