Back

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

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • in reply to: Cropping Images to fit image boxes 1t 100% scale #14410499
    Keith Gilbert
    Participant

    If you are going to use in5 to export the file, there is no need to ‘crop the images to the size of the boxes’ or to lower the resolution. in5 take care of all of this for you at export time, automatically.

    in reply to: InD find/change dialog off the screen #14404063
    Keith Gilbert
    Participant
    in reply to: Converting PDFs to an editable In Design document #14403659
    Keith Gilbert
    Participant

    I recommend leguptools.com

    Works well. Pay per page, no up-front cost.

    in reply to: Table style with indent #14398380
    Keith Gilbert
    Participant

    Since a Table is an inline object which resides in a paragraph, create a Paragraph style that contains a 10mm left indent. Then, hit Return after your bullet paragraph, assign the Paragraph style to the empty paragraph, and, while your cursor is still in the empty paragraph create the table via Table > Insert Table.

    So, with this approach you will need a Paragraph Style (for the left indent) and a Table Style (for all the other attributes of the table).

    in reply to: Layer keyboard shortcuts #14397617
    Keith Gilbert
    Participant

    A couple of small free scripts for manipulating layers here that you can assign keyboard shortcuts to: https://github.com/certainlyakey/Indesign-scripts

    See also https://corullon.com.br/scripts/?s=layer

    in reply to: Layer keyboard shortcuts #14397634
    Keith Gilbert
    Participant

    Linda, here’s a little script that will do what you want. Once you install the script, you can assign a keyboard shortcut to it via Edit > Keyboard Shortcuts. The script will toggle the visibility of a layer named “XXXXXXXXX” without displaying the Layers panel. Edit line 8 of the script with any text editor to change the name of the layer that the script affects. https://www.dropbox.com/t/uzH5liL3WbM32meL

    in reply to: Joke book layout tips #14365140
    Keith Gilbert
    Participant

    If you really want to “encode” an answer in a book, you could use the “Rotate selected characters” script at https://gilbertconsulting.com/scripts which will rotate each character in the selection 180°, making the text really hard to decipher!

    Keith Gilbert
    Participant

    As far as allowing a user to choose a paragraph style, the talented Harbs made this function available on the Adobe Scripting forum years ago. I’ve used this as well and it works great.

    function myInput (myDoc) {
    // Thanks to Harbs for the pstyle listview code! https://forums.adobe.com/thread/445911
    var HarbsUI = {}
    HarbsUI.TreeView = function(parent,structure,name,nodeIcon,bounds){
    if(bounds instanceof Array){
    var width = bounds[0] || undefined;
    var height = bounds[1] || undefined;
    }
    // Create the panel for the TreeView
    var panel = parent.add(“panel”, undefined, name);
    panel.alignment = [“fill”, “fill”];
    panel.alignChildren = [“fill”, “fill”]
    // Create the TreeView list
    var treeview = panel.add(“treeview”);
    if(width){treeview.preferredSize.width = width;}
    if(height){treeview.preferredSize.height = height;}
    AddItemsToTreeView(treeview,structure,nodeIcon);
    return treeview;
    function AddItemsToTreeView(parent,structure,icon){
    for(var i=0;ihttps://forums.adobe.com/thread/445911
    function GetStylesWithGroups(doc,groupType,styleType,parent,dontSkipFirst) {
    var retVal=[];
    var styles = parent[styleType];
    for(var i=0;i

    Keith Gilbert
    Participant

    Justin,

    When thinking about having ID search for a Pstyle in a style group, you should also consider what if it is in a style group within a style group, or nested even further? Here is a function that calls another function that takes care of this. I didn’t write this…I got it from another scripter (probably the very-smart Kris Coppieters years ago). But have used it in many, many scripts and it works great.

    // Here is an example of how to call the function
    app.changeGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyles.itemByID(locateParagraphStyle(“Table body, cond, center”));

    // Function to find a paragraph style possibly contained inside a style group. Return id of the paragraph style.
    function locateParagraphStyle(styleNameToLocate, pathSeparator) {
    var myDoc = app.activeDocument;
    var rootPath = “”;
    if (pathSeparator !== undefined) {
    rootPath = pathSeparator;
    }
    var retVal = locateParagraphStyleRecursive(myDoc, styleNameToLocate, pathSeparator, rootPath);
    if (! retVal) {
    return “not found”;
    }
    return retVal.id;
    }
    // Function to find paragraph styles that are in style groups. Returns the paragraph style or null if not found.
    function locateParagraphStyleRecursive(paragraphStyleContainer, styleNameToLocate, pathSeparator, parentPath) {
    var retVal = null;
    do {
    try {
    var paragraphStyles = paragraphStyleContainer.paragraphStyles;
    var numParagraphStyles = paragraphStyles.length;
    for (
    var paragraphStyleIdx = 0;
    retVal == null && paragraphStyleIdx < numParagraphStyles; paragraphStyleIdx++) { var paragraphStyle = paragraphStyles.item(paragraphStyleIdx); if (paragraphStyle.isValid) { var paragraphStyleName = paragraphStyle.name; if (pathSeparator) { paragraphStyleName = parentPath + paragraphStyleName; } if (paragraphStyleName == styleNameToLocate) { retVal = paragraphStyle; } } } if (retVal) { break; } var paragraphStyleGroups = paragraphStyleContainer.paragraphStyleGroups; var numParagraphStyleGroups = paragraphStyleGroups.length; for ( var paragraphStyleGroupIdx = 0; retVal == null && paragraphStyleGroupIdx < numParagraphStyleGroups; paragraphStyleGroupIdx++) { var paragraphStyleGroup = paragraphStyleGroups.item(paragraphStyleGroupIdx); if (paragraphStyleGroup.isValid) { var path = parentPath; if (pathSeparator) { var paragraphStyleGroupName = paragraphStyleGroup.name; path += paragraphStyleGroupName + pathSeparator; } retVal = locateParagraphStyleRecursive(paragraphStyleGroup, styleNameToLocate, pathSeparator, path); } } } catch (err) { } } while (false); return retVal; }

    Keith Gilbert
    Participant

    @Ward: The new ExtendScript Debugger extension from Adobe for Visual Studio Code has a lot of nice debugging features…much nicer than ExtendScript Toolkit, with is at end-of-life. Track me down at Creative Pro Week while you’re there and I’d be happy to talk more about this with you!

    Keith Gilbert
    Participant

    Jarrod, first of all, DON’T try to create links between separate PDF files, instead, put it all in a single PDF if you can. Links between PDF files are problematic depending on how the PDF is distributed and used.

    You should be able to use hyperlinks or buttons to do this. If you hyperlink to a text anchor, the anchor will move with the text as the document is updated. If you hyperlink to a specific page, yes, that hyperlink will go to the wrong location if you reorder pages.

    in reply to: script needed to remove background colour #81202
    Keith Gilbert
    Participant

    Ah, I see now! I just answered my own question with the test above. I’ll use the tags next time!

    Peter, thanks for intercepting this and helping Paul.
    in reply to: script needed to remove background colour #81200
    Keith Gilbert
    Participant

    Gah! I was afraid that pasting the code in might chew it up! David, where do I insert the tags? I don’t see anything in the interface. Or do I just put the tags in like this?

    in reply to: script needed to remove background colour #81121
    Keith Gilbert
    Participant

    This script will remove the background color from any rectangular picture box that contains an image:

    var myDoc = app.activeDocument;
    var myRectangleArray = myDoc.rectangles.everyItem().getElements();
    for (var j = myRectangleArray.length – 1; j >= 0; j–) {
    var myItem = myRectangleArray[j];
    if ((myItem.graphics.length >0 ) || (myItem.images.length > 0)) {
    myItem.fillColor = myDoc.swatches.item(“None”);
    }
    }

    in reply to: FIT TextFrame to it's Contents by Java Script #81032
    Keith Gilbert
    Participant

    @Peter, I’m pretty sure that Marcin is referring to the bounding box “handles” of the text frame, not the frame anchor. As you probably know, double-clicking a side handle shrinks the frame to fit the text horizontally, double-clicking a bottom handle shrinks the frame to fit the text vertically, and double-clicking a corner handle does both.

    @Marcin, I’ve encountered situations where the FitOptions.FRAME_TO_CONTENT method refuses to work on a frame, even when that frame can be shrunk just fine by double-clicking on the handles. I’ve had to resort to strange work-arounds on occasion.

Viewing 15 posts - 1 through 15 (of 22 total)