Hot answers tagged

5

Did you create variant items under reference field? You need to display something in order to render a link. It works fine on my machine. Here are screenshots with the setup: Template Content Media Library (Title field is not filled automatically) Variant (pass through: File) Results in EE


4

You need to create a model first for your media items, e.g.: [SitecoreClass] public class MediaFile { [SitecoreField("Attachment")] public virtual Stream File {get; set; } [SitecoreField("MimeType")] public virtual string MimeType { get; set; } [SitecoreField("Title")] public virtual string Title { get; set; } [SitecoreField("...


4

The reason is that Siteore use the associated icon from the OS. Acrobat Reader is installed on your laptop, not on your SITserver. So the SIT server displays a default icon instead. You can specify which static file to use for which extension in the web.config. To add the PDF icon, do the following: Download a .pdf icon from the Adobe Website (due to ...


2

No, there is no built-in way to do this. You can build a module that converts the files to PDF using iTextSharp, PhantomJS or Puppeteer. Once upon a time @adamnaj wrote a script to export media items to PDF using Sitecore PowerShell Extensions. Maybe you can use that idea to import them back into the media library after PDF generation.


1

I am using the below patch configuration file for Sitecore 9.1 (Initial Release) and SXA 1.8 to stop the download of PDF files. It works fine for me <?xml version="1.0" encoding="utf-8"?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <!-- Force download of PDF files --> <mediaLibrary> ...


1

Sounds like you are missing the needed IFilter to index pdf content. Check https://doc.sitecore.com/developers/91/platform-administration-and-architecture/en/index-pdf-files.html for the information on 9.1: The Sitecore Content Search API uses the native Microsoft Windows IFilter interface to extract the text content from media files for indexing. ...


1

There is alot of good blog posts about this: E.g. https://www.geekhive.com/buzz/post/2017/08/predicate-builder-advanced-search-queries/ And as jrap commented, you should just combined multiple predicates. So Something like: var templateQuery = PredicateBuilder.False<ContentSearchResultItem>(); templateQuery= templateQuery.Or(item => item....


Only top voted, non community-wiki answers of a minimum length are eligible