I need an advice about a problem that haunts me lately. I develop a suite of applications and some of them are generating documents (invoices, report etc.). Not a single problem to preview or print them, but i want to be able to save the documents as PDF, preferably using a PDF virtual printer. I found some solutions, but in all of them, i have to insert the PDF file name manually and i need/want that to be done as an automated process (the names of the documents are generated by applications, using a predefined set of rules).

Any idea/suggestion/advice is welcome.