PowerSwitch and versioning

Sylvain.H

Member
Hi,

I would like to create documents the following way.

I have a PDF background (A) and another document (B) containing, for example, 10 pages (B1,B2,B3,B4...).

What I try to do is : generating 10 separate documents with A as a background and B as watermark. That would give me 10 documents (A+B1, A+B2, A+B3, A+B4...)

I have PowerSwitch and a the whole bunch of Adobe CS suite softwares.
I tried to write a javascript but I don't succeed to make it work with absolute and relative paths !

One of my operator will use the flow from another plant. PowerSwitch runs on a dedicated MacPro.

Any clue or any other easier way ?

Thanks
 
Who's your reseller, can they help you? Where are you located? Which products do you have running in PowerSwitch?
 
My resellers is O2i and help is not possible (!). I'm in France.

The only product used in my flow in PowerSwitch Acrobat Professional 9.

I think the problem comes from my script. Maybe can I send you the flow with the script. I'm not very used to JavaScript.
 
I did it !

Finally fund the answer !

First mistake : didn't knew how to talk with addWaterMarkFromFile.
Second mistake : bOnTop had to be on false. (It gave me a white document on true !)
Third mistake... the best of all : nOpacity had to be on 1 instead of 0 !!


Script :

doc = app.activeDocs[0];

doc.addWatermarkFromFile({
cDIPath: "/Volumes/OtoFlows/OUT/Demonte_fond/fond.pdf",
bOnTop: false,
bOnScreen: true,
bOnPrint: true,
nHorizAlign: 0,
nVertAlign: 0,
nHorizValue: 0,
nVertValue: 0,
nScale: 1,
bFixedPrint: false,
nRotation: 0,
nOpacity: 1
});
 
Excellent! You know if you have a support contract with Enfocus that they will help as much as they can. Some issues they have to turn over to Professional Services, a paid service. But they're always there. If you need a consultant for Switch I can try and be of service. Why can't O2i help?
 
I thought...

I thought...

... it was done... But PowerSwitch is faster than light ! And the real problem is here :

how can I say to Acrobat to do this :

foreach("PDF file" in "the folder TOTO")
{
0- open Acrobat
1 - set var bibi = "the name of the file" minus "a part of the name of the file";
2 - if (the name of the file contains "RS")
{
addWaterMarkFromFile(path : somewhere + / + RS-F + var bibi + .pdf)
}
else
{
addWaterMarkFromFile(path : somewhere else + / + RV-F + var bibi + .pdf)
}
3 - save it as a PDF with the name "var bibi.pdf"
}



I think the step 0 can be avoided by using the "acrobat brick" instead of a simple "script brick".
And I think that I can put var bibi in the "Acrobat brick" arguments...

But I'm kinda lost in writing sweet words to Acrobat using javascript !
 
I'm Late...

I'm Late...

But I did it... about a year ago. Here is the final script :


var theDoc = app.openDoc($infile);

var thePathRectoSeul = "/Users/MacPro/Documents/PPS_FILE/fonds/RS-F_"+$arg1;
var thePathRecto = "/Users/MacPro/Documents/PPS_FILE/fonds/RV-F-R_"+$arg2;
var thePathVerso = "/Users/MacPro/Documents/PPS_FILE/fonds/RV-F-V_"+$arg2;


//depending on the infime name, I "read" if it is only front side or both sides
var chaineToTest = $filename;
var resultat = chaineToTest.search(/RS.+/);
//if resultat=1 front side only else both sides


if($error == null)
{
//on active le fichier à repiquer
doc = app.activeDocs[0];

try
{
//si resultat différent de -1 = si nom de fichier $filename contient RS
if(resultat != -1)
{
console.println("\n La valeur de thePathRectoSeul est : "+thePathRectoSeul);
doc.addWatermarkFromFile({cDIPath: thePathRectoSeul ,bOnTop: false,bOnScreen: true,bOnPrint: true,nHorizAlign: 0,nVertAlign: 0,nHorizValue: 0,nVertValue: 0,nScale: 1,bFixedPrint: false,nRotation: 0,nOpacity: 1});
}

//SINON, on traite un RECTO VERSO
else

{
var monBooleen = false; //impaire
for (var i = 0; i < theDoc.numPages; i++)
{
if(monBooleen == false)//SI PAGE IMPAIRE (RECTO)
{
console.println("\n La valeur de thePathRecto est : "+thePathRecto);
doc.addWatermarkFromFile({cDIPath: thePathRecto, nStart: i , nEnd: i, bOnTop: false,bOnScreen: true,bOnPrint: true,nHorizAlign: 0,nVertAlign: 0,nHorizValue: 0,nVertValue: 0,nScale: 1,bFixedPrint: false,nRotation: 0,nOpacity: 1});
//la page suivante est une page paire
monBooleen = true; //paire
console.println("\n La valeur de monBooleen pour page impaire est : "+monBooleen);
}
else//SINON PAGE PAIRE (VERSO)
{
console.println("\n La valeur de thePathVerso est : "+thePathVerso);
doc.addWatermarkFromFile({cDIPath: thePathVerso, nStart: i , nEnd: i, bOnTop: false,bOnScreen: true,bOnPrint: true,nHorizAlign: 0,nVertAlign: 0,nHorizValue: 0,nVertValue: 0,nScale: 1,bFixedPrint: false,nRotation: 0,nOpacity: 1});
//la page suivante est une page impaire
monBooleen = false; //impaire
console.println("\n La valeur de monBooleen pour page paire est : "+monBooleen);
}
}
}
}
catch(theError)
{
$error = theError;
doc.closeDoc( {bNoSave : true} );
}
}

$error
 

PressWise

A 30-day Fix for Managed Chaos

As any print professional knows, printing can be managed chaos. Software that solves multiple problems and provides measurable and monetizable value has a direct impact on the bottom-line.

“We reduced order entry costs by about 40%.” Significant savings in a shop that turns about 500 jobs a month.


Learn how…….

   
Back
Top