Hi,
I need a script expression that split my PDF in x pages per file.
Filename: Abcdef_Copies24.pdf
x = [Stats.NumberOfPages] / [Job.NameProper:After="Copies"]
Can someone help me with a script for this. I have never used the script expression before.
Thanks!
Split PDF with script expression
Re: Split PDF with script expression
You do not need a script expression for that:
for the "Pages per file" property should do it.
However, you probably also want to make sure that the number of pages of the PDF is a multiple of the number after "Copies". Put a condition before the splitting of the PDF that checks that:
This calculation gives the remainder of the division of the number of pages by the value after "Copies". If the remainder is 0, you are good to go. If not, then the file is not correct.
Code: Select all
[Switch.Calculation:Expression="[Stats.NumberOfPages] / [Job.NameProper:After="Copies"]"]
However, you probably also want to make sure that the number of pages of the PDF is a multiple of the number after "Copies". Put a condition before the splitting of the PDF that checks that:
Code: Select all
[Switch.Calculation:Expression="[Stats.NumberOfPages] % [Job.NameProper:After="Copies"]"]
Re: Split PDF with script expression
Thank´s working well!