LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-17-2024, 11:17 PM   #1
linux-man
Member
 
Registered: Nov 2016
Location: Geneva
Distribution: native install of Parrot Home Edition 5.0 Debian (no security tools) 64 bit, KDE, 5.14.0-9parrot1,
Posts: 872

Rep: Reputation: Disabled
I only need page 2 of a three page document using qpdf


I only need page 2 of a three page pdf
If the pdf file is called "mypdf" then would the code look something like this (below)?

Code:
qpdf mypdf.pdf --pages . 2-2 -- mypdf.pdf s
Or is there a simpler way without downloading office suite or acrobat?
Thanks in advance

Last edited by linux-man; 01-17-2024 at 11:21 PM.
 
Old 01-18-2024, 05:50 AM   #2
RandomTroll
Senior Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 1,963

Rep: Reputation: 271Reputation: 271Reputation: 271
I use pdfseparate.
 
Old 01-18-2024, 05:52 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Since your profile says you use KDE you will probably have Okular already installed. Open the .pdf with that, it allows you to choose which pages to print.
 
1 members found this post helpful.
Old 01-18-2024, 09:06 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,706

Rep: Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898Reputation: 5898
That would be
Quote:
qpdf mypdf.pdf --pages . 2 -- page2.pdf
As suggested pdfseparate
Quote:
pdfseparate -f 2 -l 2 mypdf.pdf page2.pdf
with pdftk
Quote:
pdftk A=mypdf.pdf cat A2 output page2.pdf
With ghostscript and psutils installed
Quote:
pdftops mypdf.pdf - | psselect -p2 | ps2pdf14 - page2.pdf
Also as suggested open mypdf.pdf in a pdf reader, select "print to file" and page 2.

Last edited by michaelk; 01-18-2024 at 09:51 AM.
 
2 members found this post helpful.
Old 01-18-2024, 10:36 AM   #5
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,142

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
Pdftk can be simpler than that:
Code:
pdftk mypdf.pdf cat 2 output page2.pdf
Remember to set the working directory to where the pdf is first!
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Have PDFTK or QPDF, convert an HTML file to a PDF BudiKusasi Linux - Software 3 10-16-2021 07:57 AM
LXer: How to create a document in LaTeX using the LyX document processor LXer Syndicated Linux News 0 10-01-2014 03:41 PM
html; character encoding per document tag, not whole document TheLinuxDuck Programming 0 08-14-2008 11:12 AM
how do i create a document, then a directory and save the document in it. jtdodge Linux - Newbie 9 06-15-2005 11:03 AM
Convert openoffice document into ms document through cli? bruno buys Linux - Software 0 07-05-2004 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration