{"id":24668,"date":"2020-11-25T07:19:40","date_gmt":"2020-11-25T06:19:40","guid":{"rendered":"https:\/\/jurnsearch.wordpress.com\/?p=24668"},"modified":"2020-11-25T07:19:40","modified_gmt":"2020-11-25T06:19:40","slug":"how-to-resize-pages-in-a-squished-pdf","status":"publish","type":"post","link":"https:\/\/jurn.link\/jurnsearch\/index.php\/2020\/11\/25\/how-to-resize-pages-in-a-squished-pdf\/","title":{"rendered":"How to resize pages in a squished PDF"},"content":{"rendered":"<p>Sometimes you get a PDF where the page is &#8220;squished&#8221;, as seen here&#8230;<\/p>\n<p><a href=\"https:\/\/jurn.link\/jurnsearch\/2020\/11\/bad.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jurn.link\/jurnsearch\/2020\/11\/bad.jpg\" alt=\"\" width=\"400\" height=\"649\" class=\"alignnone size-full wp-image-24670\" \/><\/a><\/p>\n<p style=\"text-align:center;\"><em>Bad, some dunderhead saved the pages with slightly wrong proportions and didn&#8217;t notice.<\/em><\/p>\n<p><a href=\"https:\/\/jurn.link\/jurnsearch\/2020\/11\/good.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jurn.link\/jurnsearch\/2020\/11\/good.jpg\" alt=\"\" width=\"400\" height=\"591\" class=\"alignnone size-full wp-image-24671\" \/><\/a><\/p>\n<p style=\"text-align:center;\"><em>Good, as it should be.<\/em><\/p>\n<p>It can also happen when ebooks files are being bulk converted to .PDF files. It&#8217;s often especially noticeable where there is artwork with faces. The slightly &#8220;squished&#8221; or &#8220;stretched&#8221; result is locked in a PDF file and is difficult to change.  It&#8217;s no use trying PDF tools that only scale a page proportionally, or simply crop the page, or will re-print from U.S. Letter size to UK A4 size etc. Because you only need to change each page along <strong>one<\/strong> dimension, not along both.<\/p>\n<p>There are three or four online tools for fixing this in a PDF, though that&#8217;s not much help if you have a 200Mb PDF and a very slow upload speed, or are offline. Or have 50 such files to process. Or if your business has a mission-sensitive document you&#8217;d rather not sent to Whereizitagin. The full paid Adobe Acrobat can also do the repair though in a clunky way, from Adobe Acrobat DC (2015, not to be confused with Adobe Reader) onward, via fiddling around with Preflight and following a convoluted recipe.<\/p>\n<p>Are there any fast Windows desktop options?  I found and tested three working possibilities, one free.<\/p>\n<p>1. The free and trusty <a href=\"https:\/\/www.irfanview.com\/64bit.htm\">Irfanview<\/a> can open PDFs (with the free <a href=\"https:\/\/ghostscript.com\/download\/gsdnld.html\">Ghostscript<\/a> and <a href=\"https:\/\/www.irfanview.com\/64bit.htm\">free plugins pack<\/a> installed). This combo can together open and page through PDFs. Irfanview can even resize the first page in an unconstrained way, so you can work out what your re-size dimensions need to be. Sadly it can&#8217;t then flow this resizing over to all subsequent pages. Instead it can at least automatically save out all the pages as .PNGs or .JPGs, then you&#8217;d open their output folder and batch resize them with Irfanview. Then you&#8217;d re-compile them back to a .PDF file, or zip them into into a Comic Book .CBZ file.<\/p>\n<p>2. <a href=\"http:\/\/pdfcombiner.com\/combine\/page-resize.html\">Apex PDF Page Resizer<\/a> did the job easily and perfectly, although it&#8217;s expensive at $20 via FastSpring. Over-priced, for a one-trick-pony that won&#8217;t be used too often. There&#8217;s a 30-day trial with only a light watermark.<\/p>\n<p><a href=\"https:\/\/jurn.link\/jurnsearch\/2020\/11\/apex-pdf-page-resizer.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jurn.link\/jurnsearch\/2020\/11\/apex-pdf-page-resizer.jpg?w=529\" alt=\"\" width=\"529\" height=\"502\" class=\"alignnone size-large wp-image-24673\" \/><\/a><\/p>\n<p>3. <a href=\"http:\/\/www.verypdf.com\/app\/advanced-pdf-tools\/index.html\">Advanced PDF Tools<\/a> at $38. Twice the price it should be, but it does the job after a quick bit of fiddling with the settings. As you can see here, you scale the Page Content by a % and then pad in pt&#8217;s to accommodate the added width or height. It&#8217;s a bit more hit-and-miss than Apex.<\/p>\n<p><a href=\"https:\/\/jurn.link\/jurnsearch\/2020\/11\/advancetools.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/jurn.link\/jurnsearch\/2020\/11\/advancetools.jpg?w=529\" alt=\"\" width=\"529\" height=\"300\" class=\"alignnone size-large wp-image-24674\" \/><\/a><\/p>\n<p>As you can see, you&#8217;re getting many more features than Apex PDF Page Resizer. But the very fast output speed and exactly the same file-size in output suggests it is working in much the same way as Apex, probably via a .NET Windows GUI that gives a pipe <a href=\"https:\/\/www.ghostscript.com\/doc\/current\/Use.htm#PDF_switches\">into several key Ghostscript switches<\/a>.<\/p>\n<p>In both, the settings are then run across all pages, and a new repaired .PDF is swiftly saved out. It strikes me that such a relatively slight change could be one way of detecting a leaker in an organisation. Give each person a .PDF copy with very slightly widened or lengthened pages, such that each imperceptibly changed .PDF is unique to one person.<\/p>\n<p>I looked hard but could not find anything with a GUI for Windows that hooked into Ghostscript&#8217;s resizing and scaling switches in the same way as the above two, but for free. <a href=\"https:\/\/github.com\/tavinus\/pdfScale\">pdfScale: Bash Script to Scale and Resize PDFs using Ghostscript<\/a> came closest (see the scripts at the end) and may interest some. <\/p>\n<p>If you just want to crop pages to a user-defined rectangle, including instances where you have several columns on the same page, the free <a href=\"https:\/\/sourceforge.net\/projects\/briss\/\">Briss<\/a> is well recommended.<\/p>\n<hr>\n<p>(If you have a related problem, a PDF that shows the curved pages of a book as photographed from above with a hand-held camera, see my recent <a href=\"https:\/\/jurn.link\/jurnsearch\/2020\/06\/14\/how-to-auto-correct-curved-book-pages-in-2020\/\">How to auto-correct curved book pages<\/a> post)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes you get a PDF where the page is &#8220;squished&#8221;, as seen here&#8230; Bad, some dunderhead saved the pages with &hellip;<\/p>\n<p><a href=\"https:\/\/jurn.link\/jurnsearch\/index.php\/2020\/11\/25\/how-to-resize-pages-in-a-squished-pdf\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-24668","post","type-post","status-publish","format-standard","hentry","category-jurn-tips-and-tricks"],"_links":{"self":[{"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/posts\/24668","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/comments?post=24668"}],"version-history":[{"count":0,"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/posts\/24668\/revisions"}],"wp:attachment":[{"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/media?parent=24668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/categories?post=24668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jurn.link\/jurnsearch\/index.php\/wp-json\/wp\/v2\/tags?post=24668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}