sonumb

[Confluence] 프린트 시 내용만 보이게 하기 본문

개발자 이야기

[Confluence] 프린트 시 내용만 보이게 하기

sonumb 2020. 1. 15. 11:22

컨플루언스 페이지를 스크롤을 할때, 헤더가 숨겨진다. 

실제 해당 페이지를 출력할 때는, 스크롤바가 페이지마다 항상 출력된다. (좌측 메뉴바도 문제)

PDF로 저장 기능이 있긴하지만, '변환된 PDF 출력'은 번거로우며 출력물이 만족스럽지 않다.

 

Ctrl + P 를 눌러서 출력할 때, 페이지 내용만 출력하는 방법을 찾아냈다.

 

https://community.atlassian.com/t5/Answers-Developer-Questions/Display-confluence-page-content-only/qaq-p/494727

 

Display confluence page content only

Hi there,   is it possible to display the content of a page ONLY. That means no header, no sidebar and that stuff. Just the page content is need.   Why would you do this? I'm trying to implement a help popup where the content is stored in confluence.  

community.atlassian.com

위 내용을 참고하여 아래 절차로 수정하였다.

 

설정과정

1. 메뉴에서 컨플루언스 관리 -> 사용자 매크로 선택

 

2. 페이지 내용중에 사용자 매크로 추가를 누르고 내용을 아래처럼 작성한다.

(매크로 이름과 매크로 제목은 아무거나 해도 상관없음)

 

3. 템플릿 내용은 아래를 복사해서 붙여넣고 페이지 아래에 있는 저장을 누른다.

## Developed by: Davin Studer
## Date created: 04/02/2015
## @noparams
#if($req.getParameter('frameable') == "true")
<style>
#header, #footer, .ia-splitter .ia-splitter-left {display: none !important;}
#main {margin-left: 0 !important; border: 0 !important;}
#theme-header { display:none !important; }
body {background: #FFFFFF !important;}
</style>
#end

 

결과

아래 예를 보자.

위처럼, 페이지 헤더 메뉴와 좌측 메뉴가 표시되더라도, 출력 할 때 사라진다.

 

반응형