본문 바로가기

ghostscript

Crop a pdf file to reduce a page margin in Linux If a pdf file is very old, using acroread, convert(print) it to a ps file that can be opened with the emacs. For example, it is called "output.ps" gs -q -dSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite --dCompatibilityLevel=1.3 sOutputFile=out.pdf -c "[/CropBox [60 70 550 738] /PAGES pdfmark " -f output.ps The letter size is Pts (H 792 W 612) and I want to crop left 60, right 62, top 54, bottom 70 pt.. 더보기
Icy cold Bohemian style beer and Linux When I learn more linux, I feel as if I am drinking icy cold Bohemian style beer on a roof. If you know a lot of "The Shawshank Redemption", you probably know what I mean. The corresponding video might be found on https://www.youtube.com/watch?v=w4oPFXWXaDE The true Bohemian style beer is http://en.wikipedia.org/wiki/Pilsner_Urquell. Extract each page from an electronic pdf or ps file in oder to .. 더보기
How to fix the wrong bounding box information in eps files automatically with python To fix the wrong bounding box information in the eps files, I use the following method 2007/05/13 - [computer/linux] - How to create a stand alone eps file by using pstricks However, whenever I fix problems, I have to do the same procedure. It was very cumbersome procedures. I decide to make a lazy program, which do the same thing automatically. Here my second python script : #!/usr/bin/python #.. 더보기
Trouble eps file created by AutoCAD in LaTeX See the new post which might be what you want to find. 2008/01/30 - [computer] - eps file by AutoCAD -------------------------------------------------------------------------------------------------------------------------------------------- There is an blank page, which include the eps file that is created by AutoCAD, in ps file, which is created by LaTeX. I installed three different gs on my l.. 더보기
How to create a stand alone eps file by using pstricks In normal latex environment, pstricks works great. But, when I want to do this with pdflatex environment, it does not work. Then I decide to create eps file.make one stand alone TeX file \documentclass{article} \usepackage{pstricks,pst-node} \usepackage{pst-eps} \pagestyle{empty} \begin{document} \begin{psmatrix}[mnode=r,colsep=0.4,rowsep=0.4] ...................................................... 더보기
select one ghostscript on ubuntu 6.10 I installed three different versions of ghostscript as following apt-cache policy gs-esp gs-esp: Installed: 8.15.2.dfsg.0ubuntu1-0ubuntu4 Candidate: 8.15.2.dfsg.0ubuntu1-0ubuntu4 Version table: *** 8.15.2.dfsg.0ubuntu1-0ubuntu4 0 500 http://archive.ubuntu.com edgy/main Packages 100 /var/lib/dpkg/status apt-cache policy gs-gpl gs-gpl: Installed: 8.50-1.1ubuntu1 Candidate: 8.50-1.1ubuntu1 Version .. 더보기
Convert a pdf file into several png files by the ghostscript gs -dSAFER -dBATCH -dNOPAUSE -r150 -sDEVICE=pnggray \ -dTextAlphaBits=4 -sOutputFile=result-%02d.png input.pdf More detailed information about -sDEVICE as follows: Ghostscript provides a variety of devices for PNG output varying by bit depth. For normal use we recommend png16m for 24-bit RGB color, or pnggray for grayscale. The png256, png16 and pngmono devices respectively provide 8-bit color, .. 더보기