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

Create Text Frame and flow table

Contributor ,
Aug 29, 2016 Aug 29, 2016

Copy link to clipboard

Copied

Dear Friends,

I need your help "Very urgent"

How to overset text frame (table) content flow to next text frame? The next frame need to create.

Before

Float1.png

After - I need

Float2.png

Please suggest Friends

Thanks in Advance

KS

TOPICS
Scripting

Views

587

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

Enthusiast , Aug 29, 2016 Aug 29, 2016

If you select a textframe, you have a textframe already. So if you choose app.selection[0].textFrames[0], this means a anchored textframe inside a textframe.

And: You try to create your textframe on page 1. But you must add the new textframe on the page that followed the page of your selection.

So try this one:

var curDoc = app.activeDocument;

var frame1 = app.selection[0];

var parPage = frame1.parentPage.documentOffset;

var frame2 = curDoc.pages[parPage+1].textFrames.add({geometricBounds: [50, 50, 10

...

Votes

Translate

Translate
Contributor ,
Aug 29, 2016 Aug 29, 2016

Copy link to clipboard

Copied

Dear Friend

             

Please any one replay my above question?

Thanks in Advance

KS

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
Enthusiast ,
Aug 29, 2016 Aug 29, 2016

Copy link to clipboard

Copied

KS, since this is a special task and since this take longer than 5 minutes, you should pay someone, if this is urgent needed.

No matter how, not everything is clear. So where is your idml-example? What did you try before? Where is your code snippet? Select table or table frame by hand? Frame fitting? Only one frame on the right, that must get new bounds or 50 frames in 20 documents …

So, a lot of questions. Maybe not a good place for a forum!

Kai

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
Contributor ,
Aug 29, 2016 Aug 29, 2016

Copy link to clipboard

Copied

Hi Kai,

Thanks to your replay! Ok i understand that.

I need one suggest only. How to link text frame to text frame (Overset text frame with empty text frame).

Thanks in Advance

KS

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
People's Champ ,
Aug 29, 2016 Aug 29, 2016

Copy link to clipboard

Copied

To link text frames, use the previousTextFrame property of a text frame.

So, if you want to link frame 2 to frame 1, do this:

frame2.previousTextFrame = frame1;

HTH,

Ariel

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
Contributor ,
Aug 29, 2016 Aug 29, 2016

Copy link to clipboard

Copied

Hi Ariel,

First Thanks to your nice replay. My code is below i am going way is right?

var frame1 = app.selection[0].textFrames[0];

var myTextFrame = app.activeDocument.pages.item(0).textFrames.add();

var frame2 = myTextFrame.geometricBounds = [50, 50, 560, 560];

frame2.previousTextFrame = frame1;

Please guide me Friend

Thanks in advance

KS

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
Contributor ,
Aug 29, 2016 Aug 29, 2016

Copy link to clipboard

Copied

Screenshot below

Untitled.png

One More Thanks

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
Enthusiast ,
Aug 29, 2016 Aug 29, 2016

Copy link to clipboard

Copied

If you select a textframe, you have a textframe already. So if you choose app.selection[0].textFrames[0], this means a anchored textframe inside a textframe.

And: You try to create your textframe on page 1. But you must add the new textframe on the page that followed the page of your selection.

So try this one:

var curDoc = app.activeDocument;

var frame1 = app.selection[0];

var parPage = frame1.parentPage.documentOffset;

var frame2 = curDoc.pages[parPage+1].textFrames.add({geometricBounds: [50, 50, 100,100]});

frame2.previousTextFrame = frame1;

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
Contributor ,
Aug 29, 2016 Aug 29, 2016

Copy link to clipboard

Copied

LATEST

Hi Kai,

Thanks you so mach!

Your coding working fine.

One more thanks

KS

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
People's Champ ,
Aug 29, 2016 Aug 29, 2016

Copy link to clipboard

Copied

That's basically correct, but you're creating an unnecessary variable. Try this:

var frame1 = app.selection[0].textFrames[0];

var frame2 = app.activeDocument.pages.item(0).textFrames.add();

frame2.geometricBounds = [50, 50, 560, 560];

frame2.previousTextFrame = frame1;

Now, if you want to link the text frame with the table to the big empty text frame, you'll have to get a reference to those 2 frames somehow. That depends on how they were created, but the basic principle is shown in the code above.

Ariel

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