Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Generating Thumbnails for PDFs (GenericMedia)



Is it possible for EPiServer 7.5 to automatically generate a thumbnail for a PDF file?

I have a block that currently lists out all PDF files in links. I want to include a thumbnail beside each PDF link.

I want to be able to do something like:

@foreach (var asset in assets.Where(a => a.MimeType == "application/pdf"))
  • @Html.ContentLink(asset.Name, asset.ContentLink)
  • }

    However, the Thumbnail property of the GenericMedia asset is null. How do I make the GenericMedia class to automatically populate this property for PDF's?

    Any help will do!


    May 07, 2015 8:04

    Sorry, GenericMedia is a class that inherits from MediaData (EPiServer.Core). So the thumbnail property is actually off the MediaData class.


    May 07, 2015 8:07
    * You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.