{"id":67062,"date":"2026-11-11T18:02:00","date_gmt":"2026-11-11T18:02:00","guid":{"rendered":"https:\/\/help.pdf24.org\/en\/pdf24-command-line-page-size-pages-per-sheet\/"},"modified":"2026-11-11T18:02:00","modified_gmt":"2026-11-11T18:02:00","slug":"pdf24-command-line-page-size-pages-per-sheet","status":"publish","type":"post","link":"https:\/\/help.pdf24.org\/en\/pdf24-command-line-page-size-pages-per-sheet\/","title":{"rendered":"Automate on the command line: page size, pages per sheet and printing certain pages"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you do PDF work in scripts or batch files, version 11.34.0 lets you do more without clicking.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Change the page size and pages per sheet:<\/strong> The DocTool has the new commands <code>-changePageSize<\/code> (with <code>-pageSize<\/code>, for example A4, letter or 210x297mm, and <code>-orientation<\/code>) and <code>-nup<\/code> (with <code>-pagesPerSheet<\/code>, <code>-paperSize<\/code>, <code>-borders<\/code> and more). They give the same result as the Toolbox tools and work with <code>-silent<\/code>, <code>-outputDir<\/code> and <code>-outputFile<\/code>. Two examples from the manual:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\"C:\\Program Files\\PDF24\\pdf24-DocTool.exe\" -changePageSize -pageSize A4 -silent -outputDir \"C:\\Out\" \"C:\\In\\*.pdf\"\n\"C:\\Program Files\\PDF24\\pdf24-DocTool.exe\" -nup -pagesPerSheet 4 -paperSize A3 -borders -silent -outputFile \"C:\\Out\\handout.pdf\" \"C:\\In\\slides.pdf\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Print certain pages:<\/strong> PDF24 Reader prints only certain pages with <code>\/print<\/code> or <code>\/printTo<\/code> together with <code>\/pages<\/code>, for example <code>\/pages 1-2<\/code>, <code>\/pages 3-<\/code> (to the end) or <code>\/pages 1,4,6-8<\/code>. This way the first two pages can go to a printer with letterhead and the rest to another one:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\"C:\\Program Files\\PDF24\\pdf24-Reader.exe\" \/printTo \"Printer with letterhead\" \/pages 1-2 \"C:\\Docs\\letter.pdf\"\n\"C:\\Program Files\\PDF24\\pdf24-Reader.exe\" \/printTo \"Office Printer\" \/pages 3- \"C:\\Docs\\letter.pdf\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>More news in the DocTool:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>pdf24-DocTool.exe -help<\/code> (also <code>\/?<\/code> or without arguments) shows a short overview of the commands, options and exit codes.<\/li>\n\n\n<li><code>-outputDir<\/code> and <code>-outputFile<\/code> understand date, time and environment variables, for example <code>-outputDir \"D:\\Archive\\%Y-%m\"<\/code> for one folder per month. Missing folders are created.<\/li>\n\n\n<li><code>-extractAttachments -nameAfterPdf<\/code> names the attachments like the PDF: invoice1.pdf becomes invoice1.xml, handy for the XML data of many e-invoices.<\/li>\n\n\n<li><code>-password<\/code> also applies without <code>-silent<\/code>: the DocTool tries the password first and only asks if it does not fit.<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">All commands and options are in the manual: <a href=\"https:\/\/creator.pdf24.org\/manual\/11\/#11124-change-the-page-size-of-pdf-files\">change the page size<\/a>, <a href=\"https:\/\/creator.pdf24.org\/manual\/11\/#11125-put-several-pages-on-one-sheet-n-up\">pages per sheet<\/a> and <a href=\"https:\/\/creator.pdf24.org\/manual\/11\/#121-command-line\">PDF24 Reader<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you do PDF work in scripts or batch files, version 11.34.0 lets you do more without clicking. Change the page size and pages per sheet: The DocTool has the new commands -changePageSize (with -pageSize, for example A4, letter or 210x297mm, and -orientation) and -nup (with -pagesPerSheet, -paperSize, -borders and more). They give the same ... <a title=\"Automate on the command line: page size, pages per sheet and printing certain pages\" class=\"read-more\" href=\"https:\/\/help.pdf24.org\/en\/pdf24-command-line-page-size-pages-per-sheet\/\" aria-label=\"Read more about Automate on the command line: page size, pages per sheet and printing certain pages\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-67062","post","type-post","status-publish","format-standard","hentry","category-creator"],"_links":{"self":[{"href":"https:\/\/help.pdf24.org\/en\/wp-json\/wp\/v2\/posts\/67062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.pdf24.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/help.pdf24.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/help.pdf24.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.pdf24.org\/en\/wp-json\/wp\/v2\/comments?post=67062"}],"version-history":[{"count":0,"href":"https:\/\/help.pdf24.org\/en\/wp-json\/wp\/v2\/posts\/67062\/revisions"}],"wp:attachment":[{"href":"https:\/\/help.pdf24.org\/en\/wp-json\/wp\/v2\/media?parent=67062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.pdf24.org\/en\/wp-json\/wp\/v2\/categories?post=67062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.pdf24.org\/en\/wp-json\/wp\/v2\/tags?post=67062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}