• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

passing web argument to pdf

New Here ,
Jul 12, 2020 Jul 12, 2020

Copy link to clipboard

Copied

Hey,

 

I'm currently checking out the adobe sdk sampleclient-php-soap.

It works so far, but I want to extend it's functions by passeing the arguments to a textframe in the .pdf file.

The pdf file just prints **not_defined** for the argument that was passed by me over the browser.

 

Below's my code:

var notDefined = "**not_defined**";
var myArg0 = app.scriptArgs.getValue("arg0");
var myResult = "arg0:  " + myArg0;

var myFile = new File(Folder.desktop + "/design.indd");
var myDocument = app.documents.add();
var textFrame  = myDocument.textFrames.add();
var myDocPreset = app.pdfExportPresets.item("[High Quality Print]");
var myExportedPDF = new File(Folder.desktop + "/ExportedPDF.pdf");

textFrame.properties =
{
    geometricBounds : [ 0,0,100,100 ],
    strokeWidth : 2,
    fillColor : "None",
    contents : myResult
};

 

TOPICS
Import and export , Scripting , SDK

Views

170

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

correct answers 1 Correct answer

Community Expert , Jul 14, 2020 Jul 14, 2020

How did you define that scriptArg?

Did you use method set() somehow before?

 

See DOM documentation:

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#ScriptArg.html

 

FWIW: Personally I never worked with that feature.

 

Regards,
Uwe Laubender

( ACP )

Votes

Translate

Translate
Community Expert ,
Jul 14, 2020 Jul 14, 2020

Copy link to clipboard

Copied

LATEST

How did you define that scriptArg?

Did you use method set() somehow before?

 

See DOM documentation:

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#ScriptArg.html

 

FWIW: Personally I never worked with that feature.

 

Regards,
Uwe Laubender

( ACP )

Votes

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