SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Rendering PDFs Natively in SQL


Rendering PDFs Natively in SQL

Author
Message
David Rueter
David Rueter
SSC Veteran
SSC Veteran (272 reputation)SSC Veteran (272 reputation)SSC Veteran (272 reputation)SSC Veteran (272 reputation)SSC Veteran (272 reputation)SSC Veteran (272 reputation)SSC Veteran (272 reputation)SSC Veteran (272 reputation)

Group: General Forum Members
Points: 272 Visits: 574
Comments posted to this topic are about the item Rendering PDFs Natively in SQL
FileFoundException
FileFoundException
Old Hand
Old Hand (310 reputation)Old Hand (310 reputation)Old Hand (310 reputation)Old Hand (310 reputation)Old Hand (310 reputation)Old Hand (310 reputation)Old Hand (310 reputation)Old Hand (310 reputation)

Group: General Forum Members
Points: 310 Visits: 180
Title is misleading, I think. PDF is generated using .NET CLR not SQL.
Phil Parkin
Phil Parkin
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18985 Visits: 20461
FileFoundException (5/7/2013)
Title is misleading, I think. PDF is generated using .NET CLR not SQL.


It was the use of the word 'rendering' that puzzled me - I think that 'generating' is better, as you suggest.

Nonetheless, I'm sure that this will be a useful technique for many people.


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
mark.harby
mark.harby
SSC Rookie
SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)SSC Rookie (28 reputation)

Group: General Forum Members
Points: 28 Visits: 27
Nice article David and very timely.
We are looking to produce something very similar and this will be a great help.

Mark Harby
Nottingham. UK
Kristian Ask
Kristian Ask
SSC Journeyman
SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)SSC Journeyman (91 reputation)

Group: General Forum Members
Points: 91 Visits: 251
FileFoundException (5/7/2013)
Title is misleading, I think. PDF is generated using .NET CLR not SQL.


Agree... and since it is I'd probably never put it on the SQL Server. Cool that you can incorporate stuff like this but I'd put it on an application server instead.
taylor_benjamin
taylor_benjamin
SSC Rookie
SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)

Group: General Forum Members
Points: 46 Visits: 51
Ok, you already alluded to the fact that others would disagree with you.

I hope your company does not have too much success. If they do, it is possible your SQL Server will not be able to handle the load, and you will have only one option...scale up; buy a larger SQL Server.

For this reason, this kind of work is most commonly performed outside the database.

Your concern regarding coupon tampering is extremely valid, and the transaction capability is also included. That being said, there is literally nothing keeping you from generating this as a Web Service, or WCF application, allowing the protection you require, transactional capabilities, and scalability. It would be completely inside the firewall.

If cost is an issue, you could initially run the service on your SQL Server; just not in the SQL Server process. Then, when your company has an explosion or grows beyond your capacity, you host the PDF generation in a web farm inside your firewall, calling it from your web servers just as you do the database today.

Frankly, it is very cool what you can do with the CLR inside SQL. This is a great demonstration of how flexible it is. But, just like using Indexed views to solve a bad schema, this is also not a great choice.

Write more...you communicate very well.

Cheers,

Ben
danielk1
danielk1
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 185
FileFoundException (5/7/2013)
Title is misleading, I think. PDF is generated using .NET CLR not SQL.


I would agree. I create PDFs via SSRS but was hoping something other than another tool. A native solution is what I was hoping to read about.
PHYData DBA
PHYData DBA
SSC Eights!
SSC Eights! (935 reputation)SSC Eights! (935 reputation)SSC Eights! (935 reputation)SSC Eights! (935 reputation)SSC Eights! (935 reputation)SSC Eights! (935 reputation)SSC Eights! (935 reputation)SSC Eights! (935 reputation)

Group: General Forum Members
Points: 935 Visits: 537
taylor_benjamin (5/8/2013)
I hope your company does not have too much success. If they do, it is possible your SQL Server will not be able to handle the load, and you will have only one option...scale up; buy a larger SQL Server.

What a horrible thing to tell someone. Please post somthing soon so everyone can wish you well also.
#@#%er @$$ Sick

As for the author. Awesome article and display of CLR uses. In a world where I have a Hyper-V SQL servers that can expand to 64 CPU's and 128GB+ RAM this would be a great solution for some of our daily automated emails and a lot lighter weight than other server side solutions. Don't pay any attention to the app develeper hate. The more your front end application servers are only tasked with UI Facade renedring the easier it is to scale any application. Good Job offloading.
srujanax
srujanax
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 0
Thanks for the post I have been doing this with SSRS
Charlie 22296
Charlie 22296
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 6
I think a disclaimer with the article would be fitting. Something that warns the reader about the implications for scaling this solution.
If your mirroring your database CLR procs create overhead for DBA's or your automated deployment depending on what you use.
I have used them in the past I would think hard about my options before using them again.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search