LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   combine 4 page to singe page (https://www.linuxquestions.org/questions/linux-newbie-8/combine-4-page-to-singe-page-890228/)

seismo18 07-06-2011 09:03 AM

combine 4 page to singe page
 
I want to combine 4 ps(or pdf) page to single page and for this i have try a2ps command as:

a2ps -4 1.ps 2.ps 3.ps 4.ps -o outfile.ps

Event through it divide the page into four section. But only give one output of my four input. other three section is blank. Is i am doing some wrong or Is their any other command to do so.

I am thankful for your help.

Sunil

anotherlinuxuser 07-07-2011 01:39 AM

Hi,
You may the input files at the end of the command, like:

a2ps -4 -o outfile.ps 1.ps 2.ps 3.ps 4.ps

Or, the input files may need to be combined into one file before using a2ps. Like:

cp 1.ps stage1.ps
cat 2.ps >> stage1.ps
cat 3.ps >> stage1.ps
cat 4.ps >> stage1.ps

Then run a2ps on the stage1.ps file:

a2ps -4 stage1.ps -o outfile.ps

A 'for' loop could be used to combine the files as well.

b0uncer 07-07-2011 02:23 AM

If you wish to concatenate several files into one, you may want to use Ghostscript (gs) for that. If you want examples, see for example this thread. It's not difficult, you just tell ghostscript the output file, device (how to write the output, for example pdf or ps), perhaps some other settings if you need to, and the input files. See if you have the psmerge script available.

seismo18 07-07-2011 04:50 AM

Thanks <anotherlinuxuser> it works.


All times are GMT -5. The time now is 12:37 PM.