Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

addWatermarkFromText syntax error

$
0
0

I am trying to extract pages and add headers  with a script.

I run the script by hitting cTRL+ENTER at each semicolon (in the acrobat_x_pro javascript window).

The extraction and saving of files works just fine.

 

But the header (this.addWatermarkFromText) will not work.

 

I am getting a SyntaxError with this Source code  is:

 

SyntaxError: syntax error

1:Console:Exec

undefined

 

//================================================

 

this.extractPages(0,0);

this.saveAs("/btc-nas1/jyoung/_24X_fall_2012/pdf/INST240_sec1/INST240_sec1_fm.pdf");

this.closeDoc(true);

this.extractPages(23,48);

var strFilename = "INST240_sec1_day1";

this.addWatermarkFromText({

cText: strFilename,

nTextAlign: app.constants.align.right,

nHorizAlign: app.constants.align.right,

nVertAlign: app.constants.align.top,

nHorizValue: -72, nVertValue: -72

});

this.saveAs("/btc-nas1/jyoung/_24X_fall_2012/pdf/INST240_sec1/INST240_sec1_day1.pdf");

this.saveAs("/btc-nas1/jyoung/_24X_fall_2012/pdf/INST240_sec1/INST240_sec1_day1_quiz.pdf") ;

this.closeDoc(true);

 

//================================================

 

I get a similar error when I try to insert a page:

 

this.insertPages ({

nPage: -1,

cPath: "/btc-nas1/jyoung/_24X_fall_2012/pdf/INST240_sec1/INST240_sec1_fm.pdf",

nStart: 0

});

 

SyntaxError: syntax error

1:Console:Exec

undefined

 

 

Help  would be greatly appreciated.


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>