[맥북버전] 개인 학습용으로 ebook을 pdf로 추출하기
ebook으로 공부해야 하는 경우가 종종 있는데,
보통 시중에 있는 ebook들은 필기하기에도 안좋고 보관이 불편하다.
맥북으로 개인이 구매한 ebook을 pdf로 추출해서 활용해보자.
※ pdf 추출해서 무단으로 배포하는 건 불법입니다 !! 개인 공부 목적으로만 사용합시다 ※
1. 맥북에 내장되어 있는 automator 어플 열기
.png)
2. 이미지 캡쳐 플러그인 선택
.png)
3. 검색창에 AppleScript 검색하고 눌러서 뜨는 코드 칸에 아래의 코드 복붙하고 실행한다.
.png)
on run {input, parameters}
set repeatCount to 141 -- 반복 횟수 설정
set saveFolder to “캡쳐이미지를 저장할 파일 경로”
set captureRect to {65, 140, 1330, 755} -- (x, y, width, height)
tell application “교보eBook” to activate
delay 5 -- 앱이 활성화될 시간
repeat repeatCount times
set currentTime to current date
set fileName to "ebook_screenshot_" & (time string of currentTime) & ".png"
set fullPath to saveFolder & fileName
do shell script "screencapture -R" & (item 1 of captureRect) & "," & (item 2 of captureRect) & "," & (item 3 of captureRect) & "," & (item 4 of captureRect) & " " & quoted form of POSIX path of fullPath
tell application "System Events"
key code 124 -- 오른쪽 방향키
end tell
delay 1
end repeat
end run
- 이때 (x, y, width, height) 은 각각 x좌표 시작점, y좌표 시작점, 캡쳐너비, 높이 이다.
- 이 값을 알려면
cmd+shift+5버튼을 눌러서 확인할 수 있다..png)
4. 캡쳐가 완료되면 설정해둔 파일 경로로 가서 이미지를 전체 드래그한 후에 오른쪽 마우스를 눌러서 빠른동작 –> pdf 추출
.png)