Expand my Community achievements bar.

SOLVED

How can I have .pdf open inline in the author/view as published stage?

Avatar

Level 4

Hi All,

Just a quick question. 

Is there a way I can have PDFs open inline instead of as a download inside the author/view as published section of aem. 

I have these opening inline in our live site via a dispatcher rule, not sure where to apply this for the author itself  

Any help would be appreciated.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @RooRue,

There is an OSGi Configuration in Felix console named "Apache Sling Content
Disposition Filter" which controls Content Disposition for different mime types based on the path
SantoshSai_0-1671152351087.png

 

For more details please refer:http://www.sgaemsolutions.com/2019/10/aempdf-is-getting-downloded-instead-of.html


Dispatcher Configuration:

<LocationMatch "\.(?i:pdf)$">
  ForceType application/pdf
  Header set Content-Disposition inline
</LocationMatch>

Please refer: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/pdf-from-dispatchers-shoul...

Hope that helps!

Regards,

Santosh

View solution in original post

2 Replies

Avatar

Community Advisor

Hi @RooRue 

 

PDF viewer in core components library allows for the inclusion of a PDF document on a page. The Customize Tab in this component allows the author to define the options available in the viewer to the reader and how the viewer should be presented.

 

 

AvinashGupta01_1-1671147048349.png

 

 

https://experienceleague.adobe.com/docs/experience-manager-core-components/using/wcm-components/pdf-... 

 

Hope this helps.

 

Avatar

Correct answer by
Community Advisor

Hi @RooRue,

There is an OSGi Configuration in Felix console named "Apache Sling Content
Disposition Filter" which controls Content Disposition for different mime types based on the path
SantoshSai_0-1671152351087.png

 

For more details please refer:http://www.sgaemsolutions.com/2019/10/aempdf-is-getting-downloded-instead-of.html


Dispatcher Configuration:

<LocationMatch "\.(?i:pdf)$">
  ForceType application/pdf
  Header set Content-Disposition inline
</LocationMatch>

Please refer: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/pdf-from-dispatchers-shoul...

Hope that helps!

Regards,

Santosh