OL Learn

Number of Pages in Document


I have job where I get a PDF and it goes into a data mapper and the boundary gets set based on a value changing. I then want to update the metadata for each record based on the number of pages within the document within a script in workflow. But I can’t see anything where I can get this count as in the Metadata it says pagecount is 1. Below is what my workflow would be like, so ideally I’d either have the script after the data mapper or create print content and update the metadata so then when it creates the job it outputs to one of the outputs based on the value I set :

Is there a reason why you are not extracting that information in the DataMapping process itself?
It’s readily available through the steps.totalPages property.


I didn’t know I could extract it from the data mapper, that would be much easier. Is that for the whole job or just that pack the steps.totalPages?



It’s for each individual document.
Re: https://help.objectiflune.com/en/planetpress-connect-user-guide/2020.2/#datamapper/API/Object_steps.htm

Perfect thanks for that Phil