Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cutting PDF
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6387
Location: Saint Amant, Acadiana

PostPosted: Wed Jul 11, 2018 4:04 pm    Post subject: Cutting PDF Reply with quote

Anyone knows how to extract part of PDF?
I tried pdfseparate, it created 50 files (correct, that's what I wanted) from 10.9 MB input file, each output file is 10.8 MB. Of course, then pdfunite creates a huge file from these. Is there a sane way to do it keeping the file size normal?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 5399
Location: Removed by Neddy

PostPosted: Wed Jul 11, 2018 6:13 pm    Post subject: Reply with quote

Print and then scan to pdf



Or use pdftk
_________________
The best argument against democracy is a five-minute conversation with the average voter
Great Britain is a republic, with a hereditary president, while the United States is a monarchy with an elective king
Back to top
View user's profile Send private message
patrix_neo
Guru
Guru


Joined: 08 Jan 2004
Posts: 445
Location: The Maldives

PostPosted: Wed Jul 11, 2018 6:56 pm    Post subject: Reply with quote

I do assembling of pdf:s all week at work, but how to split, I would suggest looking in to ghostscript. It can read page for page if executed right. At least when it comes to screenshot of a page.
Btw, ImageMagick is great to normalize sizes of pdf:s.

Here is a gateway to ImageMagick : http://www.fmwconcepts.com/imagemagick/index.php

Howto resize with ghostscript (untried by me)

Code:

gs \
 -o output.pdf \
 -sDEVICE=pdfwrite \
 -sPAPERSIZE=a4 \
 -dFIXEDMEDIA \
 -dPDFFitPage \
 -dCompatibilityLevel=1.4 \
  input.pdf
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6387
Location: Saint Amant, Acadiana

PostPosted: Wed Jul 11, 2018 7:52 pm    Post subject: Reply with quote

http://asclinux.com/tmp/87_Electrical.pdf

I want to cut off the cruft and the output should have pages 57-110. Anyone wants to try? :P
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 5399
Location: Removed by Neddy

PostPosted: Wed Jul 11, 2018 8:02 pm    Post subject: Reply with quote

Jaglover wrote:
http://asclinux.com/tmp/87_Electrical.pdf

I want to cut off the cruft and the output should have pages 57-110. Anyone wants to try? :P


https://drive.google.com/file/d/12BiSqJuE1sMulvs4UPjqZmDctBIkl9nS/view?usp=sharing

qpdf 87_Electrical.pdf --pages 87_Electrical.pdf 57-110 -- out.pdf
_________________
The best argument against democracy is a five-minute conversation with the average voter
Great Britain is a republic, with a hereditary president, while the United States is a monarchy with an elective king
Back to top
View user's profile Send private message
patrix_neo
Guru
Guru


Joined: 08 Jan 2004
Posts: 445
Location: The Maldives

PostPosted: Wed Jul 11, 2018 8:10 pm    Post subject: Reply with quote

Ridiculous...ly awesome.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 6387
Location: Saint Amant, Acadiana

PostPosted: Wed Jul 11, 2018 8:41 pm    Post subject: Reply with quote

Thanks! I do have qpdf installed, it never crossed my mind it can do it.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 453
Location: NRW, Germany

PostPosted: Thu Jul 12, 2018 12:40 pm    Post subject: Reply with quote

I think many pdf viewers can do some minor editing.
I know mupdf ships with mutool, though I'm not quite sure what kind of stuff you can do with it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum