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

Adobe Acrobat X: Attachments and Extended Reader Functions...

$
0
0

All,

 

after adding attachments (e.g. PDF documents) to a PDF document and saving the document with "Extended Reader Functions" an error is shown in the Java debugger window:

SyntaxError: missing ) after argument list
10:Document-Level:ADBE::FileAttachmentsCompatibility

 

Adobe creates a document-level javascript function called "FileAttachmentsCompatibility" within ADBE.

Looking into the source code, the error can be easily seen

 

app.alert("Dieses Dokument hat Dateianlagen. zum Anzeigen der Anlagen klicken Sie auf "Speichern", um eine Kopie des...

(a part of the German version is shown)

 

As one can see, the highlighting "Speichern" (saving) is inside of double quotation marks.

 

This can only be solved by - again - saving the newly created document as a copy. Opening this document, one can edit the faulty script

 

Find below the corrected version:

 

var v = app.viewerVersion;
if (v < 7)
{
 var n = 0;
 if (this.dataObjects != null)  n = this.dataObjects.length;
 if (v >= 5 && v < 6 && n > 0 && (app.viewerVariation == "Full" || app.viewerVariation == "Fill-In"))
 {  if (this.external)   app.alert("Dieses Dokument hat Dateianlagen. Zum Anzeigen der Anlagen klicken Sie auf "Speichern", um eine Kopie des Dokuments zu speichern. Öffnen Sie die Kopie in Adobe Acrobat, und wählen Sie "Datei" > "Dokumenteigenschaften" > "Eingebettete Datenobjekte".", 3, 0);  else   app.alert("Dieses Dokument hat Dateianlagen. Zum Anzeigen der Anlagen wählen Sie "Datei" > "Dokumenteigenschaften" > "Eingebettete Datenobjekte".", 3, 0);
 }
 else if (v >= 6 && v < 7)
 {  if (n == 0)  {   var np = this.numPages;   syncAnnotScan();   for (var p = 0; p < np && n == 0; ++p)   {    var annots = this.getAnnots(p);    if (annots != null)    {     for (var i = 0; i < annots.length; ++i)     {      if (annots[i].type == "FileAttachment")      {       n = 1;       break;      }     }    }   }  }  if (n > 0)  {   if (this.external)    app.alert("Dieses Dokument hat  Dateianlagen. Zum Anzeigen der Anlagen klicken Sie oben in der vertikalen Bildlaufleiste des Dokumentfensters auf das schwarze Dreieck und wählen "Dateianlagen".", 3, 0);   else    app.alert("Dieses Dokument hat Dateianlagen. Zum Anzeigen der Anlagen wählen Sie "Dokument" > "Dateianlagen".", 3, 0);  }
 }
}

Viewing all articles
Browse latest Browse all 12130

Trending Articles



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