Send Highlighted pages to backup

New Here ,
Dec 22, 2019 Dec 22, 2019

Copy link to clipboard

Copied


var SendHighlight = app.trustedFunction(function()
{// Privileged context is necessary to prevent JavaScript warning messages on dialog
app.beginPriv();
try{global.oExtrSumDoc.path; } catch(e){
global.oExtrSumDoc = app.newDoc();}
for(var nPg=0;nPg<event.target.numPages;nPg++) {
var oAnnots = event.target.getAnnots(nPg);
if(oAnnots){
global.oExtrSumDoc.insertPages(global.oExtrSumDoc.numPages-1,event.target.path,nPg);}}
app.endPriv();
});

 

//</CodeAbove>

//<JSCodeSnippet name="ImageData6">
var strData6HighlightPages =
"ff99d0b0ffb5ddc6ffb5ddc6ffb5ddc6ffb5ddc6ffb5ddc6ffb5ddc6ffb5ddc6ffb5ddc6ffb5ddc6ffb5ddc6ffb3dcc4bf95c5aa2e3c5348030000000000000000000000000000000000000000000000ffb3dbc4ffc7e5d4ffb9dcc8ffb1d7c2ffaed4beffaed4beffaed4beffaed4beffaed4beffadd3beffacd3bcfff6faf8ffeef7f2d391c0a5363854460300000000000000000000000000000000000000ffb2dac3ffcfecdcffcaead8ffcae9d7ffc7e7d5ffc7e7d5ffc7e7d5ffc7e7d5ffc7e7d5ffc5e6d3ffb1d8c2fff6faf7ffffffffffebf5efd38fbca37e91382448a94638081f1f1f0000000000000000ffb0d8c1ffd2edddffccebd9ffcdebdaffccebdaffcdebdaffcdebdaffccebd9ffccebd9ffccebd9ffb4d9c4fff6faf8fffffffffff5f0eeffc07064fdc94949f3f08c8c87c6808013351a1a01000000ffafd7bfffd4eedfffd0ecdcffd0ecdcffd0ecdcffd0ecdcffd0ecdcffd0ecdcffd0ecdcffd0ecdcffb6dac6ffb7d8c6ffb6d3c4ffa2a4a0ffab5c5bfff18b8bfffbb5b5f9e872729aa53838131a0d0dffacd5bdffd7efe2ffd3eddeffd3eddeffd3eddeffd3eddeffd3eddfffd3eddeffd3eddfffd3eddeffc9e7d6ffc2dbcdff9ba59fffbcbebeff959898ffc09494ffcf6262ffcd4545f3a2292962390d0affa9d3bbffdbf1e5ffd7efe1ffd7efe1ffd7efe1ffd7efe1ffd7efe1ffd7efe1ffd7efe1ffd7efe1ffd9e1dbffe55398ffc485a4ffa8aaa8ff7d7d7cff868483ff9d5151ff992525e8711812750f0202ffa7d0b9ffdef2e7ffdbf1e4ffdbf1e4ffdbf1e4ffdbf1e4ffdbf1e4ffdbf1e4ffdbf1e4ffdce7e0ffe8579cffe93790fff162b6ffab598eff888a88ffa3a4a4ff837b7ef3652b299f19060439000000ffa5cdb6ffe2f4eaffdff2e7ffdff2e7ffdff2e7ffdff2e7ffdff2e7ffdff2e7ffe1dfdeffec4e99ffe7358dfff869bdfffc23b0fff41eaaffb06793ff959394f24c4649a61815154500000009000000ffa2cbb4ffe5f5ecffe3f4eaffe3f4eaffe3f4eaffe3f4eaffe3f4eaffe3eae5ffec519affe9338dfff769bcfffc22b0fffc1aaffff71ba1ffe61386fc7c3556b6151013480000000b00000000000000ffa0c9b1ffeaf6efffe7f5edffe7f5edffe7f5edffe7f5edffe8e7e7ffeb5ca0ffe7378efff975c2fffc25b0fffc19aefff71ba2ffe71084ff9c1755ea2821226b0000000c0000000000000000000000ff9dc7afffedf8f2ffebf7f0ffebf7f0ffebf7f0ffebedebffe98ab6ffe83e93fff975c3fffc23b0fffc19aefff61ba0ffe71084ff951954ff71646ada31533f39000000000000000000000000000000ff9bc4acfff1f9f4ffeff9f3ffeff9f3ffeff9f3ffe2cadaffe05ca2fff971c1fffc23b0fffc1aaffff71ba2ffe71084ff951b55ff6f6569ffc2c3c2d544725834000000000000000000000000000000ff99c2abfff5fbf7fff3faf6fff3faf6fff2f8f5ffd4b2cdffd6b5ccffd645a5fffb1aaefff71ba1ffe71084ff931d54ff716a6cffc0c4c2fff6f7f7d544755934000000000000000000000000000000ff96c0a8fff7fcf9fff7fcf9fff7fcf9ffe6dbe5ffdcbfd4ffead3e4ffbd7bacffe22c9dffec1087ff8a2555ff756f71ffc4c8c5fff1f6f3fffdfefdd541745734000000000000000000000000000000ff94bea6fffafdfcfffafdfbffeff1f0ff968292ffdfc7daffc895bbffa06191ff834b75ff7c3558ff808180ffd0d3d1fff5f8f6fffafdfbfffefffed53f715334000000000000000000000000000000ff92bca4fffcfefdfffcfefdffc7c5c7ff574f56ff43303fff995c8aff63505eff747073ffa1a2a2ffdcdeddfffafcfbfffcfefdfffcfefdfffeffffd53d6e5234000000000000000000000000000000ff90bba2ffffffffffffffffff70686eff30282eff423e41ff706e6fffacadacffdcdddcfff3f3f3fffdfdfdffffffffffffffffffffffffffffffffd53a6b5034000000000000000000000000000000ff7dae93ffd2e3d9ffd2e3d9ff909a96ff738078ff88978fffaebeb5ffc6d7cdffd0e1d8ffd1e1d8ffd2e3d9ffd2e3d9ffd2e3d9ffd2e3d9ffd2e3d9d5386a4d340000000000000000000000000000006a284c37a7193023b1182e21aa162a1faa15271ca8162c1fa8182f22a8182f22a8193022a8193022a8193022a8193022a8193022a8193022a8193022941122192a000000000000000000000000000000";
//</JSCodeSnippet>


