You are viewing limited content. For full access, please sign in.

Question

Question

How do I get the page count of a PDF using the SDK?

asked on October 14, 2021

I know that you can get the page count of a TIFF, but is there a script or some sort of workaround to find out how many pages there are in a PDF?

I have a workflow that cannot move forward until all PDFs in a folder have pages generated. I have the Page Generation activity, but the only option I have is to invoke a separate workflow.

0 0

Replies

replied on October 14, 2021

Perhaps you could use the "RETRY" activity to check these documents until all files have page > 1, then move forward with the workflow?

0 0
replied on October 14, 2021

I need the workflow to move forward if ALL pages have been generated. Not just more than 1.

0 0
replied on October 14, 2021

Try a wait condition on the folder not having any documents with no pages.

In the context of PDFs, assuming that you don't extract text on import, page count greater than zero does mean they have had their image pages generated since there's no partial page generation.

There is nothing in Workflow that could check the image page count matches the PDF page count. You would need an SDK for modifying PDFs if you need to get that granular.

0 0
replied on October 18, 2021

Thank you for the suggestion Miruna. I had previously set it up this way, but I found the workflow would still move forward for larger documents. The document in this situation happened to be 40 pages, and the workflow had moved forward before all 40 pages were generated.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.