Search found 353 matches

by LasseThid
Thu May 28, 2015 1:52 pm
Forum: Flows
Topic: XML and PDF files
Replies: 2
Views: 3595

Re: XML and PDF files

Thanks.

I'll have the customer generate one XML per PDF file then.
by LasseThid
Wed May 27, 2015 4:03 pm
Forum: Flows
Topic: XML and PDF files
Replies: 2
Views: 3595

XML and PDF files

Is it possible to read data from an XML file containing information for more than one PDF file and then embed the data in the correct PDF file, or is it better to have one XML per PDF? From an XML file like this... <?xml version="1.0" encoding="UTF-8"?> <order> <pof>ordernumber</...
by LasseThid
Tue May 05, 2015 5:11 pm
Forum: LEGACY scripting
Topic: file is not a valid pdf file
Replies: 2
Views: 3397

Re: file is not a valid pdf file

Thanks for the explanation and the modified code.

I was a bit lazy, so I copy/pasted it into my script and it works perfectly. 8-)
by LasseThid
Tue May 05, 2015 9:09 am
Forum: LEGACY scripting
Topic: file is not a valid pdf file
Replies: 2
Views: 3397

file is not a valid pdf file

I'm working on a flow for automation of our business card production. After the files are dropped in a hot folder I use this script to determine which template to use for the imposition. function jobArrived( s : Switch, job : Job ) { var width = job.getVariableAsNumber("[Stats.TrimboxWidth]&quo...
by LasseThid
Tue May 05, 2015 8:35 am
Forum: Imposition
Topic: Smartstream causing InDesign to crash
Replies: 4
Views: 10612

Re: Smartstream causing InDesign to crash

No extended characters in the file name.

I'll keep this in mind though. Thanks.
by LasseThid
Wed Apr 01, 2015 6:39 am
Forum: LEGACY scripting
Topic: Send Switch Stat variables to JavaScript
Replies: 10
Views: 14440

Re: Send Switch Stat variables to JavaScript

Thanks for the explanation MoodyBro.

I will look into that next time I'm working on a script.
by LasseThid
Tue Mar 31, 2015 1:07 pm
Forum: LEGACY scripting
Topic: Send Switch Stat variables to JavaScript
Replies: 10
Views: 14440

Re: Send Switch Stat variables to JavaScript

Thanks to everyone for helping me out.

Script is done now and working as expected.

@MoodyBro:
As I'm just starting to learn scripting I'm a bit curious about the log thing.
Can you expand on how it's working and how to use it, either here or in a PM?

Thanks
Lasse
by LasseThid
Tue Mar 31, 2015 8:01 am
Forum: LEGACY scripting
Topic: Send Switch Stat variables to JavaScript
Replies: 10
Views: 14440

Re: Send Switch Stat variables to JavaScript

Thanks Andrea.
That's may make life a bit easier for me. :lol:

Update:
I can't figure out how to use Round() in my calculation.
[Switch.Calculation:Expression="Round([Stats.TrimBoxWidth]/72*25.4)"] results in the value 0 instead of the expected 90.
by LasseThid
Mon Mar 30, 2015 4:11 pm
Forum: LEGACY scripting
Topic: Send Switch Stat variables to JavaScript
Replies: 10
Views: 14440

Re: Send Switch Stat variables to JavaScript

dkelly wrote:

Code: Select all

var width = job.getVariableAsNumber("[Stat.TrimboxWidth]"); 
var height = job.getVariableAsNumber("[Stat.TrimboxHeight]"); 
Thank you very much.
by LasseThid
Mon Mar 30, 2015 4:10 pm
Forum: LEGACY scripting
Topic: Send Switch Stat variables to JavaScript
Replies: 10
Views: 14440

Re: Send Switch Stat variables to JavaScript

Hello, You don't need necessarily use Javascript. You may use the built-in functions "Calculation" Aleksander The problem with the Switch Calculation is that you get atleast one decimal and HP SmartStream Designer Imposition is not able to import an imposition containing a . in the file n...
by LasseThid
Mon Mar 30, 2015 10:32 am
Forum: LEGACY scripting
Topic: Send Switch Stat variables to JavaScript
Replies: 10
Views: 14440

Send Switch Stat variables to JavaScript

Is it possible to somehow use the Stat.TrimboxWidth and Stat.TrimboxHeight variables in a JavaScript for use in a calculation?
I need to somehow calculate the width and height of a pdf in millimeters without decimals and then send the result back to switch.
by LasseThid
Mon Mar 30, 2015 10:26 am
Forum: Preflighting
Topic: Switch Developer Server
Replies: 3
Views: 8696

Re: Switch Developer Server

Thanks for the information Thomas.
I will look in to that.
by LasseThid
Fri Mar 27, 2015 3:01 pm
Forum: Flows
Topic: Run length calculation
Replies: 15
Views: 16675

Re: Run length calculation

Thanks to everyone who has helped me with this script. *thumbsup* When I changed the workspace from Design to Run I noticed there was an error in line 17 of the script, (Use of undefined variable 'runLength') :oops: . I added qoutes around runLength and started the flow and now the file went to the ...
by LasseThid
Fri Mar 27, 2015 12:42 pm
Forum: Flows
Topic: Run length calculation
Replies: 15
Views: 16675

Re: Run length calculation

I copied your code and pasted it into SwitchScripter and this time I didn't get the syntax error I got last time I had the quotes... Unfortunately the pdf is still stuck in the PDF with metadata folder, I though the job.sendToSingle was the part that would tell Switch to send the job along, but perh...
by LasseThid
Fri Mar 27, 2015 10:25 am
Forum: Flows
Topic: Run length calculation
Replies: 15
Views: 16675

Re: Run length calculation

I added the code in SwitchScripter, but I had to do some modifications in order to be able to save it (syntax errors), but when I run the flow the pdf is not processed by the Script element, it just sits in the PDF with Metadata folder, so obviously there's something I have missed. Any Ideas? functi...