Search found 75 matches

by bkromer
Tue May 04, 2021 11:00 pm
Forum: LEGACY scripting
Topic: How to POST a file to an API (Content-Type: multipart/formdata)
Replies: 8
Views: 3659

Re: How to POST a file to an API (Content-Type: multipart/formdata)

Cant find a Documentation for that API. Can you provide some more information on Müller Martini Connex?
rgpepper wrote:
Tue May 04, 2021 7:23 pm
...I need to do this without scripting....
Why :?:
by bkromer
Thu Apr 22, 2021 7:42 am
Forum: LEGACY scripting
Topic: Get E-Mails as .eml?
Replies: 1
Views: 206

Get E-Mails as .eml?

Is it possible to write a Script to connect to a pop3 and get new mails and save it as ".eml"?
by bkromer
Thu Apr 22, 2021 7:34 am
Forum: Switch
Topic: Receive E-Mails as ".eml" possible?
Replies: 1
Views: 179

Receive E-Mails as ".eml" possible?

Hi there,

as far as I know when using the incoming E-Mail Node we receive a Folder with a txt or when specified the attachments

Is it somehow possible to receive the E-Mail itself as ".eml"?

Thanks in Advance for any hint.
by bkromer
Thu Dec 10, 2020 3:15 pm
Forum: LEGACY scripting
Topic: Merge two text files
Replies: 2
Views: 1496

Merge two text files

Hello, I need to run a OCR on PDF Files. I want to use Tesseract. Tesseract need pictures so I build a Flow to convert PDF to JPEG and read them with OCR. Tesseract spits out txt files. I then want to read in those text Files in my script and use RegEx to sort them by specific identifiers and finall...
by bkromer
Fri Nov 20, 2020 10:59 am
Forum: LEGACY scripting
Topic: Select a file from the beginning of a flow
Replies: 20
Views: 5842

Re: Select a file from the beginning of a flow

Okay this worked for me now:

Code: Select all

var dataset = job.getDataset( "OpaqueJson"  );
var jsonFilePath = dataset.getPath();
var jsonFileObj = File.read( jsonFilePath ,'utf-8'); 
var orderJson = JSON.parse( jsonFileObj );
Bildschirmfoto 2020-11-20 um 10.57.22.png
Bildschirmfoto 2020-11-20 um 10.57.22.png (83.66 KiB) Viewed 1989 times
The attachment Bildschirmfoto 2020-11-20 um 10.57.22.png is no longer available
by bkromer
Fri Nov 20, 2020 10:25 am
Forum: LEGACY scripting
Topic: DPD SOAP API
Replies: 10
Views: 3735

Re: DPD SOAP API

We've been integrating with DPD as well (Portugal), and it will be different, but maybe some of this can be helpful. DPD Portugal still doesn't have a REST API, as far as I know, so we've been using SOAP as well. We ended up using a script (still legacy) to build the XML file, according to the docu...
by bkromer
Fri Nov 20, 2020 9:41 am
Forum: LEGACY scripting
Topic: Select a file from the beginning of a flow
Replies: 20
Views: 5842

Re: Select a file from the beginning of a flow

So you mean the Flow Element "Export Metadata"? So I cant use job.getVariableAsString( '[Metadata.Rational:Path="Opaque"] ')? In My Flow I get a JSON from a WebHook within the JSON is the name of the PDF-File I want to print via "Flux Server API" and various information for the job. So I need the PD...
by bkromer
Fri Nov 20, 2020 9:07 am
Forum: LEGACY scripting
Topic: Select a file from the beginning of a flow
Replies: 20
Views: 5842

Re: Select a file from the beginning of a flow

Is there a way to "File.read()" a File thats not in the actual Job-Folder of the Script? How can I refer to such a file? For Example the JSON file is in Folder 11 how can I read it by refering to it like File.read('Ordner 11/filename.json')!?
by bkromer
Thu Nov 19, 2020 9:09 am
Forum: LEGACY scripting
Topic: Select a file from the beginning of a flow
Replies: 20
Views: 5842

Re: Select a file from the beginning of a flow

You renamed the payload file and also changed the extension. The filename before the extension must be alike but different extensions. The filetype you want to embed as an opaque datatype i specified in the properties. You you need two files as this: myfilename.pdf and myfilename.json okay thanks. ...
by bkromer
Mon Nov 16, 2020 9:40 am
Forum: LEGACY scripting
Topic: Select a file from the beginning of a flow
Replies: 20
Views: 5842

Re: Select a file from the beginning of a flow

jan_suhr wrote:
Sun Nov 15, 2020 1:52 pm
...
So you have to find a way to rename the payload file.
Is it not enough to rename one of the files? Image
They still have their unique filename for a second.
by bkromer
Sun Nov 15, 2020 1:26 pm
Forum: LEGACY scripting
Topic: Select a file from the beginning of a flow
Replies: 20
Views: 5842

Re: Select a file from the beginning of a flow

jan_suhr wrote:
Sun Nov 15, 2020 11:05 am
Do both files have the same name?
No its 470_payload.json and 127398.pdf as u can see on the screenshot.
by bkromer
Sun Nov 15, 2020 9:48 am
Forum: LEGACY scripting
Topic: Select a file from the beginning of a flow
Replies: 20
Views: 5842

Re: Select a file from the beginning of a flow

2020-11-15 09_46_43-Enfocus Switch - Switch Server (localhost) - euchnerSwitchFlux.png
2020-11-15 09_46_43-Enfocus Switch - Switch Server (localhost) - euchnerSwitchFlux.png (11.49 KiB) Viewed 2861 times
by bkromer
Sun Nov 15, 2020 9:47 am
Forum: LEGACY scripting
Topic: Select a file from the beginning of a flow
Replies: 20
Views: 5842

Re: Select a file from the beginning of a flow

One way is to embed the text file or the PDF as an Opaque dataset in the other file and in the script access that dataset. It will then be saved as a temp file that you can read from the script. For Example I have this flow where I want to opaque pickup a *.json file in a *.pdf file but it stucks b...
by bkromer
Sat Nov 14, 2020 9:18 am
Forum: LEGACY scripting
Topic: Select a file from the beginning of a flow
Replies: 20
Views: 5842

Re: Select a file from the beginning of a flow

Branch of to one folder before the pdfToolbox element and then from that folder back to the folder before the script, then both the PDf and the TXT will be going in to the script. In the script you have to pick up both the PDF and the TXT file. How can I select the textfile and the pdf file in the ...
by bkromer
Tue Sep 29, 2020 10:09 am
Forum: LEGACY scripting
Topic: Switch Webhooks
Replies: 13
Views: 3536

Re: Switch Webhooks

Okay, I have the Webserver up and running with the following javascript. function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i<vars.length;i++) { var pair = vars[i].split("="); if(pair[0] == variable){return pair[1];} } ret...