count pages in a set

using jobpreset and outputpresets to split document sets, how can I count the number of pages and documents in each set and assigning it to a variable for using it in workflow?

Hi RalfG,

That is not so simple at the moment. I had a query similar to yours. You can read up about it HERE to see if it helps.



just tested it, this solution is counting the number of objects in a job (or branch) and works well. But the only thing I want to do without branching, is to count the separated set.metadata pages and documents. In this case I’m splitting the output using the jobpreset and outputpreset into several different pdfs (working).

Additionally I’ve to split by number of pages. So at the end I want to see how many documents and how many pages are in one output pdf.

So at the end I want to see how many documents… are in one output pdf.

So the script I linked above got you the amount of document sets there are in your PDF.

and how many pages are in one output pdf.

If you want a PDF page count I use a small vb script for that. Just put it after the All in One or Create Output plugins.

Set myPDF = Watch.GetPDFEditObject

myPDF.Open Watch.GetJobFilename, true

Watch.SetVariable “YourLocalVariableHere”, myPDF.Pages.Count

I hope I’m understanding you correctly.



hmm, sorry for the complicated explanation, what I want to achieve:

I’ve an incoming PDF. That PDF is split by some content rules.
Datamapper defines the boundaries so I get the records in designer. depending on the content I add several pages, content and metadata. with the jobpreset I then group the pages according to a metadata field . Using that metadata and outputpreset I split the resulting PDF. Simple and works.

So it’s like that:

InputPDF -> create-boundaries and extract data with datamapper -> enrich some documents -> create split output (PDF A and PDF B).

In workflow I can see the Job, Group, Document etc. but how can I access or count the number of documents of the document.set.metadata group, e.g. PDF A and PDF B before creating the PDF

And how can I count the pages of each document in one group? In workflow I just see all documents in one group. I can iterate through the documents and get the number of documents matching one metadata value, yes. But how to count the final pages of that group?

It’s all about that question and splitting


Ahh I see what you mean now. I suggest you open a support ticket with Objectif Lune and a developer can assist you allot better in a more private setting than a open forum.