LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-13-2011, 07:25 PM   #1
alanv
LQ Newbie
 
Registered: Jun 2010
Distribution: Fedora
Posts: 24

Rep: Reputation: 1
Question Merge pdf files vertically AND horizontally


Hello, I have two questions:

1. Is there an easy way to combine pdf files not only one "after" the other, but also one "next to" the other? For example, If I have one-page files called a1.pdf, a2.pdf, a3.pdf, a4.pdf, b1.pdf, b2.pdf, b3.pdf, b4.pdf, c1.pdf, c2.pdf, c3.pdf, c4.pdf, I want to combined them so that I can scroll down from a to c and scroll right from 1 to 4. That is, I want to merge them in "matrix form". If I zoom out the final file should look like:

a1 a2 a3 a4
b1 b2 b3 b4
c1 c2 c3 c4
(TWELVE pages in total)

Is this possible? I tried Google but found no information.

2. Also, is it possible to just put all of them together in a single page. If I zoom out the page should look like:
a1a2a3a4
b1b2b3b4
c1c2c3c4
(ONE page in total)

Thanks

Note: I would like to do this for many one-page files
 
Old 04-13-2011, 08:08 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
If you can't find a 'simple' tool to do it, you may have to create your own using Perl http://search.cpan.org/search?query=pdf&mode=all, prob this module http://search.cpan.org/~cdolan/CAM-P...lib/CAM/PDF.pm
If you go this route, I'd also post the qn at perlmonks.org; it's where the Perl gurus hang out and you should get some good advice/code.
 
Old 12-21-2012, 07:20 AM   #3
1gn1t10n
LQ Newbie
 
Registered: Dec 2012
Location: France
Distribution: Slackware current
Posts: 1

Rep: Reputation: Disabled
Lightbulb

Hi,

My answer may come a bit late for you, however it may benefit others.

1. I don't know any answer to your first question. It looks to me more of a presentation problem . It is the PDF viewer's job to arrange pages (ie: one after the other). Pages are usually displayed from top to bottom. Some viewers (like Evince for example) can display a "dual" view, like when reading a book. So you would get

-- ee
a1 a2
b1 b2
...
if you had only two columns and not four. 'ee' is an empty page that fills the place of the first page, which is odd (a real page in a book is made of an odd, then an even page).

2. One possible answer to your second question is to use PDFjam. It is a shell-script interface to the "pdfpages" LaTeX package. Google for the URL, the forum doesn't allow me to put it here because it's my first post.

The quick fix to your problem is:
Code:
$ pdfjam --suffix nup --nup 4x3 --no-landscape a1.pdf a2.pdf a3.pdf [...]
This will arrange your original documents on ONE page of 3 rows x 4 columns. You can experiment with and without landscape (--landscape).

PDFjam's behaviour can be customised through parameters (look at the source code to understand them, the man page is quite light). This is useful for other PDF operations too (join, n-up join, split, n-split, flip, reflect etc.).

Then there is the alternate version of using PDF and PS manipulating libraries in a more generic programming language, as chrism01 suggested. Or the hard-core one where you learn directly PostScript and PDF, edit by hand the documents, and then use Ghostscript to generate the result.

Hope this helps!

Last edited by 1gn1t10n; 12-21-2012 at 07:34 AM.
 
Old 12-21-2012, 11:45 PM   #4
alanv
LQ Newbie
 
Registered: Jun 2010
Distribution: Fedora
Posts: 24

Original Poster
Rep: Reputation: 1
Thumbs up

Hi 1gn1t10n,

Thank you for taking the time to reply to this old question of mine. I just tried it and it works.
 
  


Reply

Tags
merge, pdfs



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: An easy way to Spilt or Merge PDF Files in Linux LXer Syndicated Linux News 0 04-17-2009 03:00 PM
How to force monitor to display vertically instead of horizontally? jsstevenson Linux - Hardware 3 02-04-2008 02:49 PM
merge multiple pdf files esteeven Linux - Software 8 11-21-2007 01:59 PM
How To Merge multiple files into a single PDF ? kkempter Linux - Software 1 10-28-2005 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration