Add pdf to pdf linux

Adding pages to existing pdf file

I have a PDF document with over 300 pages. I need to add 15 pages in between — after page 180. How can I do it?

5 Answers 5

You could use pdftk from the commandline:

pdftk A=bigpdf.pdf B=insert.pdf cat A1-180 B A181-end output output.pdf

Or if you want a GUI you could use PDFsam (PDF split and merge), PDFjam or jPDFTweak. (PDF Shuffler has already been mentioned.)

It was from 191 page that I had to add other pages. Using the following command pdftk A=251.pdf B=542.pdf A1-191 B A191-end output output.pdf gave me this error A1-191 not found as file or resource. Error: Failed to open PDF file: A1-191 B not found as file or resource. Error: Failed to open PDF file: B A191-end not found as file or resource. Error: Failed to open PDF file: A191-end Errors encountered. No output created. Done. Input errors, so no output created.

@WaldirLeoncio, A simple way to insert a blank page, regardless of what PDFsam does, is print a blank libreoffice document page using the «print to file» option. Now you have a blank page you can add in.

PDF-Shuffler

PDF Shuffler is an ideal application for this. It allows you to import several PDF files and rearrange the pages. You can also delete the pages you don’t wish to keep in the output PDF.

alt text

Just compared PdfShuffler 0.6.0, PDF Mod 0.9.1 and PDF Split and Merge basic Ver. 1.1.4 (pdfsam). PdfShuffler is basic but simple, my favorite. PDF Mod and PdfShuffler look similar (same icons, same presentation). PDF Mod is better integrated in Gnome Shell. PDF Split and Merge (pdfsam) looks more complex. Hope this comment helps. Cheers 😉

PdfMod works well if you prefer to use a GUI. Install it by typing:

sudo apt-get install pdfmod 

PDFMod appears to be extremely buggy — deleting and inserting pages causes duplicates to appear and so forth.

You can try this GUI tool: uPdf (maintained by atareao.es team)

You can add blank pages, or pages from other documents or insert images, or text.

sudo add-apt-repository ppa:atareao/updf sudo apt-get update sudo apt-get install updf 

Although my answer is not so smart but it will work, let’s call your pdf document to be file.pdf:

  1. Go to Libre office writer and use ctrl + enter for as many blank pages as you want. Save it on the desktop.
  2. Use online doc to pdf convertor. (call it B.pdf)
  3. open file.pdf and type ctrl + p . Following window will pop up:
Читайте также:  Better terminal emulator linux

enter image description here

In the pages field fill the pages that you want to separate. Also click on the file button to save your first 180 pages (call it part A.pdf). Save this as a separate pdf. Similarly save pages from 181 — 300 (call it part C.pdf)

Note: Although it may be little bit tedious but it doesn’t involve any package at all. Using available tools you can get the desired pdf.

Источник

How to Merge PDF Files in Linux

Got several PDFs on the same subject and now you want to combine them into a single PDF?

Or perhaps you need to upload a single file consisting of different files? Many government and academic portals require that.

As a Linux user, if you are in a situation where you need to merge PDFs, this tutorial will help you out.

In this tutorial, I’ll share three methods of combining multiple PDF files:

  • Using PDF Tricks GUI tool
  • Using LibreOffice (allows you to select pages as well)
  • Using the ImageMagick command line tool (Can a Linux tutorial be completed without the terminal method?)

You can read them all and pick the one that works best for you.

Method 1: Use PDF Tricks GUI tool to merge PDF in Linux

After experimenting with several GUI tools, I found that the PDF Tricks was straightforward to use and easy to navigate.

Furthermore, it includes additional functionality beyond only merging PDF files, including:

I am sharing the steps for enabling Flatpak on Ubuntu:

sudo apt install flatpak flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Now, use the below command to install PDF Tricks in your system:

flatpak install flathub com.github.muriloventuroso.pdftricks

Once you are done with the installation, open the PDF Tricks application from the system menu.

On the first run, you will get you a list of actions you can perform with this tool. To merge PDF files, go with the third option, obviously.

merge pdf files using in ubuntu

In the next step, click on Add file and select the files you want to merge:

choose files to merge

Once you select files, click on the Merge button:

click on merge button

And it will open the default file manager of your system. Here you can select where you want to save the merged file and what it should be named:

locate and name the merged pdf file

And that’s it. The combined pdf has been saved.

And if you are looking for a tool, we have a list of the best PDF readers that you can use to read and edit PDF files.

Related read: List of PDF editors available for Linux.

Method 2: Merge PDF Files using LibreOffice

The awesome LibreOffice is capable of handling many PDF related tasks. You can even edit PDF files with LibreOffice Draw tool for adding a digital signature, adding text, and much more.

Читайте также:  Office 2010 linux wine

The good thing is that you don’t need to install another application. LibreOffice is already installed on most distributions, if not all.

Open the file manager and select the PDF files that you want to merge.

