Highlighted

Loop through all the files in book and align the graphics to center

New Here ,
Sep 19, 2018

Copy link to clipboard

Copied

Hi,

I need an extendscript to loop through all the files in a book and align the graphics to center.

Thanks in advance.

TOPICS
Scripting

Views

456

Likes

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

Loop through all the files in book and align the graphics to center

New Here ,
Sep 19, 2018

Copy link to clipboard

Copied

Hi,

I need an extendscript to loop through all the files in a book and align the graphics to center.

Thanks in advance.

TOPICS
Scripting

Views

457

Likes

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
Sep 19, 2018 0
Adobe Employee ,
Sep 19, 2018

Copy link to clipboard

Copied

(Moved to FrameMaker Scripting Forum.)

Likes

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
Reply
Loading...
Sep 19, 2018 0
Adobe Employee ,
Sep 19, 2018

Copy link to clipboard

Copied

What is your question? Do you need help in developing such a script? Also, it will help others, if you are a little bit more specific on the requirement.

You can find the ExtendScript developer documentation in the FrameMaker Developer Center.

Likes

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
Reply
Loading...
Sep 19, 2018 0
New Here ,
Sep 19, 2018

Copy link to clipboard

Copied

Hi Stefan,

Yes I need help in developing the script. I have a book with four files. All those four files have graphics in them.

I am using Adobe Framemaker Structured application 7.1 and 10. By default the images are aligned to the left. I need the images to be aligned right. I want a script to loop between the documents and select the graphic one by one and align it to the center.

Likes

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
Reply
Loading...
Sep 19, 2018 0
Adobe Employee ,
Sep 19, 2018

Copy link to clipboard

Copied

I guess you only want to loop through graphics in the main text flow ("A")? Or also on graphics on Master Pages and Reference Pages?

And the graphics are all inside an anchored frame and need to be center-aligned within that Frame? Or do you need to change the anchored frame? You see, there are a lot of details to think about and to specify 🙂

Likes

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
Reply
Loading...
Sep 19, 2018 0
Enthusiast ,
Sep 19, 2018

Copy link to clipboard

Copied

Next problem: So it is a structured application, the position is defined by attributes.

In this case you have to change the attributes.

Likes

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
Reply
Loading...
Sep 19, 2018 2
New Here ,
Sep 19, 2018

Copy link to clipboard

Copied

Hi Klaus,

If I am able to fix this issue in the attributes I wouldn't be needing the extendscript.

DTD:

<!ELEMENT graphic EMPTY>

<!ATTLIST graphic

    format CDATA #IMPLIED

    entity CDATA #IMPLIED

    xoffset CDATA #IMPLIED

    yoffset CDATA #IMPLIED

    position CDATA #IMPLIED

    align CDATA #IMPLIED

    width CDATA #IMPLIED

    height CDATA #IMPLIED

  >

RWR:

element "graphic"

{

is fm graphic element "Graphic";

fm property import by reference or copy value is "ref";

attribute "xoffset" is fm property horizontal offset;

attribute "yoffset" is fm property vertical offset;

attribute "position"

{

is fm property position;

value "below" is fm value "below";

}

attribute "align"

{

is fm property alignment;

value "left" is fm property value align left;

value "right" is fm property value align right;

value "middle" is fm property value align center;

}

attribute "width" is fm property width;

attribute "height" is fm property height;

}

XML:

<graphic format = "EPS" entity = "1234" xoffset = "0.197in" yoffset = "0.394in" position = "below" align = "middle" width = "6.870in" height = "8.341in"/>

I am new to structured framemaker. I need the eps file to be aligned in the center of the anchored frame. Any help is appreciated.

Likes

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
Reply
Loading...
Sep 19, 2018 0
Mentor ,
Sep 19, 2018

Copy link to clipboard

Copied

I also have sample scripts here that show things like walking through a book and how to set attributes:

FrameMaker ExtendScript Samples - West Street Consulting

In all honesty, you may be asking too much from this forum. We can help with specific, focused questions, but it is not likely that someone can just write a script for you for free.

Russ

Likes

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
Reply
Loading...
Sep 19, 2018 1
Adobe Employee ,
Sep 19, 2018

Copy link to clipboard

Copied

Have a look at this blog post and download the scripts: FrameMaker Super Find / Change Reloaded – Adobe TechComm Blog

For example, the BookIterator.jsx is used to loop through the book. There are a couple of other scripts that show how to loop through objects (although there is no specific one for graphics). Should be a good start.

Likes

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
Reply
Loading...
Sep 19, 2018 0