고스트스크립트 pdf - goseuteuseukeulibteu pdf

Ghostscript is a suite of software based on an interpreter for Adobe Systems' PostScript and Portable Document Format (PDF) page description languages. Its main purposes are the rasterization or rendering of such page description language[4] files, for the display or printing of document pages, and the conversion between PostScript and PDF files.[5]

Features[edit]

Ghostscript can be used as a raster image processor (RIP) for raster computer printers—for instance, as an input filter of line printer daemon—or as the RIP engine behind PostScript and PDF viewers. It can also be used as a file format converter, such as PostScript to PDF converter. The ps2pdf conversion program comes with the Ghostscript distribution.[6]

Ghostscript can also serve as the back-end for PDF to raster image (png, tiff, jpeg, etc.) converter; this is often combined with a PostScript printer driver in "virtual printer" PDF creators.[7][citation needed] As it takes the form of a language interpreter, Ghostscript can also be used as a general purpose programming environment.

Ghostscript has been ported to many operating systems, including Unix-like systems, classic Mac OS, OpenVMS, Microsoft Windows, Plan 9, MS-DOS, FreeDOS, OS/2, ArcaOS, Atari TOS, RISC OS and AmigaOS.

History[edit]

Ghostscript was originally written by L. Peter Deutsch for the GNU Project, and released under the GNU General Public License in 1988.[8] At the time of the initial release there was a similar commercial software product named GoScript from LaserGo.[9] Later, Deutsch formed Aladdin Enterprises to dual-license Ghostscript also under a proprietary license with an own development fork: Aladdin Ghostscript under the Aladdin Free Public License[10] (which, despite the name, is not a free software license, as it forbids commercial distribution) and GNU Ghostscript distributed with the GNU General Public License.[11] With version 8.54 in 2006, both development branches were merged again, and dual-licensed releases were still provided.[12][13]

Ghostscript is currently owned by Artifex Software and maintained by Artifex Software employees and the worldwide user community. According to Artifex, as of version 9.03, the commercial version of Ghostscript can no longer be freely distributed for commercial purposes without purchasing a license, though the (A)GPL variant allows commercial distribution provided all code using it is released under the (A)GPL.[14][15][16][17]

In February 2013, with version 9.07, Ghostscript changed its license from GPLv3 to GNU AGPL.[18][19] which raised license compatibility questions,[clarification needed] for example by Debian.[20]

Starting with release 9.55.0 Ghostscript has two build-in PDF interpreters. Until spring 2022, up to Ghostscript version 9.56.1, the default PDF interpreters implementation itself was coded in PostScript. The new default PDF interpreter has been rewritten in C entirely, and is faster and more secure than its predecessor, while its interface and graphics library have not changed.[21] Scripting the new C written PDF interpreter from PostScript is still possible.[22]

Front ends[edit]

Ghostscript graphical user interfaces (GUIs) view PostScript or PDF files on screens, scroll, page forward, page backward, zoom text, and print pages. Such GUIs include Evince, IrfanView, Inkscape and PDF24 Creator. Virtual printers can also create PDF files.

Free fonts[edit]

There are several sets of free fonts supplied for Ghostscript, intended to be metrically compatible with common fonts attached with the PostScript standard.[23][24][25][26] These include:

The Ghostscript fonts were developed in the PostScript Type 1 format but have been converted into the TrueType format.[27][26] As a result, a user can install and use the Ghostscript fonts via most modern software. Furthermore, the Ghostscript fonts are used as parts of various open source applications, e.g., the Linux version of GIMP depends on Graphviz which in turn depends on the Ghostscript fonts. [33][34] Finally, multiple open source font projects used glyphs from the Ghostscript fonts, e.g., the Latin characters of GNU FreeFont are based on Nimbus Mono L, Nimbus Roman No9 L, and Nimbus Sans L. [35] The TeX Gyre fonts are also based on 8 out of the 10 original Ghostscript typeface families. [36] The Garamond font has additionally been improved upon.[37]

