views:

427

answers:

2

All of our correspondence is done via database mail in sql server. The data for document generation and the rules to trigger the generation are all on sql server. We now have to create a pdf file. I was planning on using pdfsharp/migradoc to do it, but then we'd have to create document and time its readiness with sql server data state and mail state. It'd be nice if the db could handle everything.

Has anyone created pdf files directly in sql server? And if so, how.

+1  A: 

I've not used it, but there is SQL2PDF stored proc. It uses sp_OA% code.

Google search

Blog article and duplicated on SQL Server Central (needs login)

SQL isn't the best place to do this of course, but if you have to I'd use CLR if possible.

gbn