- How to remove pages from a PDF from your Linux PC
- How to remove pages from a PDF with LibreOffice Draw
- With pdftk
- And separate a PDF by single pages?
- How to remove images from a PDF file
- 4 Answers 4
- Examples
- How do I delete a page from a PDF in Okular?
- 5 Answers 5
- Best PDF Editors for Linux to Edit the PDF Content and Extract Pages to Merge in Other PDF Files
- Best PDF editors for Linux for editing the content of the PDF files
- 1. LibreOffice Draw
- How to install LibreOffice?
- 2. Okular
- How to install Okular?
- 3. Scribus
- How to install Scribus?
- 4. Qoppa PDF Studio [Not FOSS]
- How to install PDF Studio?
- 5. Master PDF Editor [Not FOSS]
- How to install Master PDF Editor?
- Best PDF Editors for Linux to merge, split and extract PDF files
- 6. PDF Mix Tool
- 7. PDFsam
- How to install PDFsam Basic?
- 8. PDFArranger
- 9. PDF Chain
- How to install PDF Chain?
- 10. PDF Slicer
- Wrapping Up
How to remove pages from a PDF from your Linux PC
In my opinion, saving the documents in PDF is the best option. A PDF does not take up much space and it is also capable of saving a file with the highest quality, a quality that is maintained even when we enlarge the images. But sometimes a PDF has not been created by us or we have created it, for example, from a web page. What do we do with the information we have left over? Remove pages from a PDF Is the best option.
Removing pages from a PDF is very easy. The problem is that many of us have the preconceived idea that a PDF file cannot be edited; by extension, if it cannot be edited, pages cannot be removed. But this is an idea that we have internalized because this was the case a long time ago. Nowadays, PDFs can be edited and, so far this article is about, deleting pages of information that we do not want to keep.
Table of Contents
How to remove pages from a PDF with LibreOffice Draw
LibreOffice Draw It is a very powerful program that surprises both for the possibilities it offers and for its ease of use. Removing pages from a PDF with LibreOffice Draw is so simple that it’s hard to figure out how to do it. I explain it to you below:
- To remove pages from a PDF with LibreOffice Draw we must first open the document with this program. We can do it either from the «File / Open» menu or by right clicking on the document and choosing LibreOffice Draw as the application to open it.
- Once inside you will see something like the following:
- The next step is to mark the page that we want to delete, more specifically its thumbnail in the left panel.
- If we keep the wrong idea that a PDF cannot be deleted, we will never think how easy it is to do it: the «miracle» will happen with just pressing the «Delete» key. You will see that the page disappears.
- Finally, we go to «File / Export to PDF» to save the new document without extra pages. Make no mistake choosing «Save» because LibreOffice it has its own formats and by default it saves it in its own way. You have to «Export».
What did you not imagine that it would be so easy?
With pdftk
As in Linux we have so many options and one of them likes some more than others, we can also do it from the terminal. This requires the pdftk (PDF Tookit) tool. It actually costs more than doing it with LibreOffice Draw, but we will also provide you with information to do something that is easier with pdftk: separate a PDF by pages. To remove pages from a PDF with this tool we will have to do the following:
- We install the tool with the command sudo snap install pdftk o sudo apt install pdf-java.
- I have a PDF that I have created from Firefox called mozilla.pdf. It has 5 pages and I am going to take away the third one. To do this I will open a terminal and write:
From the above we have:
- mozilla.pdf is the document I want to edit.
- cat is the order.
- 1 2 y 4-end they are the pages that it will keep or, what is the same, it will eliminate the third because it will keep 1, 2 and 4 until the end (end).
- output tells you that the next will be the new document.
- documento.pdf is the document you will create without page 3.
- Remember that in this and other commands, when the files are being mentioned, it is understood that the full path goes before, such as /home/pablinux/Escritorio/mozilla.pdf.
- If after pressing Enter it does not show anything, it is assumed that it is because everything has gone well. We will only see errors if we have forgotten part of the command or if something has failed.
And separate a PDF by single pages?
As we mentioned earlier, pdftk it also allows us separate the whole PDF by pages one by one. Right now I can’t think of any reason why this would be useful, but I’m commenting on it as information in case it works for anyone. The command would be the following, taking into account that «mozilla.pdf» is the document that I want to divide by pages:
As with the previous command, if everything went well it will not display a message after pressing Enter. The only important thing here is to know what it does with the file once it is split: save it in our personal folder (with names pg_0001, pg_0002, pg_003, etc, where «pg» matches the page number) and creates a file with metadata called doc_data.txt in the same path. Among the information stored in this .txt we have the number of pages that were in the original, if we had used a marker, the date of creation and even the program with which it was created and the version of it.
Personally and as I always say, I usually choose the options that allow me to perform all my tasks from one user interface or GUI. But sometimes, using a command line, especially if we are quick to write or create a .dekstop / script, may be a better option, and as an example it is worth separating the pages of a PDF with pdftk. What do you prefer: do it with LibreOffice or a similar program or with tools that are used from the Terminal such as pdftk?
The content of the article adheres to our principles of editorial ethics. To report an error click here!.
Источник
How to remove images from a PDF file
I’ve got a rather large (
100MB) PDF document with lots of images in it (as illustrations and background images), and I’d like to have a copy of that pdf without images but I can’t find out how to do that.
I’m not talking about converting it to text only, I’d like to keep paragraphs/tables/multi-columns as they are.
I’m comfortable with command line and have several computers with different distributions that I can use.
4 Answers 4
The latest releases of Ghostscript can do this too. Just add the parameter -dFILTERIMAGE to your command.
The are even two more new parameters which can be added in order to selectively remove content types «vector» and «text»:
-dFILTERIMAGE : produces an output where all raster images are removed.
-dFILTERTEXT : produces an output where all text elements are removed.
-dFILTERVECTOR : produces an output where all vector drawings are removed.
Any two of these options can be combined. (If you combine all 3, you’ll get all pages getting blanked. )
Examples
Here is the screenshot from an example PDF page which contains all 3 types of content mentioned above:
Screenshot of original PDF page containing «image», «vector» and «text» elements.
Running the following 6 commands will create all 6 possible variations of remaining contents:
The following image illustrates the results:
Top row, from left: all «text» removed; all «images» removed; all «vectors» removed. Bottom row, from left: only «text» kept; only «images» kept; only «vectors» kept.
Источник
How do I delete a page from a PDF in Okular?
Didn’t see an option in the menus or any documentation on what I imagine is something simple:
I have a multi-page PDF and want to delete a specific page within Okular’s GUI.
5 Answers 5
There is no way to remove a page in Okular. However, it can refresh modified PDF document automatically so there is no need to re-open the document manually after modifying it in external tool such as pdftk . To remove a given page use cat option and specify a range of pages you’d like to keep in the target PDF file. For example, if you want to remove 5th page in document.pdf execute the following command:
LibreOffice draw didn’t work for me, as it munted the formatting. However, Xournal allowed me to remove (and re-arrange) pages while preserving the original document formatting.
Use LibreOffice «draw» to open the pdf file, delete the pages you want and then EXPORT it as a pdf. done.
I always try to reduce the dependency-trail of my installed packages. For pdftk I would have to install 16 additional Java dependencies on my Gentoo system .
So (at least for completeness sake) I wanted to point out, that you can use Ghostscript for this task. It is preinstalled on most Linux systems.
Let’s say you want to delete page 2,7,9 and 14 of you document:
The trailing dash after 15 indicates, that you want to keep all the pages from 15 to the end of the document.
So if you want to delete only page 5 you would issue:
(Be aware that page numbers have to be in ascending order)
Источник
Best PDF Editors for Linux to Edit the PDF Content and Extract Pages to Merge in Other PDF Files
Last updated October 29, 2020 By Ankush Das 152 Comments
Almost all Linux distributions come with a PDF viewer but not necessarily a PDF editor. Don’t worry. There are plenty of PDF editors for Linux that you may install and use.
For the most part, you may be looking to achieve some basic tasks like merging, deleting pages, and similar on a PDF editor. But, you may also have a reason to edit the content in a PDF file.
So, when I talk about how to edit PDF files in Linux, it’s for both the use-cases i.e basic and advanced usage.
In other words, PDF editors can be categorized as follows:
- PDF editors that let you edit the content (annotate, highlight, change text, add/remove images etc)
- PDF editors that let you modify the files by merging files, splitting files, extracting pages from files etc.
In this article, I’m going to list the best PDF editors available for Linux accordingly.
Some applications mentioned here are not open source. They are listed here because they are available on Linux and the article’s focus is on Linux. Such applications are duly marked non-FOSS so that you can make a decision yourself.
Best PDF editors for Linux for editing the content of the PDF files
Just to be clear, I’ve tested this on Pop OS 20.04 but you can easily try them on other Linux distributions as well.
1. LibreOffice Draw
Key Features:
- Edit the text in a file
- Add text/images in the file
- Manipulate the existing content
- Supports creating PDF files
- Cross-platform
LibreOffice draw provides a handy way of editing a PDF file. If your requirements are limited and mostly text editing in a PDF document, Draw will serve your purpose. It may not be a full-fledged PDF editor and comes with some limitations but it’s worth trying out.
In case you’re curious, we also have a detailed article on how to edit PDF files using LibreOffice Draw.
How to install LibreOffice?
LibreOffice is free, open source, and comes bundled with most of the distributions. You will not find it as a separate software — but as a part of the LibreOffice suite.
2. Okular
Key Features:
- Different annotation options as part of its review feature
- Cross-platform
Okular is a popular free and open source document viewer developed by KDE which includes basic PDF editing features.
Once you open a PDF file in Okular, you can copy a part of the text to the clipboard by selecting it, or save it as an image.
You can navigate your way through Tools > Reviews menu to get other options like adding pop-ups notes, inline notes, freehand line drawing, highlighter, stamp and other features.
Okular can pretty much handle your basic PDF editing tasks, however, for advanced editing, it may not be that much useful.
How to install Okular?
Okular is available in the software repository of almost all major Linux distributions. You can install it from your software center.
In either case, you can also build it from source through KDE’s website.
3. Scribus
- Highlight text content
- Add text boxes and other elements
- Move the existing text of a PDF file to re-position it or delete it
Scribus isn’t exactly a PDF editor — but it offers the necessary features to highlight, add content, and a few more things in a PDF file.
It is a useful open-source desktop publishing tool which you can use to make advertisement posters, and write books among other things. For PDF editing, you can surely use it to highlight the text, move the text, add texts, and other objects to improve the PDF file.
Also, it’s a cross-platform open-source tool which makes it even more interesting.
How to install Scribus?
You should find it listed in your software center to easily get it installed. In either case, you can also opt for the Flatpak package available.
I’d suggest going through our Flatpak guide if you don’t know about it.
Also, you can check out its official download page for more options for FreeBSD, macOS, Windows, and others.
4. Qoppa PDF Studio [Not FOSS]
Key Features:
- Edit text contents and properties, shapes and path objects, move and resize images and optimize PDFs to reduce file size.
- Add sticky notes, text boxes, freehand annotations, hyperlinks, headers, footers etc.
- Add password to a PDF document and digitally sign a PDF document.
- Supports advanced features, such as text search, touch mode for laptops, comparing two PDFs side by side, rulers and grid views.
- Cross-platform
PDF Studio is a commercial PDF editor from Qoppa Software that has all the necessary editing features. You can create, review and edit a PDF file.
It’s not a free software, but at least you can try out the full version as a trial. Also, it’s good to see that they offer a one-time purchase. You can compare the editions in their official website and opt for the best one.
How to install PDF Studio?
You can get the .deb package from its official download page and get it installed on Ubuntu distros. If you don’t know, read our guide on how to install DEB files to learn about it.
For any other Linux distribution you can just download the installer script available in official download page and type in the following command from the target directory. The file name may be different — so make sure you verify that.
5. Master PDF Editor [Not FOSS]
Key Features:
- Add or edit text in a PDF file, insert images, change the size of objects and copy objects from a PDF file to the clipboard
- Provides powerful annotation tools, such as sticky notes, measuring tools and shapes as well as enhance capabilities such as strike through, underline and highlights
- Support creation, editing and filling of PDF forms
- Edit scanned documents and documents containing images
- Merge or split a PDF file; create, edit or remove bookmarks
- Supports digital signature and much more
- Cross-platform
Master PDF Editor is yet another proprietary application for editing PDF files. With Master PDF Editor, you can do almost everything ranging from editing a PDF file to editing scanned documents.
You can use it for free — but the unregistered version will have a watermark in your PDF files. If you want to get rid of the watermark, you can choose to purchase it.
How to install Master PDF Editor?
Both .deb and .rpm package are available to download and you can get them from its official download page.
You will also find a Flatpak package on Flathub that you can install. If you don’t know about Flatpak, you may want to follow our tutorial on using Flatpak in Linux. So, you may not find it in your software center unless it supports Flatpak.
Best PDF Editors for Linux to merge, split and extract PDF files
If you don’t really want to edit the content of a PDF file, you have still a lot of things to do like merging, deleting, editing the layout, and so on. So, for all those requirements, let me highlight a few more options:
6. PDF Mix Tool
Key Features:
- Merge files
- Rotate pages
- Split, extract, delete, and add pages
- Edit layout of the pages
PDF Mix tool is an impressive open source application for basic PDF file editing tasks that includes extracting pages, deleting, adding, or merging files.
If you’re curious, we also have a separate article for PDF Mix Tool to explore more about it along with the installation instructions. You can also head right to the official website to download it.
7. PDFsam
Key Features:
- Split, merge, rotate, and extract files
- Optional paid editions to edit PDF files with more advanced features to edit the PDF content
- Cross-platform
PDFsam (basic edition) is a free and open-source tool that lets you easily split, merge, rotate, and extract PDF files.
You may not get the ability to edit the content of a PDF file — but it offers two paid editions with yearly subscription plans (in their official website) that offers more advanced features if you want them and like PDFsam in general.
How to install PDFsam Basic?
PDFsam Basic should be available in the software center of your Linux distribution. In either case, you can head to its official download page to get the portable archive file or the .deb file.
As usual, you can follow our guide to install deb files if you didn’t know already.
8. PDFArranger
Key Features:
- Rotate pages
- Split/Delete pages
- Crop pages
- Drag and drop to re-arrange
- Cross-platform (Windows and Linux)
PDFArranger is a simple open-source tool to re-arrange, merge, split, and rotate pages of a PDF file. It is originally a fork of PDF-Shuffler project which is no longer developed.
Unless you’re looking for more features, you should be good to go with this. You can learn more about its features along with the installation instructions in our separate article on PDFArranger.
9. PDF Chain
Key Features:
PDF Chain is simply a Graphical User Interface (GUI) for PDF Toolkit (PDFtk). Basically, when you use the GUI, it executes the commands necessary to complete the tasks.
Even though PDFtk isn’t directly available on Linux, there’s a port of PDFtk for Linux that uses Java. You need to have it installed for PDF Chain to work. If you’re curious, you can refer PDFtk GitLab page for installation instructions. But, for the most part, you can just use Synaptic Package Manager to install PDFtk-java.
How to install PDF Chain?
You can install PDF chain from the software center itself. If you’re looking to install it on other Linux distributions, you can refer the official website for information.
10. PDF Slicer
Key Features:
- Rotate Pages
- Merge pages
- Delete pages and rotate pages
PDF Slicer is a quite simple open-source tool that helps you extract, rotate, merge, and render PDF files.
You can find it in the software center or simply install the Flatpak package available. If you’ve missed reading our Flatpak guide, you might want to check that.
Wrapping Up
While most of the options available are completely free and open-source — but for some power users, some paid options and proprietary options also exist on Linux.
So, depending on you what you want, you can try the tools mentioned and decide for yourself.
Did we miss any of your favorite tools available for Linux to edit PDF files? Let me know your thoughts in the comments below.
Like what you read? Please share it with others.
Источник