수정된 사항도 많고 변경이 큰 만큼.. 설명이 좀 길 예정입니다. 양해 바랍니다. 빠른 개발을 위해 모두의 프린터에서 사용중이던 Ghostscript 를 사용해 왔습니다만. 이놈이 AGPL 이라는 매우 사악한 라이선스를 보유한 놈이고 유료화를 목표하고 있는 모두의PDF와는 상성이 좋지 않은데다 .. 신뢰성은 높아도 전체적으로 처리 속도 자체가 어마무시하게 느립니다. 그런 이유로 장기적으로 다른 방법으로 교체를 하거나 최대한 직접 만드는 방향으로 갈 예정이었는데.. 그 장기적이 ... 몇일 뒤 일줄은 ;; 생각 못했네요..

 

이번 버전부터는 고스트스크립트에 대한 의존성이 없습니다. 실행시 설치를 하네마네 하는 창 또한 더이상 존재하지 않습니다. 전체적으로 몇몇 변환 기능들은 기본적으로 속도개선이 크게 이뤄졌습니다.

 

이제 변경된 사항들에 대해 안내하겠습니다.

고스트스크립트 pdf - goseuteuseukeulibteu pdf

모든 변환 작업에 앞서서 이렇게 "PDF파일 여는중" 창이 뜨는 경우가 있는데요 이 창이 왜 뜨는것이냐 물어오시는 분들이 종종 계십니다. PDF 포맷은 역사도 오래됬고 워낙 다양한 프로그램에서 생성, 편집 등이 가능한 관계로 모든 PDF파일이 PDF스펙을 제대로 지켜서 만들어져 있진 않습니다. 또한 여러 사람을 거치며 여러 프로그램을 통해 수정, 변환 되어온 PDF들의 경우에는 내부적으로 이런저런 오류를 포함하고 있는 경우가 많습니다. 예를들어 PDF버전은 1.4라고 해놓고 실제 내부 포맷은 1.7에서나 지원되는 내용이 포함되어 있다던지 .. 어느 위치에 이미지가 존재한다는 정보는 있는데 실제 표시할 이미지 데이터 자체는 존재하지 않는다던지... 정말 다양한 케이스의 문제가 있을수 있습니다. 그렇게 문제가 존재하거나 존재할 가능성이 큰 경우에는 PDF파일을 열어서 해당 요소들을 제거하거나 수정하는 작업등을 해서 모두의PDF가 여러 작업을 하는데 문제 없을 파일로 변환을 하는 과정에서 뜨는 창입니다. 기존 버전들에서는 이 짓을 위해 고스트스크립트를 사용해 왔는데요... 앞서 말씀 드렸듯 고스트스크립트가 속도가 꽤 느린놈이라 다수의 파일을 다루시거나 큰 파일을 다루실땐 이 창에서 꽤 오랜시간이 걸리셨을겁니다.

 

이번 버전부터는 기존 버전 대비 초기 변환 시간이 제 컴터기준으로 1/2이상 줄어들었습니다. 또한 모두의 PDF에서 다룰 수 없는 오류가 존재하는 경우에 변환오류로 표시하고 작업에서 제외를 시키는데 오류창을 닫으면 사라져버려서 어떤 파일이 변환에서 제외됬는지 알기 어렵다는 분들이 많으셨습니다.

 

그런이유로 

 

고스트스크립트 pdf - goseuteuseukeulibteu pdf

이렇게 초기 변환에 오류가 존재하고 이 창을 확인하여도 어떤 파일이 변환을 실패한건지 확인 가능 하시도록 "PDF파일 여는중.." 창에 오류가 존재할경우 "닫기" 버튼이 생겨나고 이를 누르면 창이 닫힙니다. 아무 오류가 없을 경우 기존같이 그냥 자동으로 닫힙니다.

 

PDF->PDF IMAGE 변환 

 

고스트스크립트 pdf - goseuteuseukeulibteu pdf

PDF->PDF IMAGE 변환기능에도 큰 변화가 있습니다. 기존에 고품질, 저품질, 중품질 ? 그런 기준도 있고 그랬는데 .. 

 

