Switch: sort jobs by file size

Post Reply
senghaas
Newbie
Posts: 17
Joined: Tue Dec 06, 2016 1:40 pm
Location: Heilbronn

Switch: sort jobs by file size

Post 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!
patej
Member
Posts: 79
Joined: Sun Nov 25, 2012 12:15 pm

Re: Switch: sort jobs by file size

Post 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).
senghaas
Newbie
Posts: 17
Joined: Tue Dec 06, 2016 1:40 pm
Location: Heilbronn

Re: Switch: sort jobs by file size

Post by senghaas »

Hi Patej,
thank you for your Support. That simple! It works perfect! :D
Best regards, Jürgen
patej
Member
Posts: 79
Joined: Sun Nov 25, 2012 12:15 pm

Re: Switch: sort jobs by file size

Post by patej »

Hi Jürgen,

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

--patrik
Post Reply