Hot answers tagged

6 votes

How to read PDF files from multilist using glass mapper?

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(...
  • 20.6k
5 votes
Accepted

How to display PDF link in Sitecore page

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 ...
5 votes
Accepted

Chrome icon coming for pdf's in media library instead of PDF icon

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 ...
  • 17.9k
3 votes
Accepted

How to open pdf in browser instead of downloading in sitecore site?

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"?> <...
  • 1,613
2 votes
Accepted

Convert files to PDF when uploading to media library

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 ...
  • 16.9k
1 vote

Possible to retrieve PDFs deleted from the media library or retain their URL for new version?

As mentioned here already, the Recycle Bin is keeping deleted files. If you want to change the pdf that is attached to the media item, you can detach it and attach a new one - this will change the pdf ...
  • 19.3k
1 vote

Media library item (pdf) reachable after unpublish/not publishable

If media is cached by Cloudflare, check cloudlare headers cf-cache-status, cf-ray when accessing media url in a browser. If the media is HIT then is still in Cloudflare cache. If you want to cache ...
1 vote

PDF items are not getting indexed and not listed in multilist with search

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 ...
  • 19.3k
1 vote

Best way to configure search for multiple paths, templates?

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 ...

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