View PDF file info within submit point
Posted: Fri Mar 07, 2025 10:00 pm
Hello folks,
I've been trying to get some simple info shown in a job+metadata submit point, in a read-only text field. All I want to do is list the dimensions of all the defined page boxes within the PDF, so the user can then use a dropdown to pick a page box to use as the basis for prepress/preflight.
Of course, I tried using Switch's built-in variables like [Stats.MediaBoxHeight] - these evaluate to an empty string. I'm guessing Switch doesn't look inside the PDF at the submit point stage?
Is there any way to access this info without breaking the workflow into a 2-step submit point → checkpoint process? Possibly through a script expression in the metadata field? I tried a few functions from the scripting guide, but script expressions within fields are quite poorly documented. I'm guessing there aren't any entry points, and trying to use PdfDocument.getPageMediaBoxHeight in a calculateScriptExpression function gives a very helpful nonspecific syntax error.
Any info about this kind of scripting would be appreciated!
I've been trying to get some simple info shown in a job+metadata submit point, in a read-only text field. All I want to do is list the dimensions of all the defined page boxes within the PDF, so the user can then use a dropdown to pick a page box to use as the basis for prepress/preflight.
Of course, I tried using Switch's built-in variables like [Stats.MediaBoxHeight] - these evaluate to an empty string. I'm guessing Switch doesn't look inside the PDF at the submit point stage?
Is there any way to access this info without breaking the workflow into a 2-step submit point → checkpoint process? Possibly through a script expression in the metadata field? I tried a few functions from the scripting guide, but script expressions within fields are quite poorly documented. I'm guessing there aren't any entry points, and trying to use PdfDocument.getPageMediaBoxHeight in a calculateScriptExpression function gives a very helpful nonspecific syntax error.
Any info about this kind of scripting would be appreciated!