Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a PDF (generated by PowerPoint) containing 8.5×5.5 inch portrait pages.

I need to convert it to 8.5×11 inch landscape pages where each landscape page contains two copies of the original (smaller) portrait page side-by-side.

In ASCII art:

 Original  |    Desired
           | 
  |---|    |  |---| |---|
  | 1 |    |  | 1 | | 1 |
  | 1 |    |  | 1 | | 1 |
  |---|    |  |---| |---|
           |
  |---|    |  |---| |---|
  | 2 |    |  | 2 | | 2 |
  | 2 |    |  | 2 | | 2 |
  |---|    |  |---| |---|

Is there any free way to do this, or will I need to do it in C#?

share|improve this question
6  
+1 for awesome ascii art :) –  jtimberman Jan 15 '10 at 2:40
add comment

3 Answers

up vote 3 down vote accepted

"Print" it using pdfcreator (open source virtual printer driver).

//edit: One more option is using pdftk (http://www.accesspdf.com/pdftk/), but I haven't tested it myself.

share|improve this answer
    
I don't see how to duplicate pages in PDF creator (See my ASCII art) –  SLaks Jan 15 '10 at 2:47
    
Now I tested it. In pdf print dialog I chose to copies and printing multiple pages per sheet. Unfortunately it groups pages instead of putting to copies on thesame page :(. I'm sorry for non tested answer. –  Maciek Sawicki Jan 15 '10 at 2:58
    
If I play with collation, it might work. Where did you specify multiple pages per sheet? –  SLaks Jan 15 '10 at 3:01
    
In print dialog in Acrobat Reader, but unfortunately collate option looks broken for printing multiple pages per sheet. I also set double size in printer properties (properties button print dialog in Acrobat Reader). How about copping slides in PowerPoint? –  Maciek Sawicki Jan 15 '10 at 3:05
1  
The slides use multiple masters pages with different formatting. I tried writing a macro to copy them, but I couldn't make it handle the formatting correctly. –  SLaks Jan 15 '10 at 3:10
show 1 more comment

OK, you solved it by having access to the source file of your PDFs, the Powerpoint file. What could you do if you want to achieve the same thing without access to the sources?

Let me give this a shot. I'll be using...

  1. Ghostscript for placing and shifting the input PDF pages onto the new media size;
  2. pdftk to overlay two different PDF pages onto one.

First step: Ghostscript to place images on larger media

Here is what we want to achieve with the help of Ghostscript in this step:

+-----------+-----------------------+
| Original  |  Ghostscript-output   |
+===========+=======================+
|  +---+    |  +---+---+  (right    |
|  | p |    |  | p |   |   half     |
|  | 1 |    |  | 1 |   |   of sheet |
|  +---+    |  +---+---+   empty)   |
|           |                       |
|  +---+    |  +---+---+  (left     |
|  | p |    |  |   | p |   half     |
|  | 2 |    |  |   | 2 |   of sheet |
|  +---+    |  +---+---+   empty)   |
+-----------+-----------------------+

This is the first command to use:

gswin32c.exe ^
 -o left-side-outputs.pdf ^
 -sDEVICE=pdfwrite ^
 -g7920x6120 ^
 -dPDFSETTINGS=/prepress ^
 -c "<</PageOffset [0 0]>>setpagedevice" ^
 -f powerpoint.pdf

I shifted all page images by... nothing, but placed them on a bigger sheet. I'm too lazy to type and explain all the options needed to select the odd page numbers only, so for now I simply do this for all pages. -- So this is what we did achieve for now:

+-----------------------+
|  Ghostscript-output   |
+=======================+
|  +---+---+  (right    |
|  | p |   |   half     |
|  | 1 |   |   of sheet |
|  +---+---+   empty)   |
|                       |
|  +---+---+  (right    |
|  | p |   |   half     |
|  | 2 |   |   of sheet |
|  +---+---+   empty)   |
|                       |
|  +---+---+  (right    |
|  | p |   |   half     |
|  | 3 |   |   of sheet |
|  +---+---+   empty)   |
|  .........            |
+-----------------------+
 (left-side-outputs.pdf)

Now putting all images to the right:

gswin32c.exe ^
 -o right-side-outputs.pdf ^
 -sDEVICE=pdfwrite ^
 -g7920x6120 ^
 -dPDFSETTINGS=/prepress ^
 -c "<</PageOffset [396 0]>>setpagedevice" ^
 -f powerpoint.pdf

This is what we achieved with the second command:

+-----------------------+
|  Ghostscript-output   |
+=======================+
|  +---+---+  (left     |
|  |   | p |   half     |
|  |   | 1 |   of sheet |
|  +---+---+   empty)   |
|                       |
|  +---+---+  (left     |
|  |   | p |   half     |
|  |   | 2 |   of sheet |
|  +---+---+   empty)   |
|                       |
|  +---+---+  (left     |
|  |   | p |   half     |
|  |   | 3 |   of sheet |
|  +---+---+   empty)   |
|  .........            |
+-----------------------+
 (right-side-outputs.pdf)

Second step: use pdftk.exe to overlay pairs of pages.

In case you haven't installed it yet, download it from here. It doesn't require a real installation. It's an .exe file which runs from every location. We want to make the result look like this:

+---------------------+-------------+
| pdftk input         | pdftk output|
+=====================+=============+
| +---+---+ (right    | +---+---+   |
| | p |   |  half     | | p | p |   |
| | 1 |   |  of sheet | | 1 | 2 |   |
| +---+---+  empty)   | +---+---+   |
|                     |             |
| +---+---+ (left     |             |
| |   | p |  half     |             |
| |   | 2 |  of sheet |             |
| +---+---+  empty)   |             |
+---------------------+-------------+

We will use these commands:

pdftk.exe ^
   A=left-side-outputs.pdf ^
   B=right-side-outputs.pdf ^
   cat A1 B2  ^
   output 2up-powerpoint-page-1.pdf ^
   verbose

pdftk.exe ^
   A=left-side-outputs.pdf ^
   B=right-side-outputs.pdf ^
   cat A3 B4  ^
   output 2up-powerpoint-page-2.pdf ^
   verbose

OK, so far we only created the first two double-up pages... However, I now want to concatenate these two double-pages into a single file:

pdftk.exe ^
  A=2up-powerpoint-page-1.pdf ^
  B=2up-powerpoint-page-2.pdf ^
  cat A B ^
  output 2up-powerpoint-all.pdf

You should now have enough inspiration to process the remaining pages... if you are super-ambitious, you'll even script that with one single commandline, using two nested for /l ... loops ;-)

share|improve this answer
add comment

I solved this by generating a second PowerPoint presentation with two copies of each slide, saving it to PDF, and printing the PDF with two pages per sheet.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.