In the case, one want to create one pdf file from N pdf files, gs will save us to do this quickly.


For example,  one has the following pdf files :


1.pdf

2.pdf

....

10.pdf


And would like to have result.pdf from these pdf files, the following command will create the result.pdf file



gs -q -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=result.pdf -dBATCH file{1..10}.pdf


'Computer > linux' 카테고리의 다른 글

Undo git push  (0) 2017.10.22
Combine multiple PDF files to a pdf file  (0) 2017.08.28
how to acceess udev rule parameter  (0) 2017.08.25
How to get only the mac address (Linux)  (0) 2017.08.25
posted by citadel
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 http://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 edit or modifiy them. The ps file format has much better output result than pdf file.

gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=epswrite  -sOutputFile=result-%02d.eps test.ps

The related posts are
2007/08/15 - [computer/linux] - How to save each page of a pdf file to eps file
2006/12/06 - [computer/linux] - ghostscript를 사용해서 여러개 화일을 하나의 화일로 만들기 (pdf,eps, .....)



posted by citadel
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 linux. It can be change by the following message:

# update-alternatives --config gs

There are 3 alternatives which provide `gs'.

  Selection    Alternative
-----------------------------------------------
 +        1    /usr/bin/gs-esp
          2    /usr/bin/gs-gpl
*         3    /usr/bin/gs-afpl

Press enter to keep the default[*], or type selection number: 3

With gs-afpl, AutoCAD eps file or LaTeX ps file can be good. The eps file is open with emacs with unexpected long time. But I can't understand the content.

사용자 삽입 이미지

There are is a lot of ugly numbers. Probably AutoCAD does not like the end user can edit that file.

I don't like the above ugly eps file.

After eps2eps autocad.eps output.eps, the eps file can be open with emacs more easily.

사용자 삽입 이미지

This eps file is used in whatever gs you use.
eps2eps returns wrong bounding box information. It will be correct the old post: 2007/05/13 - [computer/linux] - How to create a stand alone eps file by using pstricks




posted by citadel