{"id":7504,"date":"2026-11-30T04:15:41","date_gmt":"2026-11-30T07:15:41","guid":{"rendered":"https:\/\/tucumandevelopers.com\/index.php\/2026\/11\/30\/how-to-extract-pages-from-a-pdf-mac-windows-acrobat-command-line-or-browser\/"},"modified":"2026-11-30T04:15:41","modified_gmt":"2026-11-30T07:15:41","slug":"how-to-extract-pages-from-a-pdf-mac-windows-acrobat-command-line-or-browser","status":"publish","type":"post","link":"https:\/\/tucumandevelopers.com\/index.php\/2026\/11\/30\/how-to-extract-pages-from-a-pdf-mac-windows-acrobat-command-line-or-browser\/","title":{"rendered":"How to Extract Pages from a PDF (Mac, Windows, Acrobat, Command Line, or Browser)"},"content":{"rendered":"<div>\n<div><\/div>\n<p>Unlike our browser tool, qpdf keeps the order you type, so <code>7,1<\/code> puts page 7 first. Its docs note that document-level data such as bookmarks comes from the primary input, and bookmarks pointing at pages you left out will stop working. Use <code>--empty<\/code> in place of the input file to drop that data.<\/p>\n<p>With <a href=\"https:\/\/www.pdflabs.com\/docs\/pdftk-man-page\/\" target=\"_blank\" rel=\"noopener noreferrer\">pdftk<\/a>, separate the ranges with spaces: <\/p>\n<div>\n<pre><code>pdftk report.pdf cat 1 3-4 7 output extracted-pdftk.pdf <\/code><\/pre>\n<div>\n<\/p><\/div>\n<\/p><\/div>\n<p>In Python, <a href=\"https:\/\/pypdf.readthedocs.io\/en\/stable\/user\/merging-pdfs.html\" target=\"_blank\" rel=\"noopener noreferrer\">pypdf&#8217;s<\/a> <code>append<\/code> takes a list of page indexes, which start at 0: <\/p>\n<div>\n<pre><code><span>from<\/span> <span>pypdf<\/span> <span>import<\/span> <span>PdfWriter<\/span> <span>writer<\/span> <span>=<\/span> <span>PdfWriter<\/span><span>(<\/span><span>)<\/span> <span># pages 1, 3, 4, 7 are indexes 0, 2, 3, 6<\/span> <span>writer<\/span><span>.<\/span><span>append<\/span><span>(<\/span><span>\"report.pdf\"<\/span><span>,<\/span> <span>[<\/span><span>0<\/span><span>,<\/span> <span>2<\/span><span>,<\/span> <span>3<\/span><span>,<\/span> <span>6<\/span><span>]<\/span><span>)<\/span> <span>writer<\/span><span>.<\/span><span>write<\/span><span>(<\/span><span>\"extracted-pypdf.pdf\"<\/span><span>)<\/span> <\/code><\/pre>\n<div>\n<\/p><\/div>\n<\/p><\/div>\n<p><a href=\"https:\/\/media2.dev.to\/dynamic\/image\/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto\/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffcv6an4c2rz4l2jbbpyn.png\"><\/a><\/p>\n<p><em>Real output with qpdf 12.2.0, pdftk-java 3.3.3 and pypdf 7.2.0. The &#8220;pages in file&#8221; lines read each page&#8217;s label with pdftotext.<\/em><\/p>\n<h2> <a name=\"other-online-tools\" href=\"#other-online-tools\"> <\/a> Other online tools <\/h2>\n<p>Smallpdf has an <a href=\"https:\/\/smallpdf.com\/extract-pdf-pages\" target=\"_blank\" rel=\"noopener noreferrer\">Extract PDF Pages<\/a> tool that saves your selection as one PDF or as separate files. It&#8217;s free with usage limits, and Smallpdf says uploaded files are deleted after one hour. iLovePDF handles extraction inside <a href=\"https:\/\/www.ilovepdf.com\/blog\/how-to-extract-pages-from-pdf\" target=\"_blank\" rel=\"noopener noreferrer\">Split PDF<\/a>: pick Extract pages, select pages, and tick the box to merge them into one PDF. Its free plan has limited processing, and Premium is $5 a month billed annually or $9 monthly (<a href=\"https:\/\/www.ilovepdf.com\/pricing\" target=\"_blank\" rel=\"noopener noreferrer\">pricing<\/a>). Both upload your file to their servers, which is fine for most documents but worth a thought for contracts or medical records.<\/p>\n<h2> <a name=\"faq\" href=\"#faq\"> <\/a> FAQ <\/h2>\n<p><strong>Does extracting pages change the original PDF?<\/strong><br \/> Not with any method here, unless you tick Delete pages after extracting in Acrobat or delete pages in Preview&#8217;s sidebar.<\/p>\n<p><strong>Can I extract pages in a different order?<\/strong><br \/> Yes with qpdf, pdftk or pypdf, which follow the order you type. Our browser tool keeps the original order, so reorder the new file afterward if you use it.<\/p>\n<p><strong>Why does my page number not match the page I get?<\/strong><br \/> qpdf, pdftk, pypdf and our tool count pages from the start of the file, not by the numbers printed on them. A document with a roman-numeral front section can be off by several pages, so check the thumbnails.<\/p>\n<p><strong>How do I extract pages from a locked PDF?<\/strong><br \/> You need the password. qpdf accepts it with <code>--password<\/code>. In Acrobat, Adobe suggests checking File &gt; Document Properties &gt; Security for restrictions before you start.<\/p>\n<p><strong>Can I do this on a phone?<\/strong><br \/> Yes. A browser tool that processes files on the device, such as our <a href=\"https:\/\/tools.cuelark.com\/extract-pdf-pages\" target=\"_blank\" rel=\"noopener noreferrer\">extract PDF pages tool<\/a>, works in a mobile browser.<\/p>\n<p><em>Cuelark Team<\/em><\/p>\n<\/p><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Fuente: <a href=\"https:\/\/dev.to\/cuelark\/how-to-extract-pages-from-a-pdf-mac-windows-acrobat-command-line-or-browser-1j7b\">Art\u00edculo original<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unlike our browser tool, qpdf keeps the order you type, so 7,1 puts page 7 first. Its docs note that document-level data such as bookmarks comes from the primary input, and bookmarks pointing at pages you left out will stop working. Use &#8211;empty in place of the input file to drop that data. With pdftk, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7503,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"webixso_pending_account_ids":""},"categories":[41],"tags":[],"class_list":["post-7504","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devto"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/posts\/7504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/comments?post=7504"}],"version-history":[{"count":0,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/posts\/7504\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/media\/7503"}],"wp:attachment":[{"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/media?parent=7504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/categories?post=7504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tucumandevelopers.com\/index.php\/wp-json\/wp\/v2\/tags?post=7504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}