Search found 98 matches
- Wed May 14, 2025 2:41 pm
- Forum: Node.js scripting
- Topic: PdfProperties
- Replies: 8
- Views: 28073
Re: PdfProperties
I've just had a debug through the PdfProperties script with a blank PDF I made matching the values of the screenshot and I get the same result as you with the artBox and cropBox values being the same. I don't think this is something you or the script is doing wrong. When I was debugging it looks lik...
- Sat Mar 08, 2025 5:18 pm
- Forum: Flows
- Topic: View PDF file info within submit point
- Replies: 4
- Views: 26292
Re: View PDF file info within submit point
Looking at the Switch Reference Guide regarding Defining metadata fields in Submit Points it states: Using variables: It is possible to use variables to define the default value for your metadata field (Single-line text with variables, Condition with variables). However, most variables (e.g. doc aut...
- Mon Mar 03, 2025 1:34 pm
- Forum: Node.js scripting
- Topic: Force Stop Script
- Replies: 5
- Views: 38847
Re: Force Stop Script
I'd open the Progress pane in the Switch Designer, find the script that is stuck executing in the Progress pane, copy the Process ID and kill it in Resource Monitor (If you're on Windows, unsure on the Mac alternative) which will then let the flow stop https://i.gyazo.com/caa941229ba8a8f1353e5c7c8d7...
- Thu Jan 30, 2025 4:21 pm
- Forum: Flows
- Topic: Set private data based on Pitstop Server log
- Replies: 9
- Views: 33171
Re: Set private data based on Pitstop Server log
Matthew's solution is of course perfect and for the flow design easier than what I will suggest, but here is an approach that does not use scripting for those users that do not have the scripting module. Define two pieces of private data on a folder after having run PitStop using the following XPat...
- Tue Jan 28, 2025 11:16 am
- Forum: Flows
- Topic: Set private data based on Pitstop Server log
- Replies: 9
- Views: 33171
Re: Set private data based on Pitstop Server log
Awesome, glad it works as you wanted
- Mon Jan 27, 2025 4:10 pm
- Forum: Flows
- Topic: Set private data based on Pitstop Server log
- Replies: 9
- Views: 33171
Re: Set private data based on Pitstop Server log
No worries, updating it to look at multiple nodes ends up getting a little bit janky due to the Node.js scripting engine. The scripting engine only supports Xpath expressions evaluating to boolean | number | string | undefined, so I don't think its possibly currently to get all the node values in on...
- Mon Jan 27, 2025 1:08 pm
- Forum: Flows
- Topic: Set private data based on Pitstop Server log
- Replies: 9
- Views: 33171
Re: Set private data based on Pitstop Server log
Ended up taking me awhile to figure this one out, but reading the XML data set from a script expression looks like this: async function calculateScriptExpression(s: Switch, flowElement: FlowElement, job: Job): Promise<string> { const datasetPath = await job.getDataset("TestDataset", Access...
- Wed Nov 13, 2024 9:12 pm
- Forum: Node.js scripting
- Topic: undefined is not a function TypeError
- Replies: 11
- Views: 93955
Re: undefined is not a function TypeError
After debugging your script I think I was able to find your issue. The jdf variable you'd defined that queried the parsed xmlData was returning undefined As you can see from the screenshot below when debugging the value of the xmlData variable the properties within it don't contain any "dn:&quo...
- Wed Nov 13, 2024 5:12 pm
- Forum: Node.js scripting
- Topic: undefined is not a function TypeError
- Replies: 11
- Views: 93955
Re: undefined is not a function TypeError
Have you got an example JDF/XML you could provide? That would make it easier to debug what's happening in your script
- Wed Nov 13, 2024 3:44 pm
- Forum: Node.js scripting
- Topic: undefined is not a function TypeError
- Replies: 11
- Views: 93955
Re: undefined is not a function TypeError
The first thing that jumps out to me is the export declaration you've added to the jobArrived method, edit: also I noticed that you removed the s: Switch argument from the method too: export async function jobArrived(flowElement: FlowElement, job: Job) { ... } Remove the export declaration and add ...
- Wed Nov 13, 2024 10:42 am
- Forum: Node.js scripting
- Topic: undefined is not a function TypeError
- Replies: 11
- Views: 93955
Re: undefined is not a function TypeError
The first thing that jumps out to me is the export declaration you've added to the jobArrived method, edit: also I noticed that you removed the s: Switch argument from the method too: export async function jobArrived(flowElement: FlowElement, job: Job) { ... } Remove the export declaration and add t...
- Tue Nov 05, 2024 6:27 pm
- Forum: Switch
- Topic: Switch alternatives
- Replies: 4
- Views: 16126
Re: Switch alternatives
n8n is one that I've used in my spare time which if you self host it the functionality can be similar to Switch.
- Tue Nov 05, 2024 6:17 pm
- Forum: Flows
- Topic: Getting error message but no details on flow
- Replies: 2
- Views: 4427
Re: Getting error message but no details on flow
It'll be tricky to find what's logging these errors, but from the error do you have any scripts or script expressions that might be trying to load datasets with a placeholder value of "path to json file here"?
- Thu Aug 29, 2024 6:55 pm
- Forum: Switch
- Topic: Imposition in Switch
- Replies: 12
- Views: 21542
Re: Imposition in Switch
I like that idea, an open source imposition applicationmagnussandstrom wrote: ↑Thu Aug 29, 2024 2:51 pm Maybe we should use ChatGPT and build our own Impositioning app that fullfills all the needs of a modern printer...![]()

- Fri Jun 28, 2024 10:54 am
- Forum: Flows
- Topic: Change flow parameters directly in flow XML?
- Replies: 14
- Views: 21001
Re: Change flow parameters directly in flow XML?
Hi there, Global data could work great, one flow creating global, and other flow restoring it before use! But as we talked about it together recently, having a property directly in switch to have something like this could be a real game changer for some flow conception: [Switch.GlobalData.text:name...