고스트스크립트 pdf - goseuteuseukeulibteu pdf
고스트스크립트 pdf - goseuteuseukeulibteu pdf

이제는 DPI 와 이미지 퀄리티를 지정하고 변환하시면 되겠습니다. DPI 는 문서의 용지 크기(?)를 생각하시면 되겠구요. DPI가 작을수록 이미지가 작게 만들어지고 DPI가 클수록 면적이 크게 만들어집니다.

 

이미지 퀄리티는 0 ~ 100 까지 지정가능하고 기본은 75 입니다. 이 기능은 PDF의 각 페이지를 JPEG이미지 화 하여 지정한 DPI와 이미지 퀄리티에 맞춰 생성한후 생성된 이미지로 PDF를 만들어주는 기능입니다.

 

이렇게 PDF IMAGE 화 하면 PDF상의 글자, 이미지, 도형등의 모든 기능이 다 합쳐서 이미지화 되기 때문에 PDF편집 프로그램 등으로 내용을 편집하기 어려워집니다. DPI와 퀄리티 조정에 따라서 PDF의 용량을 크게 줄일수 있는 방법이 될수도 있구요.

 

단, 과도하게 퀄리티를 낮추면 글자를 알아보기 힘들수 있으니 주의하시구요. PDF의 내부 객체들은 그대로 살린 상태로 용량을 줄이고 싶으신 경우에는 뒤에 설명할 PDF용량/품질조정 기능을 사용하시면 됩니다.

 

PDF 품질/용량 조절

 

고스트스크립트 pdf - goseuteuseukeulibteu pdf

기존에 고,중,저품질과 DPI 등 조금 복잡하게 설정해야 됫던것이 품질 값 하나만 조정하시면 가능하도록 수정되었습니다. PDF파일의 경우 실제로 용량에 영향을 주는 것은 파일 내에 존재하는 이미지파일의 품질에 의한 경우가 대부분입니다. PDF 파일에 포함되는 이미지 형식은 보통 PNG와 JPEG 2가지 인데요 모두의 PDF에서 용량을 줄이는데 관여하는 것은 투명화 되지 않은 이미지들만 재압축을 하게됩니다. JPG형식의 데이터 또는 PNG이나 투명값이 존재하지 않는 이미지들만 JPEG로 재압축하여 용량을 줄여줍니다.

 

만약 PDF상의 모든 이미지가 투명값을 가지고 있는 PNG이라면 이 기능으로 크게 용량 변동을 느끼진 못할수도 있지만 일반적으로 그런 변태PDF를 만드는 사람들은 별로 없으니.. 나름 효과를 보실 수 있을것으로 생각됩니다.

 

이 기능으로 용량을 줄이더라도 PDF상의 각 객체들은 그대로 살아있기 때문에 PDF편집 프로그램들로 쉽게 편집이 가능합니다. 만약 편집하길 원하지 않는 경우에는 PDF -> PDF IMAGE 기능을 사용해서 변환하십시요.

 

PDF 일괄인쇄

 

기존에 Ghostscript 를 사용했던 이유도 PDF파일을 종이프린터로 인쇄시켜주는 기능때문이기도 했는데요. 이번에 들어내면서 기능이 조금 변경되었습니다.

고스트스크립트 pdf - goseuteuseukeulibteu pdf

출력하실 품질을 선택하시면 되는데요.. DPI 값이 크면 클수록 실제 인쇄에 더 많은 시간이 걸릴 수 있습니다. 조금 메모리를 과도하게 사용하게되는 PDF파일들이 종종 있는것 같은데 그건 차차 해결하면 될것 같구요.

 

마지막으로.. 모두의PDF가 어떤 언어로 개발되어지고 어떤 라이브러리들을 사용하는지 궁금해 하시는 분들이 있는데요.

제가 만드는 대부분의 프로그램들은 Go언어로 개발되어 있고 기능에 따라서는 C/C++, C#, 자바등 다른 언어를 같이 쓰기도 합니다. 모두의 PDF도 일부 기능은 자바를 사용중이구요 관련 정보는