is there a way to get the number of pages of a PDF file created through the workflow? I need to create multiple conditions based on the number of pages a PDF contains, but I can’t find a proper way to do it. Here is an example of what I am trying to achieve:
I found a “solution” but it requires another process using the PDF file as an input to work. I would like to only have one process if possible. Here is the solution:
There’s a simpler way to do this inside of a Connect process. Essentially, Connect already knows how many pages there are, so it’s just a question of running a query against the REST api. You can find an example here: Global page count - Workflow - Upland OL User community
@fortiny: the post quoted by @AlbertsN does not use a splitter, it uses the REST call that returns the total number of pages and documents in a job. It also includes, later in the same post, the same code you presented, but that will only work when the PDF has already been created and returned to Workflow, which is not always the case as demonstrated by the original poster’s Workflow diagram.
My comment regarding splitter referred to the original question, not AlbertsN’s answer. It’s actually one of the more creative uses of Workflow I’ve seen.
My answer assumed that the PDF already exists because of the splitter-based solution that’s already implemented. But yes, if it fits in the whole workflow process, getting it straight from Connect is definitely a good solution as well.