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

Structure documents method

Advocate ,
Feb 16, 2012 Feb 16, 2012

Copy link to clipboard

Copied

Hello all,

I have almost finished my fully automated conversion project for a customer who has a lot of books, each containing lots of chapters, which must be converted to structured FM without losing anything of the current formatting. Quite a task, but it is looking good. I have a preprocessing script and a postprocessing script but the step in the middle is missing. I need to call the StructureTools > Utilities > Structure Documents command and pass it the name of the conversion table, the name of the origin directory and the name of the destination directory. This is just about the only step the customer has to do manually. If there is a way to incorporate this in the script that would be beautiful, but I cannot find the command anywhere. Am I looking for something impossible ?

Ciao

Jang

TOPICS
Scripting

Views

2.1K

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

Deleted User
Feb 16, 2012 Feb 16, 2012

Hi, Jang--

The command you're looking for is the global method CallClient().

A number of utilities, including the structure generator, are implemented via FDK clients. The API info you'll need can be found in Appendix A of the FDK Programmer's reference.

Votes

Translate

Translate
Guest
Feb 16, 2012 Feb 16, 2012

Copy link to clipboard

Copied

Hi, Jang--

The command you're looking for is the global method CallClient().

A number of utilities, including the structure generator, are implemented via FDK clients. The API info you'll need can be found in Appendix A of the FDK Programmer's reference.

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
Advocate ,
Feb 17, 2012 Feb 17, 2012

Copy link to clipboard

Copied

Hi Oliver,

Thanks for this pointer. It allows me to solve another couple of problems with the conversion - such as a coverpage that requires another root element and therefore another conversion table. I found the info in the FDK reference and it seems pretty clear, so I do not expect any problems with it.

Ciao

Jang

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
Advocate ,
Feb 17, 2012 Feb 17, 2012

Copy link to clipboard

Copied

As I said, I did not expect any problems following the instructions in the FDK...

Except that it does not seem to work in the same way from ExtendScript. I am using the following piece of code and there is NO result whatsoever. In the code, the doc is the active document and the convtable is a handle to the opened conversion table - that part works fine.

if ( convtable.ObjectValid() && doc.ObjectValid() ) {

  myarg = "InputDocId " + doc.id;

  CallClient ( "Structure Generator", myarg );

  myarg = "RuleDocId " + convtable.id;

  CallClient ( "Structure Generator", myarg );

  myarg = "GenerateDoc";

  CallClient ( "Structure Generator", myarg );

}

The "nice" thing is that a CallClient to the Structure Generator always returns FE_Success, no matter what. I tried passing the objects first, but that did not work, so I found the 'id" in the Data Browser and figured that would be the ID that the FDK is talking about. Maybe not. There is no pointer in the ExtendScript reference to finding out the ID of an object, or I have not been looking in the right places...

Jang

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
Guest
Feb 17, 2012 Feb 17, 2012

Copy link to clipboard

Copied

You're correct that the .id property is the referenced ObjectID value.

The one thing that jumps out at me is that the fdkref I'm looking at lists five calls, not three.

F_ApiCallClient("Structure Generator", "InputDocId objectID");

F_ApiCallClient("Structure Generator", "RuleDocId objectID");

F_ApiCallClient("Structure Generator", "OutputDocName pathname");

F_ApiCallClient("Structure Generator", "LogName pathname");

F_ApiCallClient("Structure Generator", "GenerateDoc");

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
Advocate ,
Feb 17, 2012 Feb 17, 2012

Copy link to clipboard

Copied

That I know. The two calls I left out are irrelevant for the process. They omit saving the converted output (step 3) and suppress the generation of a Log file (step 4).

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
Guest
Feb 17, 2012 Feb 17, 2012

Copy link to clipboard

Copied

The output file isn't relevent?

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
Advocate ,
Feb 17, 2012 Feb 17, 2012

Copy link to clipboard

Copied

If you do not specify an outputfile it remains open as UntitledXX.fm (with digits for the XX). It is in the specs.

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
Guest
Feb 17, 2012 Feb 17, 2012

Copy link to clipboard

Copied

LATEST

Ah. You're right. I had misread that sentence as refering to the path as optional, not the call.

The only other thing I can think of (which you've probably already tried) would be to assume Adobe applied the ES object-abstraction layer to this client as well, and try passing the Doc objects directly, rather than by .id. Other than that, I can only hope someone from inside Adobe weighs in.

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