[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/wsr/ - Worksafe Requests

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: 1734927035718936.jpg (213 KB, 750x721)
213 KB
213 KB JPG
Hi wsr
here's the issue:
We needed to pass some physical documents to digital PDF files, some other department did that, but the thing is... they scanned everything in inverse order, like the first page showing the one which should be shown at last and such, is there any way to automatically make every pdf file pages be rearranged in inverse order?
I mean, I saw there were some pages which did this, but it requires to upload every file, and it's around 50k files, so I wonder if there's some script or something which may help me to do so.
Pic unrelated.
>>
>>1541735
https://unix.stackexchange.com/questions/439959/how-to-reverse-the-page-order-of-a-pdf-file
first suggestion recommends: pdftk myfile.pdf cat end-1 output myfilereversed.pdf
Then if you want to do it for multiple files, just in the directory with files create directory "reversed" and run something like:
for f in *.pdf; do pdftk $f cat end-1 output reversed/$f ; done
that should work on linux or mac, if you use windows it should be more or less similar, just ask chatgpt to tell you how to do same with cmd or powershell
>>
>>1541744
thanks, going to check that out at the office tomorrow.
I guess I'll have to try it with cmd or powershell because we use windows there.
>>
I suggest testing your script with spare copies of some of the pdfs to ensure your command doesn't modify/delete your source pdfs (lest you lose your only copies of a scan).
(An alternative to pdftk is qpdf. Though I suppose pdftk has cleaner syntax.
The command to reverse one pdf is qpdf --empty --pages file.pdf z-1 -- output.pdf)
>>
>>1541822
>>1541744
tested with the pdftk, installed the free version, the program asked to pay for use, but I could use it with a command line like the first answer said, I was preppared to get the filenames on some script to automatically sort them, but then they said they didn't do it backwards, but in complete disorder, and it wasn't actually that many files, just like 20 files with around 500 pages each (they gave me wrong info or exagerated "a bit" for whatever reason), so they opted to manually sort them with adobe (they have a licence for that), thank you all for your help anyways, at least I learnt how to do that.
>>
>>1541872
>have to manually sort 20x500 pages
grim. Hopefully they're numbered



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.