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

ID script: move page without deleting it afterwards

New Here ,
Jul 15, 2020 Jul 15, 2020

Copy link to clipboard

Copied

 

Hello,
i am looking for a solution to move a page via script without deleting it from the source. In the dialog this is possible by checking the checkbox if it is not activated.
How is this possible via script?
I have to use the move function and not duplicate or copy, otherwise the layout will not be placed correctly in the target.
Here is my example but I could not find the checkbox option in the documentation.
sourcePage.move(LocationOptions.AFTER, destDocument.pages[0]);

 

MELAF_0-1594809801439.png

 

TOPICS
How to , Scripting

Views

295

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 15, 2020 Jul 15, 2020

Use duplicate method, it should do what you want

Page duplicate ([to:LocationOptions=LocationOptions], reference:Varies Page Spread)

Duplicates the page.

Parameter

Type

Description

to

LocationOptions

LocationOptions.AFTER

LocationOptions.AT_BEGINNING

LocationOptions.AT_END

LocationOptions.BEFORE

LocationOptions.UNKNOWN

The location at which to place the duplicate page relative to the reference object or within the document or spread. (Optional)

(default: LocationOptions.AT_END

...

Votes

Translate

Translate
Community Expert ,
Jul 15, 2020 Jul 15, 2020

Copy link to clipboard

Copied

LATEST

Use duplicate method, it should do what you want

Page duplicate ([to:LocationOptions=LocationOptions], reference:Varies Page Spread)

Duplicates the page.

Parameter

Type

Description

to

LocationOptions

LocationOptions.AFTER

LocationOptions.AT_BEGINNING

LocationOptions.AT_END

LocationOptions.BEFORE

LocationOptions.UNKNOWN

The location at which to place the duplicate page relative to the reference object or within the document or spread. (Optional)

(default: LocationOptions.AT_END)

reference

Page

Spread

The reference object. Note: Required when the to value specifies before or after. Can accept: Page or Spread. (Optional)

 

-Manan

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