Any help please would be appreciated. A simple yes or no would suffice.
Is there a way to find the half way page count in a PDF? I need to add press marks at the half way count and also round up to the count if its not an even page number.
Example if the page count is 100, I will add press marks at page 50. (Halfway and an even number)
If the page count is 103, I will add press marks at page 52. It must be an even number. (51.5 is half of 103 so rounded up to an even number would be 52).
I could always add a blank at the end of the doc to get an even page count, find the halfway point, add press marks and then remove the last page if that an easier solution to finding the halfway mark.
Thanks for any help.
Finding halfway point from the page count and adding marks
-
CruzinCooler
- Member
- Posts: 72
- Joined: Wed Aug 11, 2021 6:31 pm
- JimmyHartington
- Advanced member
- Posts: 513
- Joined: Tue Mar 22, 2011 7:38 am
Re: Finding halfway point from the page count and adding marks
I do not think that is possible without using Switch.
-
CruzinCooler
- Member
- Posts: 72
- Joined: Wed Aug 11, 2021 6:31 pm
Re: Finding halfway point from the page count and adding marks
Thank you for your response.
We have Switch but just getting into it. Would I need a special module that you know of?
Thanks again.
We have Switch but just getting into it. Would I need a special module that you know of?
Thanks again.
- JimmyHartington
- Advanced member
- Posts: 513
- Joined: Tue Mar 22, 2011 7:38 am
Re: Finding halfway point from the page count and adding marks
You can use this expression:
It takes the number of pages. Divides it in half and round to 0 decimals.
In this flow I have set the expression as a private data and then use that to add suffix to the files.
You could also just use the expression in the rename, but if you need to use the same expression multiple times I normally set it as private data.
Because if I need to change it I only need to change it where I set the private data.
Flow: https://d.pr/f/Bsu7oH

Code: Select all
[Switch.Calculation:Expression="round([Stats.NumberOfPages]/2)"]In this flow I have set the expression as a private data and then use that to add suffix to the files.
You could also just use the expression in the rename, but if you need to use the same expression multiple times I normally set it as private data.
Because if I need to change it I only need to change it where I set the private data.
Flow: https://d.pr/f/Bsu7oH