Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Grand + Benedicts
2021-05-19T20:01:03Z
I have a PDF that I need to remove all pages except for the last one. The PDFs will vary in page sizes making it impossible to manually set the pages to remove.

I've created a get information task and am pulling the number of pages.

I can then use the output in a remove pages task to remove 2-output so I'm left with the first page. This works great.

Any combination of formulas I've tried to remove pages 1-(output-1), doesn't work.

Is it possible to modify the output with a formula? or is there another solution to only save the last page of a PDF?
Sponsor
Forum information
Grand + Benedicts
2021-05-19T20:28:20Z
Of course as soon as I posted this, I figured it out. Here's the solution for anyone looking:

1) Create a user defined variable with type int32
2) Create a calculate variable task. Store it in the user defined var from step 1. Left hand value = output from your get information task. operation subtraction. right hand value = 1
3) use 1-[uservar from step 1] in your remove pages task.
Support
2021-05-21T08:38:57Z
Originally Posted by: Grand + Benedicts 

Of course as soon as I posted this, I figured it out. Here's the solution for anyone looking:

1) Create a user defined variable with type int32
2) Create a calculate variable task. Store it in the user defined var from step 1. Left hand value = output from your get information task. operation subtraction. right hand value = 1
3) use 1-[uservar from step 1] in your remove pages task.



Great solution, thanks for the contribution!
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
Scroll to Top