DTP


 
Lively discussions on the graphic arts and publishing — in print or on the web


Go Back   Desktop Publishing Forum > General Discussions > Print Design

Reply
 
Thread Tools Display Modes
Old 01-05-2007, 11:04 AM   #1
Dave Saunders
Member
 
Dave Saunders's Avatar
 
Join Date: Jan 2005
Posts: 103
Default Paging Pining PageMaker Users

Pining for a pasteboard that is common for all InDesign spreads? Well, that I can't do, but it has occurred to me (thanks to a request in the Adobe U2U feature request forum) that a script that would move all items on any pasteboard to the current pasteboard wouldn't be that hard to write and it would probably run pretty fast.

I posted some notes about this in my blog this morning, here:

http://jsid.blogspot.com/2007/01/uni...asteboard.html

So far, the response has been somewhat underwhelming, but I have the strong impression that my blog is not the first port-of-call for most InDesign users.

Anyway, if anyone here wants to offer any thoughts, I don't care whether you do it here or via comments there.

Dave
Dave Saunders is offline   Reply With Quote
Old 01-05-2007, 11:44 PM   #2
Mike
Staff
 
Mike's Avatar
 
Join Date: Oct 2004
Location: Llanwrtyd Wells
Posts: 1,450
Default

Gosh, I'd forgotten about the pasteboard. I used to use it with PM but I guess I've just got used to doing without and have found alternative methods. Surprising how we adapt and forget about how things used to be.

   
__________________
Mike

www.welshframing.com
Mike is offline   Reply With Quote
Old 01-06-2007, 02:02 AM   #3
Martin Fischer
Member
 
Martin Fischer's Avatar
 
Join Date: Nov 2006
Posts: 2
Default

Hello Dave:

1. What if the item is on a hidden layer?

Let it be the users decision to keep some objects on the pasteboard at their original place. If he wishes to move objects of those layers which are hidden, he is able to unhide those layers before running the script.
You can tell the user in a final dialog that some objects have been left at their original place because they are members of one ore more hidden layer(s) called ... So the user can check these objects or immediately unhide some layers and run the script again if these objects should be moved too.


2. What if the item is locked?

Leave them where they are (the locking of the items may have some reasons) and tell the user in a final dialog, that some objects have been left at their original places (tell the name of one page of the spread of the pasteboard and - if the object contains a link - tell the name of the link too).


3. What if the location of the item on its source spread would put it on a page of the current spread?

You have to check for this at the new location and move the object horizontal a page width left or right until the constructor name of the new parent is not "Page".


4. Conversely, what if, when moving from a two-page spread to a single-page spread, the item will be more than a page width away from the live page?

:-)
Check the distance to the left edge of the first page or the right edge of the last page of the spread of the new location and correct the position with the page width as unit (move left or right, one or more page widths, till the distance is less than one page witdh).


5. While we're thinking about that, what about multi-page spreads or even dragged apart single-page spreads?

The new position should be left of the first page of the live spread or right of the last page of the live spread.
Move the objects left (or right) as many page widthes until the constructor name of the new parent is not "Page".


Finally you have to take care for another thing:
If you move the items to a new location the order of the indexes of the page items will change.
So the loop may skip some objects because of this reordering.

Thanks
Martin

Last edited by Martin Fischer; 01-06-2007 at 04:48 AM.
Martin Fischer is offline   Reply With Quote
Old 01-06-2007, 04:48 AM   #4
Dave Saunders
Member
 
Dave Saunders's Avatar
 
Join Date: Jan 2005
Posts: 103
Default

Yep, I agree with your assessments about hidden and locked items (although I'm inclined to not even bother to warn people on the grounds that they know they hid the layer or locked the item).

You're right about the looping. I suspect that the script might have to loop twice over the items, the first to get the ids of the ones that need to be moved and then the second time to move only those whose ids are on the list.

Thanks,

Dave
Dave Saunders is offline   Reply With Quote
Old 01-09-2007, 12:45 AM   #5
Martin Fischer
Member
 
Martin Fischer's Avatar
 
Join Date: Nov 2006
Posts: 2
Default

Hi Dave,

basing on your interesting script in http://jsid.blogspot.com/2007/01/agg...asteboard.html I have made another attempt: storing every pasteboard item into a temporary library. The pasteboard items will keep left where they are.

Assets with text frames, empty rectangles and groups may be unnamed.
You may distinguish them by looking at the thumbnails.
But assets with rectangles with linked images in it get the name of the linked images.

Please pay attention:
The temorary library is saved in "TempLibrary.indl" in the user's desktop folder. Every time the script is executed, the library is cleared (means: the old assets/contents of the library are removed).

Code:
// storePasteboardItems2TempLibrary.jsx

//DESCRIPTION: Stores all Pasteboard Items into a temporary library
// Pay attention: the temorary library is saved in "TempLibrary.indl" in the user's documents folder.
// Every time the script is executed, the library is cleared (means: the old assets (contents) of the library are removed)

var myNameLength = 15;
var myPath = "~/Desktop";

if (app.documents.length > 0) { 
    var myLib = getLib(myPath, "TempLibrary.indl");
    clearLib(myLib);
    store2Lib(app.documents[0], myLib);
}

// remove every asset of the library
function clearLib(theLib) {
    if (theLib.assets.length > 0)
        theLib.assets.everyItem().remove();
}

// stores pasteboard items into the library
function store2Lib(myDoc) {
    if (app.activeWindow.constructor.name != "StoryWindow") { 
        myObjs = myDoc.pageItems;
        for (var j = myObjs.length - 1; j >= 0; j--) {
            if (myObjs[j].parent.constructor.name != "Page") {
                myLib.store(myDoc.pageItems[j]);
                // set name of a textType asset to part of it's contents
                if (myLib.assets[0].assetType == AssetType.textType) {
                    try {
                        var theContent = myObjs[j].properties.contents;
                        theContent = theContent.split(" ").join("_");
                        var theString = (theContent.length <= myNameLength) 
                            ? theContent 
                            : theContent.substr(0,myNameLength); 
                    }
                    catch (e) {
                        // couldn't get the contents, so set name to No. x
                        var theString = "No. " + j;
                    }
                    myLib.assets[0].name = theString;
                }
            }
        }
    }
} 

function getLib(myPathName, myLibName) {
    if (app.libraries.item(myLibName) == null) {
        var myLib = app.libraries.add(File(myPathName + "/" + myLibName)); 
    }
    else {
        var myLib = app.libraries.item(myLibName)
    }
    return myLib;
}
Martin

Last edited by Martin Fischer; 01-10-2007 at 11:13 AM.
Martin Fischer is offline   Reply With Quote
Old 01-09-2007, 01:26 PM   #6
Dave Saunders
Member
 
Dave Saunders's Avatar
 
Join Date: Jan 2005
Posts: 103
Default

OK, I've posted the final script at:

http://jsid.blogspot.com/2007/01/bac...asteboard.html

It does just about what PageMaker's pasteboard appeared to do as you moved from spread to spread, except that you do have to run the script to get the pasteboard items to the current spread.

Two caveats: items on the pasteboard that are locked are not moved to the current spread. Items on locked layers are not moved.

Items on hidden layers are moved, but you can't see them until you make the layer visible.

Dave
Dave Saunders is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
For U.S. cell phone users Franca The Corner Pub 5 01-16-2006 02:10 PM
Compaq users and Intelligence Kelvyn The Corner Pub 4 10-18-2005 12:50 PM


All times are GMT -8. The time now is 03:38 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Contents copyright 2004–2014 Desktop Publishing Forum and its members.