Resize the document to match the content

Hello

I would like to resize a document to match its content. This should be done by script. For example, I had only 3 items at the center of the document. In this case, these objects must be moved that all together (as a group) to the upper left corner of the document, then the document must be resized correctly, so no 'free' unused margin of space will be left. How can I do? I use InDesign Server for this task, he commands by JavaScript.

Thank you for all the comments!

This script follows the recipe:

doc = app.documents [0];

g = doc.pages [0].groups.add (doc.pages [0] .allPageItems);
Bounds = g.geometricBounds;
doc.documentPreferences.pageHeight = [2] limits - limits [0];
doc.documentPreferences.pageWidth = limits [3] - limits [1];
g.Move ([0,0]);

Peter

Tags: InDesign

Similar Questions

  • Resize the content and mulitple art advice?

    Long story short, I do the formatting of a book, adding images, etc. I received an e-mail yesterday that the size has changed. Problem is, I did so far more than 100 pages, and they are broken

    down in 10 pages / files.

    Please tell me there is a way to batch resize all this?  I don't mind doing 10 pages in time, do not want to resize all images. The text, although most likely will need to be

    handmade. Unless there is a way to export a PDF file to the right size? Or that you resize in PDF format...

    Try this thread:

    Is it possible to resize all work plans at the time the way that you used to be able to do in the configuration of document?

    You really should work in InDesign.

  • Is it possible to resize the content of at the same time multiple bounding boxes by using number fields in the toolbar?

    I'musing cs6 and need to resize an image and two text boxes on a specific pixel width.

    I try to select all the boxes and punching in 960 px in the resizing of the toolbar field, but only the bounding boxes and not their content get resized...

    Use the field of horizontal scaling (and include units) rather than the field width.

  • Resize the content of the region to fill the entire region

    I would like to create a layout container which has some of the characteristics of "BorderPane", but without exposing the methods of BorderPane (e.g. setCenter).

    I think that this is to extend the "Region" and set a BorderPane as his child:

    
        class MyPane extends Region {
          private val borderPane = new BorderPane
          borderPane setCenter foo
          getChildren add borderPane
    }
    
    

    The problem is that now the BorderPane will not be resized to fill the region. Is there a way to achieve this?

    It work?

    borderPane.setLayoutX(0);
    borderPane.setLayoutY(0);
    borderPane.minWidthProperty().bind(widthProperty());
    borderPane.minHeightProperty().bind(heightProperty());
    
  • resize the content in full screen

    It ist a nice feature (among others) that Articlate offer Captivate while not: even if a project is prepared for a smaller size, the user can easily switch to full screen without losing the quality of the fonts and other vector content. Captivate, however, does not offer this possibility. The user is stuck to a predefined screen size. And for the producer, change the size of the screen along the production process isn't hassle either. -What for the wish list? Or am I missing something here?

    I look forward to your comments.

    Hello

    The issue is that Captivate is not vector. It's basic bitmap. This means that any deviation from the greater or smaller size that you have saved will result inevitably in the degradation of quality. The extent to which it deteriorates is directly proportional to how it is size of difference.

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • How can I make Firefox resize the content the old way - resize website worldwide, not just the text?

    It worked as I want to till last week and I am seriously considering change of Chrome for this reason.

    Hello milosz123, this should be a simple solution: go to the menu view > zoom and turn off zoom text only.

  • How to resize a document and content

    Hello I have a multi page indesign document. the client is rather fickle and I need to change the size of the page, and I wonder if there are sort of make that scales the content of variances with the document. seems rather ridiculous to manually resize the content of each page individually. any help would be great

    Thank you

    Place the pages of the document in a new file of the correct size. "' You can use the script you will find here: InDesignSecrets" Blog Archive "Zanelli releases MultiPageImporter for importing PDF and INDD files to automate the implementation and make the scaling in one step.

  • Is it possible to resize the document, but keep the content proportions?

    With scripts, there are currentDocument.resizeImage () and currentDocument.resizeCanvas (). ResizeImage() method stretches the image. The resizeCanvas() will resize the canvas but not change the size of the image.

    I'm looking to resize the canvas to a new format, but keep the aspect ratio of the content. Is there a way to do this?

    OK, I got it working!

    adjustedWidth = width;

    adjustedHeight = height;

    If (imageAspectRatio > targetAspectRatio) {}

    adjustedHeight = width / imageAspectRatio;

    }

    else {}

    adjustedWidth = height * imageAspectRatio;

    }

    currentDocument.resizeImage (adjustedWidth, adjustedHeight, null, resampleMethod);

    currentDocument.resizeCanvas (width, height, AnchorPosition.MIDDLECENTER);

  • Bigger than the content documents folder

    My Documents folder shows that it contains 10 GB of data, but when I select all content (files and folders), I go out only 0.5 GB (I do not use this file, this is why it must not contain a lot). I put that it must show hidden files, too, but he has not shown any additional things. How is this? I use SSD, so this difference is crucial for me.

    All the already compressed files? In Windows Explorer, the compressed files are normally displayed in blue. You may also right-click on the file and select Properties. On the general tab, you will see the dimensions that match what is listed in the Discover Windows Explorer detail and size on disk, i.e. after the file has been compressed.

    During the reconciliation of disk space in Windows Explorer, you may experience a number of problems. File compression is a. The System Volume Information folder is another that she, she does not display the disk space used by the content of the folder, which can be considerable. You can also meet with a number of programs that hide the folders / files, which are not revealed when 'Show hidden files' is selected. Norton has adopted this procedure with Norton Protected Storage, and others followed.

    To study disk space, use download and install Treesize (freeware).
    https://www.Jam-software.de/customers/downloadTrial.php?ARTICLE_NO=80&language=en&PHPSESSID=6odgempt76un9q9nkj7luf5be0

    Information about Treesize
    http://www.Jam-software.com/treesize_free/

    When you open Treesize scan select in the Menu and you will see a list of drives. Click on C and it will generate a list of files. Display names and 6 larger files sizes and the total at the top of the list.

  • How to search for a document based on the contents of the document

    on windows xp, I could search a document based on a combination of search criteria, including part of the name of the document or a word or phrase in a document. How is a search based on the content on Windows 7?

    In general, you can simply type the content in the search box and it will find.  It highlights the content that it matched in the search results (kind of like an online search).  Here's an example where I typed the word "liberation".

    You can also combine this with the file name searches.  For example, you can type *.xls release to find all the Excel files with the word "release" in them.  If your sentence content includes spaces, put double quotes around it 'product release 12' for example.

  • Several graphic frames: resize, adjust the content proportionally, Center the content

    Hello assistants scripts! I hope one of you can help me in this simple task. How I wish that the acts were an option! I read the messages saying how from simple scripts to apple is. I have read the tutorial from start to finish and doing the exercises. I have copied excerpts from multiple sources, and the only thing I could do is to insert the content... but not proportionally.

    I use INDD CC. I have a dozen pages in tabloid format with a hundred images illustrator on each square. Here's what I have to do for everyone from graphic images:

    1. that all graphic frames the same size: 10 x 10 mm

    2. Insert the content to frame proportionally

    3 Center in the framework

    Can anyone help? Thank you!

    Hey Kevin,

    These dang millimeters! The script that I came by default to pixels of all things. So my solution (actually two scripts) isn't pretty, but it works but he paints with a broad brush... each rectangle. I hope to add a line repeat like yours, so I can see what I want. A blogger out there in the Land of script sent me a few ideas on how to combine and improve them; I hope soon to sink into their logic. These are the two that I came up with:

    Resize the frame 10 x 10 mm

    say application "Adobe InDesign CC 2014"

    activate

    say an active document

    Resize each Rectangle in internal coordinates anchor of Center of replacement of the current dimensions with values {30, 30}

    end say

    end say

    Insert the picture content (proportionally, centered)

    say application "Adobe InDesign CC 2014"

    activate

    say the active document

    say each Rectangle

    fit content to frame

    adapt given proportionally

    adapt content Center

    end say

    end say

    end say

  • [Jsfl] Document settings is by default, the content, printer, how to?

    Hello

    In a Flash Jsfl script, I want to access the Panel 'Settings of Document' (CTRL + J) and check the box "contained" for "matches" offering: 'default', 'content', 'printer '. I copy and paste in a new scene some elements that are larger than the size of the default document. And the verification of this boxing solve my problem, but I can't find any way to do with Jsfl.

    In other words, I want to do my document settings matches the scene content limits. I can't find another way to do this in Jsfl!

    Thanks for your help, tips and ideas.

    Maelvon

    This should work:

    var doc = FL.getDocumentDOM ();

    doc.selectAll ();

    Rect var = doc.getSelectionRect ();

    now loop through all the chronologies, all levels, all executives and move all instances-rect.left, rect.top

    final document.width entitled (using left rect) and right and document.height (using top and bottom rect)

  • Capture the content of the pdf presentation and create a new document based on the data?

    Are there programs that can capture the content of the pdf presentation and create a new document based on that? I want to convert the data from a pdf form to fill in an auto-generated shipping label. Thank you!

    Only field names that match exactly. You can use JavaScript and hidden fields to match the names of domain if necessary.

  • Resize the document

    Hello;

    I use a MacBookPro OS 10.6.4 with CS5 (InDesign version 7)

    I presented a book of 120 pages with a 5 "x 8" format. The preliminary pages, Table of contents, chapter headings and body text, all had policies specific and layout styles. Now, I have the book even for 6 "x 9".

    (1) I tried setting a blank template of 6 x 9 and copy the text through the 5 x 8 document but found a lot of the formatting of 5 x 8 came and it did not work.

    (2) I did 5 x 8 duplicate file and tried to resize the document (file > Document format and page layout > margins and columns) I had the layout > layout adjustment > activate setting layout click on WE but when I made the changes I found text 5 x 8 blocks don't resize properly for 6 x 9.

    What would be the best way to resize a book 5 x 8, 6 x 9, keeping the police styles intact etc., while having blocks of text resize to the new constraints?

    Thank you.

    Marc

    Adjustment of layout depends on the proper use of guides to determine how move or resize objects.

    If you had executives at the margins that they should have been resized correctly size.

    Bob

  • How to download the contents of a cd of documents

    I copied some material from my old Mac 10.6 on a CD.

    I downloaded the CD in my new MacPro.  The image of the cd remains... How can I get these documents on my Mac Pro?

    Should I make a new folder? How the content of this CD on my laptop?

    If you haven't already done so, click twice on the CD and drag its content in the Documents folder; It works the same way for other folders. Eject the CD.

    (144519)

Maybe you are looking for