Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

How to change a spread's page width?

Return to Member Forum

  • Author
    Posts
    • #1231795

      Hi mates!
      I`m automating the creation of the covers of a book collection. They have a very basic design: a spread with five pages (left flap, back cover, spine, front cover and right flap), a black background, white texts, author, title, volume number, isbn and codebar, little fragment of text, and flaps with previous and next volumes in collection.
      Until now, the script is working. Maybe not refined, hadnsome code, but it works.
      But… I’m unable to stablish the spine (page #2) width. The only code that do something is this:

      with (app.activeDocument.documentPreferences) {
      pageWidth = ’60mm’;
      }

      but it only works with normal, facing pages document. And for all pages in doc.
      I have tried more things with no results at all. I’m very clumsy with Object model viewer.

      Some advice, mates?
      Thanks in advance, and I hope you understand my english.

    • #12343208

      Well, I have found the solution in http://www.indesignjs.de object model:

      doc.spreads[0].pages[2].adjustLayout({width:’60mm’ , rightMargin:’0′ , leftMargin: ‘0’});

      being doc the active document. By the way, I adjust the left and right margins.

    • #1236374
      Tobias Wantzen
      Participant

      Jose, the usage of pages[n].adjustLayout() is one method. The other one is to use pages[n].resize() (https://www.indesignjs.de/extendscriptAPI/indesign-latest/Page.html#d1e203105__d1e204692).

      Regards, Tobias

    • #1236384

      Thanks Tobias!

      Regards from Spain!

Viewing 3 reply threads
  • You must be logged in to reply to this topic.
Forum Ads