Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Combining PDF files revisited Apps
This is a follow-up to this older hint. I've tried that hint, but was unable to create a PDF file with it.

[Editor's note: I have not tested the following process myself.]

So, what I do now is the following:
  1. Get Latest TeXShop and II2.dmg from the TeXShop home page.

  2. Install them as explained on the TeXShop TeXShop installation page. Now you have a fully functional TeX installation working on OS X with GUI (and also in the terminal if you want).

  3. Say you have three pdf files named file1.pdf, file2.pdf, file3.pdf, which contain respectively 10 pages, 8 pages, 7 pages. The first file is located on the ~/Desktop, the second one in ~/Documents and the third one on another volume in a directory named 'mypdf.' And while we're at it, you want to include a JPEG file which will be enlarged to 4 inches. This last file is located in ~/pictures and named 'myjpg.jpg.'

  4. Open TeXShop and type in the window the following text:
    \documentclass[11pt,a4paper]{article}
    % Allow jpg, pdf graphics inclusion
    \usepackage{graphicx}
    % Allow whole page pdfs to be imported
    \usepackage[final]{pdfpages}
    \begin{document}
    \includepdf[pages={1-10}]{/Users/yourloginname/Desktop/file1}
    \includepdf[pages={1-8}]{/Users/yourloginname/Documents/file2}
    \includepdf[pages={1-7}]{/Volumes/yourvolume/mypdf/file3}
    \includegraphics[width=4in]{/Users/yourloginname/Pictures/myjpg}
    \end{document}
    • Tip #1: It's not necessary to include the extension. If the extension is PDF, change it to pdf before using TeXshop.
    • Tip #2: No space in file path (remove them before using TeXshop).
    • Tip #3: No accent in file path (remove them before using TeXshop).
    • Tip #4: Use English names for directories (Pictures and not Images for French users - you can view the English name with Command-I on the folder, then open the tab name and extension).

  5. Click on Latex button and you'll be done (if there is no error in the console window; TeXshop apparently does not like empty pages).
The new PDF is created in ~/Documents, but you can change the default location. This way, you can extract pages from a pdf with:
 \includepdf[pages={4-7}]{file1}
(extract pages 4 to 7) or:
 \includepdf[pages={4,7}]{file1}
(extract page 4 and page 7). You can also merge PDF files partially.
    •    
  • Currently 4.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[17,792 views]  

Combining PDF files revisited | 8 comments | Create New Account
Click here to return to the 'Combining PDF files revisited' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
includepdf
Authored by: VEGx on Dec 09, '02 01:56:46PM

Could I have the "includepdf" package? I've got tetex installed via `fink' so I don't have to go and install it manually. hence, were can I get the package only?



[ Reply to This | # ]
includepdf
Authored by: charly on Dec 11, '02 02:25:36AM

Go to www.ctan.org (Comprehensive TeX Archive Network) and run a search for "pdfpages" (name of the package, as it is used in the preamble of the LaTeX file in this hint).



[ Reply to This | # ]
PStill
Authored by: mithras on Dec 09, '02 02:07:13PM
I just use PStill in demo mode for my (once in a blue moon) concatenating needs.

[ Reply to This | # ]
Re: includepdf
Authored by: Miga on Dec 09, '02 03:44:51PM

I\'ve tried it but did not get it to work. So I\'ve installed TeXShop on top of the Fink installation.

Maybe you can try LyX, but I don\'t know if it works.



[ Reply to This | # ]
Re: includepdf
Authored by: VEGx on Dec 09, '02 05:18:09PM

can you see if there is a package named "pdfpages" Send it to me if it exists!



[ Reply to This | # ]
texexec is Still the Best Method...
Authored by: Anechoic on Dec 09, '02 04:17:52PM

...IMHO simply because you can use Realbasic or AppleScript Studio to quickly create a gui for the function. See the earlier hint referenced above for the texexec syntax.



[ Reply to This | # ]
Combining PDF files revisited
Authored by: cekim on Mar 31, '08 10:56:38AM
I use iCombiner to merge my PDF files -- tt has both an elegant and ultra-efficient drag and drop interface.

[ Reply to This | # ]
Combining PDF files revisited
Authored by: slambert on Apr 01, '08 12:36:27PM

In Preview, you can drag and drop pages from the sidebar of one document to the side bar of another. Use shift click and command click in the usual way to select multiple pages.

Love the Leopard!

-Scott



[ Reply to This | # ]