Get PDF Colored Page Count
  • 18 Jul 2023
  • 1 Minute to read
  • Dark
    Light

Get PDF Colored Page Count

  • Dark
    Light

Article summary

Step Details
Introduced in Version8.13.0
Last Modified in Version8.13.0
LocationData > PDF

The Get PDF Page Count step is designed to retrieve the total number of colored pages contained within a PDF file. This step scans the document's content by inputting a specific PDF file, identifies pages with color content, and returns an accurate count. This capability is particularly useful for various applications, such as assessing printing costs, monitoring color usage, or conducting quality control on color-intensive documents.


Properties

Inputs

PropertyDescriptionData Type
Color TypeSelect the desired color type for page counting from the available options: RGB, Grayscale, Black and White, or Undefined.ColorType
PDFPDF file to retrieve the page count of colored pages. FileData

Outputs

PropertyDescriptionData Type
GetPDFPageCount1_Output
The count of colored pages within the PDF input.Int32


Common Errors

Value cannot be null

If the PDF File input is not specified, the step will result in the following error; please ensure the step is mapped correctly. 

Exception Message:

Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Get PDF Colored Page Count 1[GetColorPdfPageCount] in flow [Display Steps]: Exception invoking method GetColorPdfPageCount on class PdfManagementSteps
 ---> DecisionsFramework.LoggedException: Exception invoking method GetColorPdfPageCount on class PdfManagementSteps
 ---> System.ArgumentNullException: Value cannot be null. (Parameter 'pdfDocument'
 at DecisionsFramework.Design.Flow.CoreSteps.StandardSteps.PdfManagementSteps.GetColorPdfPageCount(FileData pdfDocument, ColorType colorType
 at InvokeStub_PdfManagementSteps.GetColorPdfPageCount(Object, Object, IntPtr*
 at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data
 at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
 at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
   --- End of inner exception stack trace ---

Was this article helpful?