본문 바로가기
조회 수 2854 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print Files
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print Files
Generate PDF with text file on OS X

brew install enscript
brew install ghostscript

EX1) create pdf with text file
enscript -r -2 --file-align=2 --highlight --line-numbers -p test_output.ps test.txt 
ps2pdf test_output.ps test_output.pdf
01.png

EX2) create pdf with whole java sources
enscript -r -2 --file-align=2 --highlight --line-numbers -o - `find . -name '*.java'` | ps2pdf - java_sources.pdf

EX3) create pdf with whole java sources
enscript --file-align=2 --highlight --line-numbers --tabsize=4 -o - `find . -name '*.java'` | ps2pdf - java_sources.pdf

** useful options
Usage: enscript [OPTION]... [FILE]...
-r, --landscape            print in landscape mode
-2                         same as --columns=2
-A, --file-align=ALIGN     align separate input files to ALIGN
-E[LANG], --highlight[=LANG]     highlight source code
-C[START], --line-numbers[=START]
  precede each line with its line number
-T, --tabsize=NUM          set tabulator size to NUM
-o                         an alias for option --output
-p, --output=FILE          leave output to file FILE.  If FILE is `-',
  leave output to stdout.
--margins=LEFT:RIGHT:TOP:BOTTOM
  adjust page marginals

Title
List of Articles
번호 제목 글쓴이 날짜 조회 수
57 Tomcat start/stop scripts Hojung 2015.07.31 3301
» Generate PDF with text file on OS X file Hojung 2015.07.30 2854
55 Install JDK7, Tomcat7 and MySQL on OS X file Hojung 2015.07.28 2693
54 Keyboard Symbol List Hojung 2015.07.02 2564
53 How to create a bootable USB stick from iso on OS X file Hojung 2014.12.14 2891
52 Mount volume read-only with Disk-Arbitrator file Hojung 2014.11.05 3205
51 How to check and fix drive in OS X from CLI (diskutil, fsck_hfs) file Hojung 2014.11.05 3680
50 FileVault 2 not working correctly in OS X VMs with VM disks set to Bus Type: SATA file Hojung 2014.11.05 3083
49 Create an encrypted archive file Hojung 2014.11.04 2863
48 Encrypt external hdd file Hojung 2014.11.04 2946
47 Finder 특정 디렉토리에서 디렉토리도 사이즈 보기 ('du -sh *' 와 동일) file Hojung 2014.11.04 3138
46 Don't delete files when copying file Hojung 2014.11.04 2912
45 안전하게 파일 삭제하기 (파일 완전삭제) file Hojung 2014.11.04 4662
44 editor에서 ^M가 나오는 문제 (unix - mac 호환성 문제시) Hojung 2014.11.04 2850
43 How to get file info (file, GetFileInfo, mdls, mdfind) Hojung 2014.11.04 2853
42 Create bootable USB stick from ISO in Mac OS X file Hojung 2014.09.07 4119
41 Create an OS X 10.9 Mavericks ISO file Hojung 2014.09.01 4041
40 Install command line RAR and UnRAR for Mac OS Hojung 2014.05.26 3829
39 How to encrypt a file from the OS X command line Hojung 2014.03.03 4597
38 Going from MacPorts to Homebrew (how to remove macports) Hojung 2014.02.19 5699
Board Pagination ‹ Prev 1 2 3 Next ›
/ 3

Designed by sketchbooks.co.kr / sketchbook5 board skin

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5