merge pdf functionality

we are using a custom Java action to merge multiple pdfs so in that we are getting all the Pdf  after every process a pdfs are repeated  into merge multiple times we do not want the previous recorders after the process how to handle such process 
1 answers

I might be misunderstanding you but if I understand correctly you do mutliple merges. So I first have filedocument A and I merge that with B. Do you each time create as the result a new document? So A+B becomes C + D become E? And eventually you only want the end result and not have all those other documents in your database? Why not then just delete that filedocuments? So when E is created C is no longer needed and could be deleted. Or am I missing the point in what you are trying to do here?