paulmezza February 2016

SSRS .net PDF to Image from SQL

I have looked and there doesnt seem to be anything around to do this.

I have a database with a varbinary column that contains a PDF. I want to display this as an image in SSRS. I can't find any way with ghostscript or spire.pdf etc (the free options) that allow you to pass a stream as the pdf input, and then output the images, they all seem to need an actual file. Googling this gives a codeproject example from 2009 which uses a component you now have to buy, plus sqlclr which seems overly complicated. I just want a .net class i can build and reference in my SSRS rdl file which i can pass the field as the result of the sql query and get back a list of images (1 per page)

Answers


Alexei February 2016

Instead of trying to display PDF stored in VARBINARY(MAX) directly in SSRS, I would try to obtain the images before generating the report:

1) use a tool to generate an image from a PDF (e.g. ImageMagick). More details about this conversion can be found here.

2) Display images in SSRS from VARBINARY(MAX) using this tutorial.

This means to have some redundancy (extra space needed), but reports will generate faster.

Post Status

Asked in February 2016
Viewed 1,594 times
Voted 6
Answered 1 times

Search




Leave an answer