I have a pdf file that I'd like users to be able to open from their home landing page. I've tried using CMS in community builder, but the content just comes up as a big white or grey box.

I went into content management, created a CMS workspace, and uploaded the file. I also tried making a collection. Nothing appears whether I use CMS Single Object or CMS Collection and select this content.

What am I doing wrong? Is this the best way to display a pdf on a community page? If possible, I'd like the pdf's first page to be visible as a preview and then clicking on it would open the full pdf in another tab.

  • 1
    what's the performance impact on page load? can you load the file to external document storage system like s3 and display the preview of the file from s3 using a LWC? or load the file to salesforce and sfdcpanther.com/…
    – cl11
    Apr 12, 2022 at 15:43

1 Answer 1


This does not completely answer the question but it might still be worth checking the Salesforce Experience Cloud blog post How to use CMS Documents Like a Pro in your Experience Cloud Site which describes how to setup CMS document for use in Experience cloud.

Once setup, the page shows a button or link to dowload the document and note the conclusion of the blog in the summary :

CMS Documents are a great way to share documents with all users of your site in a visually beautiful fashion. It doesn’t have all the bells and whistles that Salesforce Files offers (e.g. advanced sharing, file preview, searching inside the document, etc.) so it is best used for a small number of documents that your users will browse and might download as part of a call to action.

Furthermore, the CMS Content Types documentation mentions this

The preview function is available for image content types only in a CMS workspace or from a Lightning Experience site page. This limitation applies to CMS Single Item and CMS Collection components.

Alternative is to go for a custom development solution to preview the file in an LWC component as @cl11 mentioned in the comments

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .