Search found 267 matches

by sander
Fri Aug 21, 2020 10:40 am
Forum: LEGACY scripting
Topic: XML-path to string
Replies: 14
Views: 1582

Re: XML-path to string

Escape your " with \ like this

Code: Select all

var xml = job.getVariableAsString("[Metadata.Text:Path=\"/lieferung/\",Dataset=\"Xml\",Model=\"XML\"]");
by sander
Wed Aug 12, 2020 10:30 am
Forum: Flows
Topic: Best way to delete files in a folder older then X?
Replies: 11
Views: 1014

Re: Best way to delete files in a folder older then X?

You might be interested in my approach with Powershell which supports UNC paths. Fire up via execute command: $paths = @( ("d:\sftp\sander\nl"), ("d:\sftp\sander\de") ) foreach ($path in $paths) { $limit = (Get-Date).AddDays(-7) Get-ChildItem $path -Recurse | ? { -not $_.PSIsContainer -and $_.Creat...
by sander
Fri Mar 06, 2020 10:42 am
Forum: LEGACY scripting
Topic: Get part of an API Response(JSON)
Replies: 6
Views: 1663

Re: Get part of an API Response(JSON)

Define your var outside your function or use return?
by sander
Fri Mar 06, 2020 9:14 am
Forum: LEGACY scripting
Topic: Get part of an API Response(JSON)
Replies: 6
Views: 1663

Re: Get part of an API Response(JSON)

Code: Select all

try {
	jsonReturn = JSON.parse(theHttp.getServerResponse().toString('UTF-8'));
	log(2, jsonReturn.id);
} catch(theError) {
	log(2,'json parse error: ' +theError);
}
Something like this I think :)
by sander
Thu May 02, 2019 12:45 pm
Forum: Imposition
Topic: Imposing Smartstream Production Pro Print server
Replies: 2
Views: 2423

Re: Imposing Smartstream Production Pro Print server

First of all. Don't take all DFE errors/warning seriously. This is my auto-impose 2up ticket template. It's for papersize 320x460 on a Indigo 7x00. Let's take a look at the default paper size and image size values.. https://i.imgur.com/rwdGehH.png > You are not able to add a custom ticket template w...
by sander
Fri Mar 01, 2019 5:10 pm
Forum: LEGACY scripting
Topic: xml & xsl to PDF file
Replies: 2
Views: 2151

Re: xml & xsl to PDF file

As far as I know there's no html when you open a xml with a xsl. It looks nicely formatted from within a browser but that's it, it's still xml. Try Saxon, there's a configurator for that one, and set the according stylesheet. I'm wondering what the output of this is, after we can see what to do with...
by sander
Thu Feb 28, 2019 4:12 pm
Forum: Flows
Topic: Network paths (Switch on Windows)
Replies: 4
Views: 2836

Re: Network paths (Switch on Windows)

I agree ;)
by sander
Wed Feb 27, 2019 6:08 pm
Forum: LEGACY scripting
Topic: JSON with special characters
Replies: 8
Views: 4725

Re: JSON with special characters

Now I’m thinking of it, try this header, might work:
Content-Type: application/json;charset=utf-8
by sander
Wed Feb 27, 2019 5:25 pm
Forum: LEGACY scripting
Topic: JSON with special characters
Replies: 8
Views: 4725

Re: JSON with special characters

Ouch, you posted in scripting. I’m not sure about these 3rd party apps. Do you have the scripting module?
by sander
Wed Feb 27, 2019 4:19 pm
Forum: LEGACY scripting
Topic: JSON with special characters
Replies: 8
Views: 4725

Re: JSON with special characters

mart3223 wrote:
Tue Feb 26, 2019 10:52 am
If I use the same JSON in Enfocus Switch
Could be a encoding issue. How do you create your json on the Switch server, and how do you post?

e.g. If you create your json via FileWrite try using UTF-8: File.write(json, jsonBody,'UTF-8')
by sander
Mon Jul 30, 2018 3:02 pm
Forum: Flows
Topic: How to deal with case sensitive extensions ??
Replies: 3
Views: 3329

Re: How to deal with case sensitive extensions ??

I replace with this one, so one rename job does lower all extensions:
[Job.Extension:Case="lower"]
This is utterly stupid. What benefit of this differentiation ??
JavaScript is a case-sensitive language.
by sander
Mon Jul 30, 2018 12:33 pm
Forum: Applications
Topic: MS Word configurator
Replies: 6
Views: 5211

Re: MS Word configurator

Sander - have you got it implemented that way ?? Any working script you could share ?? Nope I'm using a lot of xlsx to csv and reversed but not doc. However I created this one for you. This is something we don't need to reinvent, I got most of this script @ https://stackoverflow.com/questions/16534...
by sander
Mon Jul 23, 2018 7:24 pm
Forum: Applications
Topic: MS Word configurator
Replies: 6
Views: 5211

Re: MS Word configurator

With a Powershell script via Execute Command you probably won’t even notice it’s already done :)
by sander
Wed Jul 18, 2018 12:23 pm
Forum: Flows
Topic: Problem using Hold element
Replies: 5
Views: 3420

Re: Problem using Hold element

You don’t need hold job, just assemble job with correct timeout settings.
by sander
Wed Jul 18, 2018 10:33 am
Forum: Flows
Topic: Problem using Hold element
Replies: 5
Views: 3420

Re: Problem using Hold element

Correct:
"Merge PDF is a processor that produces a single PDF file containing all of the pages provided by the PDF files in the incoming job folder."

You can use a sort before to order your files:
Image