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

scaling a document up

Return to Member Forum

  • Author
    Posts
    • #61755
      bhopfner
      Participant

      I have script that can scale an indesign document up or down. Down works great and I can go up to about 125% and then the script dies because something is fallling off the pasteboard.

      To fix this I tried to increase the slug area to enlarge the pasteboard but that still doesn't seem to work. Does anyone have any ideas?

      I can post code snippets if that would help.

      Thanks,

      Bob

    • #61756

      Is it horizontal or vertical scaling that's causing problems?

      Horizontally, the pasteboard extends to again your entire page width — which, interestingly enough, I never thought about before. So it would seem you are quite safe scaling up to 200%.

      The vertical extent is in your Preferences: Guides & Pasteboard: Minimum Vertical Offset, and has a default of 1 inch. I wonder why your “slug” trick doesn't work; if I increase it, there is still 1 inch extra above and below it. (But changing the slug back also resets the pasteboard to what it was before.)

      But you can set this pasteboard size directly from within a script.

      CS4:

      app.activeDocument.pasteboardPreferences.minimumSpaceAboveAndBelow = “15cm”;

      (see https://jongware.mit.edu/idcs4j…..rence.html)

      CS5 and 5.5: uh.

      It changed; see https://jongware.mit.edu/idcs5j…..rence.html. Apparently it's now “pasteboardMargins”, and now you can set the space all around at will.

    • #61762
      bhopfner
      Participant

      That's perfect!

      with(app.pasteboardPreferences)
      {

      pasteboardMargins = “6in”;

      }

      This isn't working, how do I set this?

    • #61763

      I don't know, I haven't been scripting specifically for Cs5. But the ref says it's an array, not a single value, so you could try

      pasteboardMargins = [ “6in”, “6in”, “6in”, 6in ];

      The ref does not mention how it works; I would guess it adds these amounts all around. If you cannot get it to work, look at what is reported for the values are in your current document:

      alert (“Pasteboard is :”+app.activeDocument.pasteboardPreferences.pasteboardMargins.join(“, “)+” big”);

    • #61764

      Oh wait, I don't think you would want to apply your custom values to “app”. That would set it as the new default for all of your new documents! Better only change your current active document; change your first line to

      with (app.activeDocument.pasteboardPreferences)

    • #61767
      bhopfner
      Participant

      the alert came back -0.013888888, 1 Big

      2 and 4 value arrays didn't work. The dom says minimum vertical and horizontal width, so that leads me to believe it should be 2 values like the alert gave us.

      with(app.activeDocument.pasteboardPreferences)
      {
      alert (“Pasteboard is :”+app.activeDocument.pasteboardPreferences.pasteboardMargins.join(“, “)+” big”);
      pasteboardMargins = [ “-1”, 12];

      }

      Which works!

      BUT it STILL doesn't fix the problem of “objects leaving the pasteboard” WHY? I scaling the document, slug and pasteboard BEFORE the art, and still there isn't viable space for it?

    • #61768
      bhopfner
      Participant

      Thank Jongware,

      sorry the 2 value array did finally work. I threw this up on Adobe's forums too, just in case this is a large issue with Adobe and not just my spaghetti code.

      object leaves the pasteboard

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