Is there a plugin or script that will optimize my layout to maximize use of document space?

I'm producing labels for museum gallery objects.  We are printing them on adhesive vinyl with peel off back (i'm not sure what the correct term is at the moment).  We pay for the labels by the sheet.  It costs the same whether I get 2 or 6 labels on an 8.5 x 11 sheet.  We get anywhere from 10 to 200+ of these labels print at a time so you can imagine it can be a challenging puzzle to maximize the use of space in order to minimize the wasted space on each sheet.  It is essentially the same issue that people using laser cutters or CNC routers run into.  The material is too expensive to let any real estate go unused unless necessary.
Is anyone aware of a plugin or script that can process a document and move text boxes or objects around to the most economical arrangement possible?  I could also produce these labels in Illustrator if this issue cannot be addressed within InDesign.
Thank you in advance for you advice!
Brandon

Well it look like Brandon lost interest when I mention the word "quote".
Either way the basic algorithm is as below.  (lines 19 to 34 - the rest is just for decoration).
I might put out a script on my site whenever it comes into existence that would do what Brandon is looking for, it would cost but not too much.
This only works for fitting heights it will not make use of the horizontal spacing.
To solve that it might be good to use what's know as the Hungarian Algorithm.  I don't have time for that to put it mildly.
I've seen the problem referred to as the "Holy Grail" see Re: Is there a script available for arranging elements for optimal use of the printable area?
Trevor
// "Trevor's Fitting Algorithm" not optimized but considering the speed of the DOM operations that would be need the optimization would be pointless
// Generate Random model of Text Frames of a range of heights to be fitted on pages of a given height
// By Trevor www.creative-scripts.com (Still not there yet!)
var st = +new Date, tt, frameCollection, pageN, a, aa, n, nFames, t, x, pageHeight, pageNumber = 1, safety, minFrameHeight, maxFrameHeight, xx, result;
safety = 500; // just in case?
nFames = 500; // The smaller this is the higher the fill % will be
pageHeight = 210;
minFrameHeight = 20; // The smaller this is the higher the fill % will be
maxFrameHeight = 160;
a = [];
frameCollection = [];
pageN = [];
xx = 0;
for (n = 0; n < nFames; n++) {a[n] = ["#" + n ,~~(Math.random() * (maxFrameHeight - minFrameHeight + 1)) + minFrameHeight];}
a.sort(function (a,b) {return a[1] < b[1]});
aa = a.join(", ");
// This is the "Trevor Fitting Algorithm"
while (a.length && safety--) {
frameCollection =[];
t = 0;
    for (n = 0; a[n] != undefined; n++) {
        x = a[n][1];
        if ((t + x) > pageHeight) continue;
        t += x;
        frameCollection.push(a[n]);
        a.splice(n,1);
        n--;
    a.shift();
    x = ~~(100* t / pageHeight);
    xx += x;
pageN.push("Page [" + pageNumber++ + "] frameCollection: " + frameCollection.join(", ") +
    " \tHeight Used: " + t + ", " + x + "%")
// Show the Results
x = pageN.length;
tt = "\nTook " + ((new Date - st)/1000) + " seconds\n";
result = "\"Trevor's Fitting Algorithm\" not optimized but considering the speed of the DOM operations that would be need the optimization would be pointless\
Generates Random model of Text Frames of a range of heights to be fitted on pages of a given height\
By Trevor www.creative-scripts.com (Still not there yet!)\n******************************\
A Random Collection of " + nFames + " Text Frames\nHeights Between " +
minFrameHeight + " and " +  maxFrameHeight +
" Whatchamacallits\nFitted on " + pageNumber +
" Pages " + pageHeight + " Whatchamacallits Tall\nAverage Page Filling: " + ~~(xx/x) +
"%\nThe # Before the Text Frame Number is it's Index (Would really use ID) this is followed by the Height of The Text Frame" + tt +
"These are the Sorted Random Text Frame Heights\n\n" +
aa + "\n\n" + pageN.join("\n") +
"\n\nLast Page Get's the Left Overs - So Might be Quite a Low % Fill\
Average Page Filling: " + ~~(xx/x) + tt;
//$.writeln(result);
var w = new Window ('dialog', '"Trevor\'s Fitting Algorithm"'),
    e = w.add('edittext', undefined, result, {multiline: true});
/* some fun and games for muti screens */ var sc = $.screens.length, h, wd, c = 0, t; h = ($.screens[0].bottom - $.screens[0].top); wd = ($.screens[0].right - $.screens[0].left); while (sc--) {    t = $.screens[sc].bottom - $.screens[sc].top;    if (t < h) h = t;    t = ($.screens[sc].right - $.screens[sc].left);    if (t < wd) wd = t;};
e.preferredSize = [.85 *wd, .85* h];
w.show()

Similar Messages

  • Script that will help validate if there is any data loss after a DB restore

    Hi,
    I need to write a single script that will perform the following
    operations:
    1)return me the highy accessed tables across all databases.
    2)List the count, Min and Max system date of the highy accessed tables returned from step 1.
    The idea is to validate if there is any data loss to the highly transactional tables after a database restore operation has been performed.
    Thanks.

    Hello,
    I would also like you to see nice blog by Aron,you can modify the script a bit to change according to your need
    http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/06/when-was-my-database-table-last-accessed.aspx
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
    Hello Shanky,
    The post would not be helpful too much for OP's requirement. The post was talking about when was the database last accessed. DMLs are not capturing in the script and also there will be many variant forms that can be applied for DML. Hence, I do not think,
    the script would help too much. 
    Or Am I missing something? 
    Latheesh as i mentioed OP has to modify the script little bit may be add User_seek,user_update,user_scans.Still IMO there is no *perfect* way to actually analyze this.So I pointed out point in my original post.Also unless he has some timestamp he cannot
    see min time when it was accessed ,max time can be taken from last user seek,scan,lookup time. Motive was to lethim know what he was trying to achieve cannot be axactly obtained by using sys.dm_index_usage_stats.Below query will give most accessed table
    : Source (Query)
    SELECT
    t.name AS 'Table',
    SUM(i.user_seeks + i.user_scans + i.user_lookups)
    AS 'Total accesses',
    SUM(i.user_seeks) AS 'Seeks',
    SUM(i.user_scans) AS 'Scans',
    SUM(i.user_lookups) AS 'Lookups'
    FROM
    sys.dm_db_index_usage_stats i RIGHT OUTER JOIN
    sys.tables t ON (t.object_id = i.object_id)
    GROUP BY
    i.object_id,
    t.name
    ORDER BY [Total accesses] DESC
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Is there an AppleScript or Automator Script that will wake a Mac from Sleep?

    Is there an AppleScript or Automator Script that will wake a Mac from Sleep?

    Frank and All,
    The following answer to your question above is complicated, but I hope it explains why my question was formed with so much frustration in it.
    I have an OpenOffice(OO) Macro that was launched with Calendar at 6pm each business night. It ran properly in all Apples operating systems until I Hit Maverick(OSX10.9). From then on, the AppleScript would run from one to 3 days, then would disappear from the Calendar entry. The Calendar alert would still run, but the "OpenFile" section of the alert would disappear. I also was running elgato EyeTV HD during the day, so I would use energy saver to put my MacBook Pro to sleep at 12 Midnight and wake it again at 9am. I picked up a used Mac Mini to do the EyeTV stuff, provide AppleTV the files in H264 format through iTunes' media share, and found it had plenty of power to do the 6pm automated stuff simultaneously as well. Because I still wanted to run the OpenOffice Macro on my MacBook Pro at 6pm, and wanted to use it for a host of other things when I was on the road, I wanted it to sleep most of the time and only wake up automatically to run the 6pm OO Macro. When I called Apple about the issue I was having with Maverick and Calendar loosing the OpenFile command as part of the Alert Message, they told me the no longer supported answering AppleScript Questions but they now would support Automator questions. I pointed out that the OpenFile would also fail after one to three days if I used a Calendar Alert to launch an Automator App. At first, I did not like Automator, but now I see why Apple is pushing us to use it. Automator adds a TIME STAMP ID to the Apps developed in Automator so the first time you launch the App after a change to it, you must reply to a dialog message saying that this is the first time you are running this version of the App. If a Scammer has replaced your app with one that can reek havoc on your computer, the replacement app will not run unless you are there to agree that you know where the modified app came from and click the OK button to continue (BRILLIANT, Enhanced Security idea on Apples part). I also noticed that after Mountain Lion, the Applescript delay timing was all screwed up as well. Well I tried to use LaunchD Task Scheduler to circumvent the Calendar Problem and that worked until I upgraded to Yosemite Last week. Then LaunchD no longer worked and I am only into a few days of using The Calendar Launched Automator App to see if it will continue to run.
    But I think I solved the dilemma I was having with opening an Automator App in a Sleeping Mac. I Googled up the following question, "AppleScript to wake up computer".  I went thru several complex responses until I found this on that is INCREDIBLE EASEY! What came back was a brettterpstra.com  response from Feb 20th,2014. What it said, in a Quick Tip: caffeinated your Terminal Article,  if you wanted to wake a Mac from sleep, use the Terminal command named "Caffeine -u -t 1". I placed it in an Automator Most Used Action called "Run Shell Script -- Caffeine -u -t 1" and it worked!  Now, I can put my Mac to Sleep but at 6pm, the Automator App will launch, run the "Caffeine -u- -t 1" command and proceed to work as if I had awakened the Mac From Sleep mode by pressing a keyboard key and had run the Automator Script with a double click.
    Sorry for the long, drawn-out reply, but maybe this will help others.

  • IDCS6(MAC) 10.9.4 - a script that will make an anchored object and paste in clipboard contents

    I'm trying to create a script that will create an anchored object that will paste in clipboard contents.
    So far I have:
    var frameRef = app.selection[0];
        var parentObj = frameRef.insertionPoints.item(0);
        var anchorFrame = parentObj.rectangles.add();
    And this works fine, creating an inline object, that can further be defined (with anchor point settings etc).
    However, it is when I go to use app.paste() or app.pasteInto() that all hell breaks loose.
    The line of code I added was:
    anchorFrame.content = app.pasteInto();
    and the error I get is:
    What am I doing incorrectly?
    Colin

    @Colin – For the paste command you like to use, you have to:
    1. First select an object, in your case the added rectangle object
    2. Then use the pasteInto() method from the app object
    3. There is no content property for a rectangle object
    Watch out what is selected after you added the rectangle.
    What you have is a selection of the text frame when you start your code in line one.
    Adding a rectangle will not change that selection.
    The following code will do the job.
    However, if you use pasteInto() the pasted objects could be only partly visible inside the frame.
    Depends on the size and position of the added rectangle relative to the original copied page items.
    Make sure that you give the rectangle a proper size after or while you are adding it:
    var frameRef = app.selection[0];
    var parentObj = frameRef.insertionPoints.item(0);
    //Will add a rectangle sized 40 x 40 mm
    var anchorFrame = parentObj.rectangles.add({geometricBounds:[0,0,"40mm","40mm"]});
    app.select(null); //Optional
    app.select(anchorFrame);
    app.pasteInto();
    Uwe

  • "A script that will delete perfstat snapshots older than 90 days with SPPURGE..."

    Hello to all my fine Oracle related friends...We are all one large extended Family...
    I want to create a script that will execute SPPURGE on Perfstat for snapshots that are older than 90 days.
    Now, I have Grid 12c Cloud Control up and running for all the Databases that we have...
    Should I use Grid 12c to execute the SPPURGE and just pass the parameters in like that?
    Or should I go "Old School" and make a Shell Script and schedule it in the crontab?
    What would you guys do?
    I want implement this for 41 "Standard Edition" Databases....some are "Data Guard".....
    Thanks,
    Xevv.

    Xevv Bellringer wrote:
    Hi Ed,
    I tried executing this manually and it's not deleting the snapshots at all.
    begin
    statspack.purge(trunc(sysdate-90),true);
    end;
    I even let it for an entire day and then altered the code like this...But when I execute it, it doesn't deleted the data..
    begin
    statspack.purge(trunc(sysdate-1),true);
    end;
    When I do a select sysdate -1 from dual; it gives the correct date?
    Could there be a "NLS Setting" some where causing this?
    How do you determine that it is not deleteding data?  (please show evidence)
    How, and how often, are you collecting a statspack snapshot?  (please show evidence)

  • I am looking for a map app that will allow me to place pins where my clients offices are on a map and keep them save every time I open the app. Does anyone out there know of an app that will do this?

    I am looking for a map app that will allow me to place pins where my clients offices are on a map and keep them save every time I open the app. Does anyone out there know of an app that will do this?

    "Motion 5" is your friend.
    Michael Wohl has a nice 15 video series (free) about Motion 5 at http://www.macprovideo.com/tutorial/motion5101-overview-and-workflow-guide (right side)
    This is a "teaser" series to sell his tutorials but it is really good. Just saw it yesterday for the first time.
    While all you want is just to place pins, realize that Motion has so much more. All kinds of effects and they can be really customized. Maybe put their street address, contact name, and phone number by the pin?
    Motion 5: cheap at $49.99 (just got my download two days ago)
    Motion 5: Support Community athttps://discussions.apple.com/community/professional_applications/motion_5
    If you're using the map for, say, deliveries, and use an iPad, what you could do is have a general map of the area imported into Motion, create the pins and whatever, then save (share?) it to the iPad.
    Disclaimer: I have virtually no relationship with anything connected with this tutorial product, developer, or anything.

  • My iphone 5 is not syncing with my laptop and windows 8. cant find an itunes app for my laptop. is there something i can get that will help with this

    My iphone 5 is not syncing with my laptop and windows 8. cant find an itunes app for my laptop. is there something i can get that will help with this?

    Lbo51380 wrote:
    cant find an itunes app for my laptop. is there something i can get that will help with this?
    Go here -> http://www.apple.com/itunes/download/

  • I installed iOS 7 and it deleted some of my contacts, as expected, so I just resaved them all. There's one particular number that will save but in my messages, it shows up as the number instead of the name saved. How do I fix it? And why is it doing that?

    I installed iOS 7 and it deleted some of my contacts, as expected, so I just resaved them all. There's one particular number that will save but in my messages, it shows up as the number instead of the name saved. How do I fix it? And why is it doing that?

    I had this problem too, I fixed it by going to my settings and under general at the bottom there is a reset option, go there. One of the options should be reset network settings, select that one. I’m not sure why it happens but that worked for me; hope you have the same luck!

  • Is there a plugin for CS6 that I need to download to get my HP Officejet 7612 Wide Format Printer to be compatible with my MacBook Pro that is running my CS6 program?

    Is there a plugin for CS6 that I need to download to get my HP Officejet 7612 Wide Format Printer to be compatible with my MacBook Pro that is running my CS6 program?

    HP Officejet 7612 mac updated drivers. You can download link.

  • I need a script that will find the computer a user last logged into.

    I am still learning scripting, I need a script that will allow me to pull in usernames from a csv file. Find what computer they last logged into and output that to an csv file.
    I have looked all over and can't find exactly what I need.
     I found the following script but I need  to add the resuitsize unlimited but can not figure out where to put it we have a large environment. Also I need to be able to grab username from a csv file. Any assistance you can provide is appreciated.
    ##  Find out what computers a user is logged into on your domain by running the script
    ##  and entering in the requested logon id for the user.
    ##  This script requires the free Quest ActiveRoles Management Shell for Active Directory
    ##  snapin  http://www.quest.com/powershell/activeroles-server.aspx
    Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
    $ErrorActionPreference = "SilentlyContinue"
    # Retrieve Username to search for, error checks to make sure the username
    # is not blank and that it exists in Active Directory
    Function Get-Username {
    $Global:Username = Read-Host "Enter username you want to search for"
    if ($Username -eq $null){
    Write-Host "Username cannot be blank, please re-enter username!!!!!"
    Get-Username}
    $UserCheck = Get-QADUser -SamAccountName $Username
    if ($UserCheck -eq $null){
    Write-Host "Invalid username, please verify this is the logon id for the account"
    Get-Username}
    get-username resultsize unlimited
    $computers = Get-QADComputer | where {$_.accountisdisabled -eq $false}
    foreach ($comp in $computers)
    $Computer = $comp.Name
    $ping = new-object System.Net.NetworkInformation.Ping
      $Reply = $null
      $Reply = $ping.send($Computer)
      if($Reply.status -like 'Success'){
    #Get explorer.exe processes
    $proc = gwmi win32_process -computer $Computer -Filter "Name = 'explorer.exe'"
    #Search collection of processes for username
    ForEach ($p in $proc) {
    $temp = ($p.GetOwner()).User
    if ($temp -eq $Username){
    write-host "$Username is logged on $Computer"

    If you are querying by user "resultset size" will be of no use.
    You also have functions that are never used and the body code doe snot look for users.
    Here is what you scrip looks like if printed well.  It is just a jumble of pasted together and unrelated items.
    ## Find out what computers a user is logged into on your domain by running the script
    ## and entering in the requested logon id for the user.
    ## This script requires the free Quest ActiveRoles Management Shell for Active Directory
    ## snapin http://www.quest.com/powershell/activeroles-server.aspx
    Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
    $ErrorActionPreference = "SilentlyContinue"
    # Retrieve Username to search for, error checks to make sure the username
    # is not blank and that it exists in Active Directory
    Function Get-Username {
    $Global:Username = Read-Host "Enter username you want to search for"
    if ($Username -eq $null) {
    Write-Host "Username cannot be blank, please re-enter username!!!!!"
    Get-Username
    $UserCheck = Get-QADUser -SamAccountName $Username
    if ($UserCheck -eq $null) {
    Write-Host "Invalid username, please verify this is the logon id for the account"
    Get-Username
    get-username resultsize unlimited
    $computers = Get-QADComputer | where { $_.accountisdisabled -eq $false }
    foreach ($comp in $computers) {
    $Computer = $comp.Name
    $ping = new-object System.Net.NetworkInformation.Ping
    $Reply = $null
    $Reply = $ping.send($Computer)
    if ($Reply.status -like 'Success') {
    #Get explorer.exe processes
    $proc = gwmi win32_process -computer $Computer -Filter "Name = 'explorer.exe'"
    #Search collection of processes for username
    ForEach ($p in $proc) {
    $temp = ($p.GetOwner()).User
    if ($temp -eq $Username) {
    write-host "$Username is logged on $Computer"
    I suggest finding the original code then use the learning link at the top of this page to help you understand how it works in Powershell.
    ¯\_(ツ)_/¯

  • I bought my first  iMac 27" i5 in November 2011 last year. Do you think there would be a update that will Features a Retina Display, Siri etc ?? So my iMac will be the same as the new one that will be released this year, Or will I have to buy a new iMac t

    I bought my first  iMac 27" i5 in November 2011 last year.
    Do you think there would be a update that will Features a Retina Display, Siri etc ??
    So my iMac will be the same as the new one that will be released this year,
    Or will I have to buy a new iMac to get all these new updates ??
    It would be a shame if I did because my iMac is only 6months old if that ..
    Kind regards Simon Trott Apple user and proud of it

    We're not allowed to speculate on future or rumoured Apple products, but we all know there'll always be newer tech coming along.
    The iMac you have is an excellent machine, be happy with it and get a good few years use out of it. By the time your machine is slowing down, whatever comes next will have been updated numerous times.
    I had the 2011 i5 27" delivered about 3 weeks ago. It's a cracking machine

  • Is there a version of iMovie that will import ProRes files?

    Is there a version of iMovie that will import ProRes files?
    Final Cut Pro does, but does iMovie HD? And which version?

    Luca,  I'm not sure acceptable life in iMovie at 60p is possible, and not sure about YouTube at this point either.
    (I have a 2.66GHz Core i5 iMac with 8GB ram running Snow Leopard OSX 10.6.8)
    My first export using QT x264 1080 59.94, auto key, +CABAC, crashed iMovie, but later times worked ok.
    The non-QT export 1080 HD computer - puts out a 29.97 fps movie with lots of motion artifacts. 
    I checked plist - videoframerate and newProjectFrameRate were 30, so changed to 60 and redid the import, title, finalize, exports, and share to YouTube.
    The non-QT export 1080 HD computer - still put out 29.97 fps.
    QT Export x264 1080 framerate 59.94 fixed, auto key, +CABAC put out a 43 Mpbs 59.94 H.264 QuickTime movie which occasionally stutters, but it appears to have the same quality as the original 1080p60 footage.
    Moving to a 1080p60 camera has been frought with disappointments.  The latest VLC can play my raw video but it often stutters (from no times to lots of times).
    Repackaging as MP4 using ffmpeg -i in.MTS -vcodec copy -acodec copy out.mp4 doesn't get rid of the stuttering. 
    Toast Video Player also has occassional stutters.
    Converting using Handbrake does not eliminate the occasional stutter.
    QT playing the prores transcoded source footage claims 255 Mbps data rate 59.94 fps, and it also stutters sometimes, sometimes not. 
    The Share... YouTube video: http://www.youtube.com/watch?v=mByr3Y3wfz4  which appears to only be 30 fps (the mp4 download is 30p).
    The 60pQT export uploaded is at: http://youtu.be/Hv1TgcoaxfM also downloads as a 30p MP4 so I have no idea what is going on.
    "(i)Life" in 60p seems a bit complicated.

  • Is there any place in Pages that will let me make a family tree chart?

    Is there any place in Pages that will let me make a family tree chart?

    Use text boxes for the family members and link the boxes by selecting both (or any lines) using:
    Menu > Insert > Connection line
    You can only link 2 objects at a time, but can build up the structure which remains linked.
    Peter

  • Is there an external hard disc that will work with Mac OS10.4.11 and Windows Vista?

    Is there an external hard disc that will work with both Mac (OS10.4.11) and Windows (Vista)?

    For NTFS on Mac, there are both open-source and commercial solutions. See:
    http://www.macupdate.com/find/mac/NTFS
    For HFS+ Drivers for Windows, there is only one:
    http://www.mediafour.com/products/macdrive
    Regards.

  • My macbook does not have a firewire port. Is there any kind of adapter that will allow me to use my advc 300 (which need to plug in to the FireWire port)?

    My macbook does not have a firewire port. Is there any kind of adapter that will allow me to use my advc 300 (which need to plug in to the FireWire port)?

    Firewire, USB and the recent thunderbolt use completely different protocols, therefore there are no adapters for mutually adapting them, just a computer, which allows connecting them, and will work as an interface. For example, if you have an external disk in an enclosure with only FW connection and another one with USB connection, just your mac, having both, allows their interconnectivity.
    If your mac does not have FW (the brief alu MB series, Air) you cannot connect a FW device, if only FW port is there.

Maybe you are looking for

  • Using 2 ipods with 1 itunes

    I currently have a Windows XP machine with the latest itunes on it. It's already working with my iPod nano (2G) - I just got a iPod Video (gen 5 30G). When I plug the iPodVideo in, iTunes doesn't see it. (I have plugged it into a new machine that's n

  • I am having a problem using my laptops touch pad to scroll the page up and down.

    When I try and run my finger down the side of my little mouse pad attached to me Sony Viao it shows a slidding option as if it recognizes i am trying to scroll however it wont actually preform the action. It works in say Microsoft Outlook or One Note

  • If pdf generated with Bullzip, opens with problems in text (missing, weird characters, etc...)

    pdf opening in new tab shows problems with text. If pdf was generated with Adobe acrobat, works fine. If pdf generated with Bullzip, opens in new tab, but with problems.

  • Controller for video issues

    Hi all, I don't want the controller to work for the video - so I did not select the setting " presentation controlled by playbar" (or something like that - sorry, not connected right now to check the exact phrase), in the slide properties menu. The q

  • Cryptic authentication failure message in PI

    We've a 8510 WLC (running 7.6.130.0) in HA setup, working fine. However, in Prime Infrastructure (2.1) managing this 8510 I see the following error message/event a lot: General Info Failure Source <wlc_name> Category Wireless Controller Generated Thu