I have a PDF attachment. I want to add the contents of this attachment to another VF page that is rendered as PDF. Is there any way to parse the PDF contents in salesforce, which allows us to parse the content of the PDF and add them to another page?
I doubt there is such feature in salesforce. But many online services as aspose might help you here although most of them are cost money.
The answer to your question would be "it depends". As background, in the late 1990's I was in the Desktop Publishing business and was a volunteer sysop in the Adobe Forum on CompuServe. I also beta tested their software. So I have some intimate knowledge of the subject and what one can do with these files.
I say "it depends" because it would greatly depend on your knowledge of the postscript printer language. "PDF" is an acronym for "Portable Document File" (now correct thanks to nudge from sfdcfox). PDF's are derivatives of output files originally intended for processing by postscript printers. There are many 3rd party PDF editors, readers and software printer drivers (RIPs and emulators) available. There's even a WORD plug-in for creating PDF forms. What all that means is that if you're familiar with the language, you can do most anything you want.
If you want to "roll your own code", I suggest you visit the Adobe web site to review the postscript docs, API, etc. You'll probably also want to look at Adobe AIR for Salesforce as that might come in handy as well even though it's primarily used for adding Flash animations to VisualForce pages. I say that because I believe it provides access to other Adobe developer functions as well, but can't say that for certain as I've not spent any time playing with it.
Otherwise, if the first attachment is rendered from another VisualForce page, your best bet would be to create a custom controller that combines the functionality of the two different VisualForce pages and print them both at once. The latter would require far less development time than rolling your own PDF processor; something that's not a trivial task.