Right-click on selected files > Open With Other Application > LibreOffice Draw from there, and it will open selected PDF files.

And it will open every PDF file you selected in a separate LibreOffice Draw instance:

open pdf file in libreoffice

Now, you have to select individual pages or entire PDF file (using Ctrl + A) from the left preview bar and drop it to the preview bar of the file that you want to combine with:

Once you are done with drag and drop, click on the 5th option from the top left, labeled as Export Directly as PDF:

export directly as pdf in libreoffice

And it will open a file manager from where you can locate and name the file:

save merged file from libreoffice

Bonus Tip: Merge PDFs in the command line [For advanced users]

What kind of Linux tutorial would it be if I didn’t include the command line method? To merge PDF files in the command line, you can use ImageMagick.

ImageMagick is actually an image-related tool. PDF files are essentially images and this is why ImageMagick can work with them.

You probably don’t even need to install ImageMagick as it is already installed in most distros by default.

For example, I will be adding 3 PDF files named pdf-1.pdf, pdf-2.pdf, and pdf-3.pdf and will name the final merged PDF file output as MergedFile.pdf (how clever):

convert pdf-1.pdf pdf-2.pdf pdf-3.pdf MergedFile.pdf

Troubleshooting no images defined

If you see a policy error like this:

convert im6.q16: attempt to perform an operation not allowed by the security policy `pdf

The problem is quite easy to solve. You just have to make minor changes in the ImageMagick policy file.

Open the policy file for editing:

sudo nano /etc/ImageMagick-6/policy.xml

And look for the following line:

Now, you have to change the rights=»none» to rights=read|write :

change policy in imagemagick to merge pdf files

Save the changes, and now you can easily merge files using ImageMagick:

merge pdf files using imagemagick in linux terminal

Wrapping Up

Now you know several ways of combining PDF files in Linux. Chances are that the merged PDF file is big in size. If you have to upload the merged PDF file on a portal that has size restrictions, you can compress the PDF file.

Let me know if you face any issues with above discussed methods.

Источник

How to Quickly Merge PDF Files on Linux

In this guide I cover merging PDF files on Linux in two different ways: CLI and GUI.

If you’re comfortable at the command-line there’s a cool tool most Linux distributions come with that can do this task; or if you’re more comfortable clicking your way around there’s a user-friendly app for the task, available in most distro’s repos.

Читайте также:  Watsapp ru web linux

Either way, whether you’re a beginner or an experienced Linux user, by the end of this guide you’ll know how to merge PDF files quickly, easily, and all without affecting the quality of the content inside.

Merging PDF Files on Linux

1. Using pdfunite (CLI)

Combining multiple PDF files from the command-line is a cinch on Linux with open source tool pdfunite. Most Linux distributions have this available out-of-the-box (and on those that don’t, you can install the poppler-utils package to get).

To merge PDFs with pdfunite you just need to tell the tool which PDFs to merge into a single file, and give your combined PDF a file name:

  1. Open a new terminal window
  2. Use cd to enter the directory with the PDF files you want to merge
  3. Run: pdfunite file1.pdf file2.pdf output.pdf
  4. Hit enter to let the tool merge the PDF files

That’s it – you just successfully merged PDF files on Linux using pdfunite .

You can check everything merged correctly by opening the output.pdf file (or whatever file name you chose) in your preferred PDF app/document viewer.

2. Using PDF Arranger (GUI)

For a simple task like merging PDF files the (ably named) PDF Arranger app is ideal.

This Python-based app is available in the repos of most modern Linux distributions, though you’ll need to install it yourself (use your preferred method) first. Either search it out by name or drop to the command line and install, e.g., sudo def install pdf-arranger , etc.

  1. Open PDF Arranger
  2. Drag and drop PDFs on to the window
  3. Click to arrange PDFs in to desired order
  4. Go to Menu > Save As…
  5. Give merged file a name, location

Now, I will point out that this particular Python-based tool can do more than merely merge PDFs. You can use it to split multi-page PDFs in to individual ones, rotate PDFs, and (as you probably can guess from the name) rearrange pages inside of PDFs too.

Wrapping Up

In this post I focused on performing one task quickly. While there are a host of other PDF tools you can use to do the same job these are my go-to faves.

For expanded functionality, like editing PDF metadata, adding watermarks, or password protecting documents, you’ll want to look at more powerful apps. You can find plenty of free, (and not-so-free) ones by searching your distro’s repos or browsing sites like Flathub.

Home > How To > How to Quickly Merge PDF Files on Linux

Joey Sneddon

Joey Sneddon is a purveyor of puns and arbitrator of alliteration. Or at least, that’s what he says. When he’s not blogging about Ubuntu on omg! ubuntu! he’s collecting toys, feeding cats, and trying to master his Arch install…

  • omg! linux! — covering the worlds of linux and open source
    • About
    • Privacy
    • Commenting
    • omg! ubuntu!

    Источник

Оцените статью
Adblock
detector