Page 1 of 1

Switch: sort jobs by file size

Posted: Wed Apr 29, 2020 9:45 am
by senghaas
We would like to add a branch to feed PDF above a certain file size (example: 5 MB) into a separate Callas processing.
Does anyone have an idea how I can most easily reject these jobs? I think it would have to go through variables, but I can't get it to work...
[Job.Size]
Thanks for a tip!

Re: Switch: sort jobs by file size

Posted: Wed Apr 29, 2020 9:54 am
by patej
[Job.Size] gives you a "nicely formatted" version of the size as it says in the description, i.e. 42 KB, 5 MB etc so you can't really compare those values. Use [Job.ByteCount] instead to get the actual size in bytes, which you can then compare e.g. [Job.ByteCount] is greater than 5242880 (5 MB).

Re: Switch: sort jobs by file size

Posted: Wed Apr 29, 2020 11:39 am
by senghaas
Hi Patej,
thank you for your Support. That simple! It works perfect! :D
Best regards, Jürgen

Re: Switch: sort jobs by file size

Posted: Wed Apr 29, 2020 11:55 am
by patej
Hi Jürgen,

My pleasure, good to hear that you got it working :)

--patrik