// Icon Generic Stream Object
//<JSCodeSnippet name="ButtonIconDef">
var oIconHighlightPages = null;
//if(app.viewerVersion < 7){
oIconHighlightPages = {count: 0, width: 20, height: 20,
read: function(nBytes){return strData6HighlightPages.slice(this.count, this.count += nBytes);}};
//}else{
//}
//</JSCodeSnippet>

//<JSCodeSnippet name="EventCode">
//</JSCodeSnippet>

//<JSCodeSnippet name="ButtonObjDef">
var oButObjHighlightPages =
{cName: "HighlightPages",
cExec: "SendHighlight()",
cEnable: "event.rc = (app.doc != null)",
cMarked: "event.rc = false",
cTooltext: "Send highlighted Pages to backup",
oIcon: oIconHighlightPages,
cLabel: "Highlight Pages"};
//</JSCodeSnippet>

try{app.removeToolButton("HighlightPages");}catch(e){}

//<JSCodeSnippet name="TryAddBut">
try
{
//</JSCodeSnippet>
//<JSCodeSnippet name="AddButtonfn">
app.addToolButton(oButObjHighlightPages);
//</JSCodeSnippet>
}catch(e){}
//</JSCodeSnippet>

 

//*****

000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000095471711554796d1554796d1554796d1554796d1554796d1554796d1554796d1554796d1554796d1554796d1554796d1554796d1554796d1554796d095471710000000000000000000000001350786bd15c8075fe79968dff7b978eff7b978eff7b978eff7b978eff7b978eff7b978eff7b978eff7b978eff7b978eff7b978eff7b978eff7b978efe79958cc85b7f740f557766000000000000000051547a6eff9aafa8ffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeefe99aea740537b6f000000000000000055547b6fffa1b4aeffeeeeeeff83f2d0ff7bf3cdff7bf3cdff7bf3cdff7bf3cdff7bf3cdff7bf3cdff7bf3cdff7bf3cdff7bf3cdff7bf3cdff8ef2d3ffeeeeeeffa1b4ae44527b6c000000000000000055547b6fffa1b4aeffeeeeeeff41f6bdff2df6b8ff29f6b6ff29f6b6ff30f6b9ff33f6baff2af6b6ff29f6b6ff2bf5b6ff5dd7c4ff38edbaff4af5bfffeeeeeeffa1b4ae44527b6c000000000000000055547b6fffa1b4aeffeeeeeeff5af6c6ff4df7c2ff4df7c2ff45f7c0ff4ef7c3ff4ff7c3ff43f7bfff39f7bbff45edbffff57deeff9eb7d7ff59f5c4ffeeeeeeffa1b4ae44527b6c000000000000000055547b6fffa1b4aeffeeeeeeff5af6c6ff4dd2bcff4a9cb1ff5af7c6ff50f7c3ff50f7c3ff59f8c7ff56f7c5ff50f6c3ff71deccff59f0c6ff6af6caffeeeeeeffa1b4ae44527b6c000000000000000055547b6fffa1b4aeffeeeeeeff80f4d2ff4a63a7ff4348a0ff6abac1ff79f9d1ff7cfad2ff80fad4ff7ffad3ff74f9cfff76f9d0ff62f8caff87f7d4ffeeeeeeffa1b4ae44527b6c000000000000000055547b6fffa1b4aeffeeeeeeff638eb7ff4347a0ff4347a0ff4855a4ff79e3cdff7ff4d3ff5978b8ff6aafc4ff81fad4ff81f9d4ff7de7d1ff93f7d8ffeeeeeeffa1b4ae44527b6c000000000000000055547b6fffa1b4aeffeeeeeeff4e52a5ff4347a0ff4347a0ff4347a0ff5376aeff6297beff4c50afff4e55b0ff76d8cdff7ad5cdff6770bcff89c2cfffeeeeeeffa1b4ae44527b6c000000000000000055547b6fffa1b4aeffeeeeeeff4e52a5ff4347a0ff4347a0ff4347a0ff4347a0ff484ca8ff4c50afff4c50afff5468b5ff687cbeff666abbff7d81c4ffeeeeeeffa1b4ae44527b6c000000000000000055547b6fffa1b4aeffeeeeeeff4e52a5ff4347a0ff4347a0ff4347a0ff4347a0ff4347a0ff4a4eacff4c50afff4c50afff575bb4ff666abbff7d80c4ffeeeeeeffa1b4ae44527b6c000000000000000055547b6fffa1b4aeffeeeeeeff9193c4ff8a8dc1ff8a8dc1ff8a8dc1ff8a8dc1ff8a8dc1ff8c8ec3ff9092c9ff9092c9ff9092caff9d9fd0ffacaed5ffeeeeeeffa1b4ae44527b6c00000000000000004f537a6dff96aca5ffedededffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffeeeeeeffedededfd95aba43f54796d00000000000000000f557777c65a7e72fe6a8a80ff6b8b81ff6b8b81ff6b8b81ff6b8b81ff6b8b81ff6b8b81ff6b8b81ff6b8b81ff6b8b81ff6b8b81ff6b8b81ff6b8b81fd6a8b81be587c720c557f6a000000000000000000000000027f7f7f043f7f7f043f7f7f043f7f7f043f7f7f043f7f7f043f7f7f043f7f7f043f7f7f043f7f7f043f7f7f043f7f7f043f7f7f043f7f7f043f7f7f027f7f7f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

 

 

TOPICS
Create PDFs

Views

117

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 25, 2019 Dec 25, 2019

Copy link to clipboard

Copied

Hi,

 

I am learning javascript and it would be helpful if you can briefly elaborate in plain English what exactly is the problem with the code.

 

Is it actually working? partially working? 

 

Have you tested it and it didn't output the result that you were expecting?

 

 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 26, 2019 Dec 26, 2019

Copy link to clipboard

Copied

This is code created from a tool I wrote many years ago. In fact, this looks just like code I would have written. Please tell us where you acquired this code, and elaborate on the issue you are having 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

What is your doubt

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Sep 02, 2020 Sep 02, 2020

Copy link to clipboard

Copied

What is the problem with this string?

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines