# 인라인 PDF 미리보기

**URL:** https://meta.discourse.org/t/inline-pdf-previews/157649
**Category:** Theme component
**Tags:** official, desktop, pdf-previews
**Created:** [7월 13, 2020, 9:18오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649 "2020-07-13T21:18:10Z")
**Posts on this page:** 20
**Page:** 7

<div class="post-metadata">

### Author: ![MrAli](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@MrAli](https://meta.discourse.org/u/MrAli)
#### Post date: [3월 5, 2024, 2:34오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/138 "2024-03-05T14:34:23Z")

</div>

아니요, 저는 3가지 문제를 겪고 있습니다.

1. 로그인 여부와 관계없이 모든 사용자에게 PDF를 표시하는 방법은 무엇인가요?

2. 외부 URL에서 PDF를 표시할 수 있나요?

3. 사용자가 PDF 링크를 클릭하면 왜 자동으로 다운로드되고 URL에서 열리지 않나요?

---

<div class="post-metadata">

### Author: ![Alon1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alon1/32/197167_2.png) [@Alon1](https://meta.discourse.org/u/Alon1)
#### Post date: [6월 28, 2024, 1:18오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/139 "2024-06-28T13:18:28Z")

</div>

이 컴포넌트를 iframe 라이트박스(iframe lightboxes)와 함께 사용 중인 분 중, PDF 미리보기 위에 “전체 화면으로 확장” 화살표가 여전히 표시되는지 확인해 주실 수 있을까요?

 ![이 이미지는 PDF 뷰어 소프트웨어 또는 웹사이트에서 사용할 수 있는 옵션을 보여줍니다. 파일 열기, 주석 또는 댓글 추가, 설정 또는 환경 설정 접근 및 PDF 문서의 표시와 조작과 관련된 기타 기능과 같은 버튼이나 아이콘이 포함되어 있습니다. (AI 캡션)](https://global.discourse-cdn.com/meta/original/4X/4/8/8/488b48db48dd7d104dd1e30ec649b65459dda1d4.png)

참고로, 2023년에는 정상적으로 작동했습니다…

> [@인라인 PDF 미리보기](https://meta.discourse.org/t/inline-pdf-previews/157649/116?u=alon1):
>
> That’s great! Simply (1) installing IFrame Lightboxes theme-component and (2) adding my own website url to the list of “iframe origin domains” in the component settings, works! It adds the expand button right above the right corner of the PDF inline Right out of the box slight_smile

---

<div class="post-metadata">

### Author: ![ufukayyildiz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ufukayyildiz/32/217157_2.png) [@ufukayyildiz](https://meta.discourse.org/u/ufukayyildiz)
#### Post date: [6월 28, 2024, 2:43오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/140 "2024-06-28T14:43:45Z")

</div>

> [@Alon1](#):
>
> 여전히 PDF 미리보기 위에 “전체 화면으로 확대” 화살표가 표시되나요?

아니요. 사용되지 않습니다.

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [6월 28, 2024, 9:55오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/141 "2024-06-28T21:55:45Z")

</div>

좋은 생각이에요. 정말 도움이 될 테니까요.

---

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [8월 23, 2024, 5:47오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/142 "2024-08-23T17:47:19Z")

</div>

우리는 사이트에 이 TC를 사용하며 매우 유용하다고 생각합니다. 오늘 PDF를 포함하는 주제를 생성하고 공유했는데, 이 괴물이 만들어졌습니다: 인라인 PDF로, 언퍼플(unfurl)에서 완전히 탐색할 수 있습니다.

 ![CleanShot 2024-08-23 at 13.38.15@2x](https://global.discourse-cdn.com/meta/original/4X/7/c/8/7c8499e2a194e2feaa32e57eb19af8119fb5e7b1.png)

---

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [9월 11, 2024, 5:40오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/143 "2024-09-11T17:40:33Z")

</div>

특정 카테고리에서만 이 기능을 활성화할 수 있는 방법이 있을까요? 여러 파일을 나열하는 주제를 만들고 있는데, PDF가 자동으로 펼쳐져서 보기 좋지 않습니다. 특수 문자를 입력하는 것처럼 수동으로 트리거를 방지할 수 있는 방법이라면 그것도 괜찮습니다.

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [9월 11, 2024, 7:38오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/144 "2024-09-11T19:38:48Z")

</div>

> [@putty](#):
>
> 트리거가 발동되지 않도록 하는 수동적인 방법

무엇의 트리거 발동을 방지하려는 건가요? 선택한 카테고리에서 PDF가 어떻게 표시되길 원하시나요?

---

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [9월 11, 2024, 7:49오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/145 "2024-09-11T19:49:11Z")

</div>

PDF가 인라인으로 표시되는 것을 차단하는 방법을 찾고 있습니다. 차단된 경우, 해당 PDF는 다른 게시 첨부파일처럼 표시되어야 합니다.

---

<div class="post-metadata">

### Author: ![denvergeeks](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/denvergeeks/32/327671_2.png) [@denvergeeks](https://meta.discourse.org/u/denvergeeks)
#### Post date: [9월 11, 2024, 9:13오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/146 "2024-09-11T21:13:52Z")

</div>

> [@putty](#):
>
> 다른 게시글 첨부파일

단순 링크로? 아니면 원박스(Onebox)로? 아니면 어떻게?

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [9월 11, 2024, 11:26오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/147 "2024-09-11T23:26:54Z")

</div>

> [@putty](#):
>
> 파일 목록을 나열하는 주제를 만들고 있는데, PDF가 자동으로 펼쳐지는 것이 불편합니다. 특수 문자를 삽입하는 등 트리거를 방지하는 수동적인 방법이 있으면 좋겠습니다.

PDF 링크 이름 앞에 공백을 하나만 입력하면 됩니다. 이 부분은 잘 문서화되어 있지 않았지만(방금 그 부분을 다뤘습니다), 저는 이전에도 같은 이유로 TC에 해당 기능이 추가되도록 처리한 바 있습니다.

원래는 Oneboxes처럼 마크다운에서 링크 앞에 공백을 넣는 방식이었으면 좋겠지만, 현재 방식도 충분히 잘 작동합니다.

---

<div class="post-metadata">

### Author: ![Stephane\_Roy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephane_roy/32/222598_2.png) [@Stephane\_Roy](https://meta.discourse.org/u/Stephane_Roy)
#### Post date: [11월 4, 2024, 10:44오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/148 "2024-11-04T22:44:21Z")

</div>

안녕하세요

이 플러그인으로 인해 오류가 발생하고 있습니다.

원인에 대해 어떤 아이디어가 있으신가요?

 ![The image shows a screenshot of a webpage with the title "Test d'un pdf en visibilité" and a large, empty gray box. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/1/d/f/1df2209f5115dc318e4e70ed9549f9eea91a365b.png)

[https://forums.ffjdr.org/t/test-dun-pdf-en-visibilite/2691](https://forums.ffjdr.org/t/test-dun-pdf-en-visibilite/2691)

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [11월 5, 2024, 12:33오전 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/149 "2024-11-05T00:33:14Z")

</div>

모든 PDF에서 발생하는 건지, 아니면 이 파일에서만 발생하는 건가요?

포럼 도메인을 `allowed internal hosts`에 추가해 보셨나요?

---

<div class="post-metadata">

### Author: ![Stephane\_Roy](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephane_roy/32/222598_2.png) [@Stephane\_Roy](https://meta.discourse.org/u/Stephane_Roy)
#### Post date: [11월 5, 2024, 9:40오전 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/150 "2024-11-05T09:40:35Z")

</div>

> [@omarfilip](#):
>
> internal

네, 모든 PDF 파일에 대해 해당됩니다.

'internal host’에 추가해 보았지만 개선되지 않았습니다.

조언해 주셔서 감사합니다 🙂

그 외 Chrome 콘솔에서 이 오류 메시지를 발견했습니다:

> initialize-for-pdf-preview.js:84 ‘blob:[https://forums.ffjdr.org/79cf20bf-65ac-460f-b0b0-73c10bf85890](https://forums.ffjdr.org/79cf20bf-65ac-460f-b0b0-73c10bf85890)’ 프레임을 거부했습니다. 다음 Content Security Policy 지시문 "default-src ‘self’ data: https:"을 위반했기 때문입니다. 'frame-src’가 명시적으로 설정되지 않았으므로 'default-src’가 폴백으로 사용됩니다.

> 로컬 리소스를 로드할 수 없습니다: blob:[https://forums.ffjdr.org/79cf20bf-65ac-460f-b0b0-73c10bf85890](https://forums.ffjdr.org/79cf20bf-65ac-460f-b0b0-73c10bf85890)

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [11월 5, 2024, 5:37오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/151 "2024-11-05T17:37:12Z")

</div>

`allowed onebox iframes` 설정을 확인해 보세요. `*`로 설정되어 있어야 합니다.

---

<div class="post-metadata">

### Author: ![LotusJeff](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lotusjeff/32/477888_2.png) [@LotusJeff](https://meta.discourse.org/u/LotusJeff)
#### Post date: [1월 28, 2025, 5:29오전 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/152 "2025-01-28T05:29:59Z")

</div>

이 컴포넌트를 방금 설치했습니다. 설치에 취한 단계는 다음과 같습니다. 제 환경은 S3(Digital Ocean Spaces)와 CDN([Bunny.net](http://Bunny.net))입니다.

Chrome 개발자 도구(F12)를 사용하면 설정을 하는 데 큰 도움이 됩니다. 네트워크 탭을 클릭하여 PDF가 CORS에 의해 차단되고 있는지 확인하세요.

### Digital Ocean 설정

1. Spaces 설정으로 이동하여 CORS 구성 추가를 클릭합니다.
2. 설정:

```plaintext
Origin: Discourse URL - 전체 https://discourse.url 사용
Allowed Methods: GET 및 HEAD
다음 헤더를 추가합니다:
      Access-Control-Allow-Methods 
      Access-Control-Allow-Origin
      Origin
      Range
Access Control Max Age: 0

```

1. 제 화면은 다음과 같았습니다:  

2. 저장하고 메인 화면에서 확인합니다.

### CDN ([Bunny.net](http://Bunny.net)) 설정

CDN에 \*.pdf 파일 형식에 대해 CORS 헤더를 전달하도록 지정해야 했습니다.

1. CDN을 선택하고 헤더 옵션을 찾습니다.
2. "CORS 헤더 추가"를 켭니다.
3. 파일 확장자에 PDF를 추가합니다.
4. 저장합니다.

이 두 가지 설정을 완료한 후 모든 것이 잘 작동했습니다.

다른 도구를 사용하고 있을 수 있지만, 이 정보가 문제 해결이나 발생 가능한 문제 해결에 도움이 될 수 있습니다.

---

<div class="post-metadata">

### Author: ![Ralf\_Stockmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ralf_stockmann/32/505867_2.png) [@Ralf\_Stockmann](https://meta.discourse.org/u/Ralf_Stockmann)
#### Post date: [9월 10, 2025, 3:38오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/153 "2025-09-10T15:38:43Z")

</div>

> [@nathank](#):
>
> 이건 상당한 개선이 될 거예요! 구현하기도 그리 어렵지 않을 것 같아요. 앞으로 며칠 안에 시간이 나면 이 기능에 대한 PR을 시도해 볼 수도 있겠네요.

> [@tobiaseigen](#):
>
> (b) 옵션은 이미 제공되고 있는 것 같아요. 예를 들어 인라인 표시와 새 탭에서 열기 같은 옵션이 있죠. 사용자가 인라인으로 보고 새 탭에서도 열 수 있도록 하는 세 번째 옵션을 추가하는 건 어떨까요? 저도 이 아이디어에 공감합니다.

인라인 PDF에 대한 추가적인 “새 탭에서 열기” 옵션을 말씀드린 건데요. @nathank 님은 시간이 나지 않으신 것 같네요?

우리는 디스코스를 기업용 인트라넷으로 사용하고 있어 이 문제가 여전히 시급합니다.

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [9월 11, 2025, 7:48오전 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/154 "2025-09-11T07:48:31Z")

</div>

> [@Ralf\_Stockmann](#):
>
> @nathank 님이 시간을 내지 못한 것 같다고 생각해요.

바빠졌고, 저는 아마추어 수준이라 시간이 오래 걸릴 거예요. 그래서 그 뒤로는 다른 일을 하러 갔죠…

#Contribute > Feature 채널에서 구체적으로 언급하거나, 개발자에게 비용을 지불해 PR을 진행하도록 하는 것도 도움이 될 수 있습니다.

---

<div class="post-metadata">

### Author: ![Roi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roi/32/130587_2.png) [@Roi](https://meta.discourse.org/u/Roi)
#### Post date: [11월 2, 2025, 10:19오후 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/155 "2025-11-02T22:19:17Z")

</div>

브라우저의 개발자 콘솔에서 이 멋진 테마 컴포넌트에 대한 비추천(deprecation) 알림을 받았습니다:

> [THEME 30 ‘PDF previews’] 비추천 알림: 사이트 초기화 동안 `site.mobileView` 또는 `site.desktopView`에 액세스하면 브라우저 창이 조정될 때 오류와 불일치가 발생할 수 있습니다. 이러한 확인은 페이지 렌더링 중에 실행되는 컴포넌트, 트랜스포머 또는 API 콜백으로 이동하십시오. [Discourse 3.5.0.beta9-dev 이후 비추천] [deprecation id: discourse.static-viewport-initialization] [info: [Designing for Different Devices (Touch & Hover)](https://meta.discourse.org/t/367810)]

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [11월 7, 2025, 4:32오전 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/156 "2025-11-07T04:32:15Z")

</div>

위에서 언급된 비추천(deprecation) 통보를 제 PR에서 [이 기능 요청](https://meta.discourse.org/t/make-pdfs-open-directly-not-via-download-by-default/388190)을 통해 처리했습니다. 이 PR은 PDF 링크의 동작을 개선하여 항상 새 탭에서 열리도록 하며, 해당 주제에서 제기된 여러 우려 사항을 해결합니다.

구체적으로 말하면, 모바일에서는 이제 한 번의 탭으로 PDF 콘텐츠에 접근할 수 있게 되었습니다(이전에는 여러 번의 탭, 대기 시간 등이 필요했습니다). 또한 데스크톱 환경에서도 이러한 동작이 원할 때 유용합니다.

> [@PDF를 다운로드 없이 바로 열도록 기본 설정 변경](https://meta.discourse.org/t/make-pdfs-open-directly-not-via-download-by-default/388190):
>
> 현재 PDF의 핵심 처리는 다운로드를 통해 이루어집니다: [allaboutcats.pdf](https://meta.discourse.org/uploads/short-url/kc7PBLn0YWV50qV2erkiGh7Frkb.pdf) (42.2 KB) 이 방식은 매우 기능적이지만, 가장 일반적인 사용 사례인 "지금 이걸 읽고 싶다"에 대해 몇 가지 불필요한 단계를 추가합니다. 특히 모바일 기기에서 그렇습니다. 무언가를 다운로드/저장해야 하는 필요성은 매우 부차적입니다. 때로는 필요하지만, 보통 사용자는 그냥 읽고 넘어가기를 원합니다. [Inline PDF Previews](https://meta.discourse.org/t/inline-pdf-previews/157649) TC는 데스크톱에서 인라인 PDF를 서빙함으로써 이 문제를 해결하며, 이를 매우 우아하게 수행합니다. 그러나 다음 일반적인 상황들은 놓치고 있습니다: 모바일 기기에서의 PDF 여러 개의 PDF (시각적 혼란으로 인해) 전체 브라우저 탭에서 PDF 보기 참고로, PDF를 다운로드하는 다른 경로들이 있습니다. 링크를 직접(우클릭/컨텍스트 메뉴를 통해) 다운로드하거나, 이 TC가 서빙하는 브라우저 기반 PDF 뷰어 내에서 다운로드할 수 있습니다. 제안:…

수정과 새로운 기능을 함께 포함시킨 것은 다소 무례한 일일 수 있지만, 동작을 변경하기 위해 모바일 감지 로직을 수정해야 했기 때문에 어쩔 수 없었습니다.

---

<div class="post-metadata">

### Author: ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)
#### Post date: [11월 24, 2025, 11:29오전 UTC](https://meta.discourse.org/t/inline-pdf-previews/157649/157 "2025-11-24T11:29:25Z")

</div>

데스크톱에서 PDF 미리보기가 여전히 인라인으로 표시되나요?

[이전 페이지](https://meta.discourse.org/t/inline-pdf-previews/157649.md?page=6)

[다음 페이지](https://meta.discourse.org/t/inline-pdf-previews/157649.md?page=8)
