Search found 46 matches

by Sunnyland
Thu Apr 08, 2021 6:00 am
Forum: Node.js scripting
Topic: Help with CSV Split
Replies: 5
Views: 384

Re: Help with CSV Split

Thanks for your help. Below is my final code to split a CSV file and group by the id field. const fs = require('fs-extra'); const fastCsv = require('fast-csv'); const { pipeline } = require('stream') async function jobArrived(s, flowElement, job) { const options = {headers: true, delimiters: ','}; /...
by Sunnyland
Wed Apr 07, 2021 12:18 am
Forum: Node.js scripting
Topic: Help with CSV Split
Replies: 5
Views: 384

Re: Help with CSV Split

Thanks Freddy, yes I was getting output. At this stage I wasn't too concerned about passing the files back into the flow I just needed the separated CSV files which I had writing to a temp location. The main problem was that the promise was completing before fastcsv would finish writing the new file...
by Sunnyland
Wed Apr 07, 2021 12:18 am
Forum: Node.js scripting
Topic: Help with CSV Split
Replies: 5
Views: 384

Re: Help with CSV Split

Thanks Freddy, yes I was getting output. At this stage I wasn't too concerned about passing the files back into the flow I just needed the separated CSV files which I had writing to a temp location. The main problem was that the promise was completing before fastcsv would finish writing the new file...
by Sunnyland
Mon Apr 05, 2021 1:45 pm
Forum: Node.js scripting
Topic: Help with CSV Split
Replies: 5
Views: 384

Help with CSV Split

I have a large CSV file which I want the split into kinds. The file has id's (packNrs) I would like to split using these values. At this stage I have found code that allows me to split on these values but my issue is witting the new CSV files basically I am only get one row written before the next f...
by Sunnyland
Sun Jan 17, 2021 10:49 pm
Forum: Node.js scripting
Topic: api call from flow
Replies: 6
Views: 1461

Re: api call from flow

This is what the above code looks with these changes. const querystring = require('querystring'); const http = require("http"); const XPath = require("xpath"); const fs = require("fs-extra"); const DomPaser = require("xmldom").DOMParser; async function jobArrived(s, flowElement, job) { let jobName =...
by Sunnyland
Sun Jan 17, 2021 10:42 pm
Forum: Node.js scripting
Topic: api call from flow
Replies: 6
Views: 1461

Re: api call from flow

Hi Foxplace, This is the code I used to send the SOAP request and to return as a promise. const options = { hostname: nURL.hostname, port: 443, path: path, method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Content-Length': data.length, 'Host' : nURL.hostname } } return...
by Sunnyland
Mon Nov 30, 2020 11:01 pm
Forum: Applications
Topic: HP SmartStream VDP
Replies: 11
Views: 11399

Re: HP SmartStream VDP

Sorry to reopen an old post but I am trying to use the HP VDP with indesign 2019. I have installed The Adobe Extension toolkit for CC but I get an error in the log file stating that it only works with indesign version 5 or later. I just have one job that comes in every 3 months, not a big deal if I ...
by Sunnyland
Fri Oct 02, 2020 9:17 am
Forum: Node.js scripting
Topic: api call from flow
Replies: 6
Views: 1461

Re: api call from flow

Thanks Freddy, Yep big learning curve with NodeJS, using callback or Promises. I really had to drill down on what the differences are. I have change the above code and now it uses promises and not callbacks and believe it or not the code is much simpler and now works. Will look forward to the webinar.
by Sunnyland
Wed Sep 16, 2020 8:55 am
Forum: Node.js scripting
Topic: Writing a Dataset JSON
Replies: 2
Views: 1038

Re: Writing a Dataset JSON

Thanks for the info,
I also realized that I have set the datasetmodel set to JDF rather than JSON which didn't help my cause. I will convert to XML just try to take the easy way out.
by Sunnyland
Wed Sep 16, 2020 8:31 am
Forum: Node.js scripting
Topic: Writing a Dataset JSON
Replies: 2
Views: 1038

Writing a Dataset JSON

So I want to write a JSON dataset. Using await job.createDataset("iqdata",JSONpath,DatasetModel.JDF); and writing this JSON Data { "job": [{ "impositionwidth": "210.0000", "impositionheight": "297.0000", "sectionnumber": 0, "finishedwidth": "210.0000", "finishedheight": "297.0000", "pages": "2", "fo...
by Sunnyland
Tue Sep 01, 2020 10:14 am
Forum: Node.js scripting
Topic: api call from flow
Replies: 6
Views: 1461

api call from flow

I am currently trying to make an api call from a flow. I already have a script that works using Javascript but for this I have decided to put my poor NodeJs skills to the test and see how I go. I have failed so far, it appears that the http code is just ignored by switch. I do not get success logs o...
by Sunnyland
Mon Aug 31, 2020 11:29 pm
Forum: Node.js scripting
Topic: NodeScriptExecutor.js.map
Replies: 10
Views: 2827

Re: NodeScriptExecutor.js.map

Thanks for that. I have been ignoring the message, it’s good to know that it isn’t affecting anything
by Sunnyland
Mon Aug 31, 2020 10:41 am
Forum: Preflighting
Topic: Select Dieline and Convert to spot
Replies: 6
Views: 2704

Re: Select Dieline and Convert to spot

Ok so there is no button next to user swatch. I may need to uninstall and reinstall pitstop server. All I get is a black square
by Sunnyland
Mon Aug 31, 2020 9:43 am
Forum: Preflighting
Topic: Select Dieline and Convert to spot
Replies: 6
Views: 2704

Re: Select Dieline and Convert to spot

I did try to use remap color but the only option was user swatch and I couldn't figure out where to set the user swatch color
by Sunnyland
Mon Aug 31, 2020 2:08 am
Forum: Preflighting
Topic: Select Dieline and Convert to spot
Replies: 6
Views: 2704

Select Dieline and Convert to spot

I am trying to select a dieline by line thickness and colour and convert to a spot color called "Knife". We have artwork come from several different sources. Some places will use 100% cyan, others will use 100% Magenta and then some will call the knife line Diecut the later is easy to select and cha...