Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

Remove blank pages from pdf document

This forum is intended for the discussion around the use of MEPIS in an office setting as distinct from home or indivicual usage. Examples include mail merge, database construction, hardware sharing, advertising, etc..
Message
Author
User avatar
eemaestro
Forum Guide
Forum Guide
Posts: 1010
Joined: Wed Aug 02, 2006 12:12 pm

Remove blank pages from pdf document

#1 Post by eemaestro » Mon Jul 13, 2015 12:51 pm

In the past, I had to learn how to consolidate multiple pdf's, in multiple files, into one pdf document.
Now, I need to do the opposite. For some reason, a spreadsheet which I imported into Libreoffice Calc
has two pages with content with an additional two blank pages appended. How can I remove the two blank pages from the pdf file ?
Utilities on my system:

Code: Select all

$ ls /usr/bin/pdf*
/usr/bin/pdf2dsc    /usr/bin/pdfimages    /usr/bin/pdftexi2dvi  /usr/bin/pdftops
/usr/bin/pdf2ps     /usr/bin/pdfinfo      /usr/bin/pdftocairo   /usr/bin/pdftotext
/usr/bin/pdfdetach  /usr/bin/pdfopt       /usr/bin/pdftohtml    /usr/bin/pdfunite
/usr/bin/pdffonts   /usr/bin/pdfseparate  /usr/bin/pdftoppm
Will also poke around in Calc's menus to see if I can find something about removing pages.

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 22420
Joined: Wed Jul 19, 2006 6:13 am

Re: Remove blank pages from pdf document

#2 Post by Jerry3904 » Mon Jul 13, 2015 12:58 pm

Pdfshuffler is great for this.
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

User avatar
Richard
Posts: 2023
Joined: Fri Dec 12, 2008 10:31 am

Re: Remove blank pages from pdf document

#3 Post by Richard » Mon Jul 13, 2015 1:13 pm

Yes, pdfshuffler is a great tool for moving and arranging pages.
If you need even more capabilities, try

Code: Select all

qpdf --help
MX171 on Lenovo T430-2017: i5-3320M, 8 GBRAM, 4.15.0-1-amd64, intel_pstate, 119GB SSD
MX171 on AA1(ZG5) & EeePC-1005ha: Dual Core N270, 1 GBRAM, 4.15.0-1-686-pae, 150GB HDD
DC9, LibO61, Dbox, PM, FF, mPDFed, CherryT, Vbox. __ Linux Counter #208633

User avatar
eemaestro
Forum Guide
Forum Guide
Posts: 1010
Joined: Wed Aug 02, 2006 12:12 pm

Re: Remove blank pages from pdf document

#4 Post by eemaestro » Mon Jul 13, 2015 2:23 pm

Okay, I installed pdfshuffler from the repository and used it. So simple even I could figure it out. Thank you for pointing me in the right direction, Jerry3904.
Now I can print my pdf from Okular, hopefully, without first selecting the last page on which data appears.

I don't have qpdf installed presently. I see that it will password-protect a pdf file. If I required a password to view a pdf, would it possible for another user to view that pdf under different operating system (MS, Apple) if I give her the password? If not, wouldn't that make my pdf non-portable? The whole idea behind pdf's ("portable document file")is to make the content visible to anybody with access to the password, regardless of what OS they use.


Besides password protection, is there anything else qpdf can do that the /usr/bin/pdf utilities cannot do ?

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 22420
Joined: Wed Jul 19, 2006 6:13 am

Re: Remove blank pages from pdf document

#5 Post by Jerry3904 » Mon Jul 13, 2015 2:48 pm

For future reference, we have a nice PDF resource in the MX/antiX Wiki:

http://mepiscommunity.org/wiki/applications/pdf
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

User avatar
Richard
Posts: 2023
Joined: Fri Dec 12, 2008 10:31 am

Re: Remove blank pages from pdf document

#6 Post by Richard » Mon Jul 13, 2015 3:01 pm

eemaestro wrote:...
Besides password protection, is there anything else qpdf can do that the /usr/bin/pdf utilities cannot do ?
It can remove password protection.
Ever forget a password?
MX171 on Lenovo T430-2017: i5-3320M, 8 GBRAM, 4.15.0-1-amd64, intel_pstate, 119GB SSD
MX171 on AA1(ZG5) & EeePC-1005ha: Dual Core N270, 1 GBRAM, 4.15.0-1-686-pae, 150GB HDD
DC9, LibO61, Dbox, PM, FF, mPDFed, CherryT, Vbox. __ Linux Counter #208633

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 22420
Joined: Wed Jul 19, 2006 6:13 am

Re: Remove blank pages from pdf document

#7 Post by Jerry3904 » Mon Jul 13, 2015 3:36 pm

I will add that to our nice little resource--thanks!
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

User avatar
eemaestro
Forum Guide
Forum Guide
Posts: 1010
Joined: Wed Aug 02, 2006 12:12 pm

Re: Remove blank pages from pdf document

#8 Post by eemaestro » Mon Jul 13, 2015 4:32 pm

Thank you all for taking time to help me.
I haven't yet used passwords on a pdf. Nor have I received a password-protected pdf. So I wouldn't have had the need to remove one.
I thought using a password to restrict access to a pdf was a good idea. But now that I know qpdf can remove password protection, I don't think it's a good idea. What's the point in password protection if qpdf can remove the password protection if you forget the password ? However, I haven't used qpdf. So my opinion might be borne of ignorance.
Last edited by eemaestro on Tue Jul 21, 2015 1:40 pm, edited 1 time in total.

User avatar
eemaestro
Forum Guide
Forum Guide
Posts: 1010
Joined: Wed Aug 02, 2006 12:12 pm

Re: Remove blank pages from pdf document

#9 Post by eemaestro » Mon Jul 20, 2015 3:20 pm

Today I used pdfshuffler to cut & paste pages from four different documents--a Libreoffice .odt document and three pdf's into one pdf document. I used the "Export as PDF" button in Libreoffice to change it to pdf. Only one pdf gave me trouble. I had copied it and then tried to delete unwanted pages from the copy. pdfshuffler said it was encrypted. It wasn't encrypted. I could read it. However, I made a copy, gave write & exec priv's to all to the copy, and tried again. Same message. I skipped this document (It was the warranty for my Toshiba external hard drive. ) and chose a different one instead.

I did NOT try to cut & paste from within a page. Does pdfshuffler do that?
I don't think so. Would probably need a different utility to do that.

I got the final pdf document I wanted, which is a composite of pages from four different documents. I am pleased with this utility. The only CAVEAT is when saving, pdfshuffler DOES NOT prompt before overwriting an existing file.

I also used pdfshuffler to combine scanned images of two different pages (scanned on my flatbed scanner) into one pdf document. Nice.

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 22420
Joined: Wed Jul 19, 2006 6:13 am

Re: Remove blank pages from pdf document

#10 Post by Jerry3904 » Mon Jul 20, 2015 8:11 pm

I did NOT try to cut & paste from within a page. Does pdfshuffler do that? I don't think so. Would probably need a different utility to do that.
Nope. You would have to use something else to cut a passage from a PDF page and paste it into another. Check that Wiki entry again for suggestions.
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

Post Reply

Return to “Office”