Back

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

Forum Replies Created

Viewing 14 posts - 91 through 105 (of 105 total)
  • Author
    Posts
  • Jeremy Howard
    Participant

    Hey there,

    Try this script out, I think that it accomplishes what you are trying to accomplish. It scales an image dynamically to ensure that it gets scaled up to 100% in the new document (rather than scaling based on the static 1000%).

    //////////////////////////////////////////////////////////////////////////////////////

    //set selection as variable
    var thisItem = app.selection[0];

    //create new document
    var myNewDocument = app.documents.add();

    //duplicate selected item to new document
    var myDuplicatedItem = thisItem.duplicate(myNewDocument.pages.item(-1));

    //get image within the frame
    var myLinkedItem = myDuplicatedItem.pageItems[0];

    //find the horizontal and vertical scale integers
    var myHscale = 100 / myLinkedItem.horizontalScale;
    var myVscale = 100 / myLinkedItem.verticalScale;

    //Scale the image around its center point
    var myScaleMatrix = app.transformationMatrices.add();
    myScaleMatrix = myScaleMatrix.scaleMatrix(myHscale, myVscale);
    myLinkedItem.transform(CoordinateSpaces.PASTEBOARD_COORDINATES, AnchorPoint.centerAnchor, myScaleMatrix);

    //fit frame to content
    myDuplicatedItem.fit(FitOptions.frameToContent);

    //////////////////////////////////////////////////////////////////////////////////////

    in reply to: Picture pixelation #115703
    Jeremy Howard
    Participant

    I’m assuming that when you say Adobe, you mean Adobe Acrobat? If I had to guess about your images I would venture a guess that you may be missing a link.

    Open InDesign and open the Links panel. Check to see if any of the links have a yellow exclamation point or red “x” next to them.

    Jeremy Howard
    Participant

    This could absolutely be done! What scripting language are you most familiar with?

    Also, what OS are you running, OS X or Windows?

    in reply to: Text not fitting after CC2019 upgrade #115665
    Jeremy Howard
    Participant

    Situation like this are why I am such an ardent supporter of style sheets, fixing this rather strange issue would be a breeze with the proper style sheet configurations.

    I am wondering, did you also upgrade your computer? If so, this could be a slight difference between versions of fonts between systems.

    in reply to: Bottom text wrap inconsistent #115649
    Jeremy Howard
    Participant

    Vinny, those are both wonderfully creative solutions to this problem. Nice work!

    Your line of thinking got me thinking; another option would be to have two separate text frames, (one above the object and one below) and thread them. This would cause text to break around the object and would keep the spacing exact.

    in reply to: Bottom text wrap inconsistent #115644
    Jeremy Howard
    Participant

    Ah, I see… I don’t know of a way to fix that to be honest. I could do a bit of digging and let you know if I come up with anything.

    In the meantime, consider creating two object styles to apply your wrap with. One for the top of page and one for mid page.

    in reply to: Script #115616
    Jeremy Howard
    Participant

    Here, I added some checks, this version checks that the selected item(s) is a text frame, will alert you if it finds an invalid file path within the selected frames and will fit placed images to the frame proportionally…

    Enjoy!

    //Begin Script//////////////////////////////////////////////////////
    var mySelection = app.selection;
    for(thisItem = 0; thisItem < mySelection.length; thisItem++){
    var currentFrame = mySelection[thisItem];
    if(currentFrame instanceof TextFrame){
    var frameContents = currentFrame.paragraphs[0].contents;
    var myImage = File(frameContents);
    try{
    currentFrame.place (myImage, false);
    }catch(e){
    alert(“Invalid file path!\r\rThe file \”” + frameContents + “\” could not be found. \rPlease check the file path and try again.” );
    break;
    }
    currentFrame.fit(FitOptions.PROPORTIONALLY);
    }
    }
    //End Script////////////////////////////////////////////////////////

    in reply to: Script #115606
    Jeremy Howard
    Participant

    Hey Julie, I just knocked together this little script. It’s super plain and doesn’t contain any error trapping but it should do the trick/give you a good starting point.

    To use this script, select one or more frames that contain file paths as text and run it. The images will automatically be placed in each of the selected frames!

    //Begin Script//////////////////////////////////////////////////////
    var mySelection = app.selection;
    for(thisItem = 0; thisItem < mySelection.length; thisItem++){
    var currentItem = mySelection[thisItem];
    var frameContents = currentItem.parentStory.contents;
    var myImage = File(frameContents);
    currentItem.place (myImage, false);
    }
    //End Script////////////////////////////////////////////////////////

    in reply to: Bottom text wrap inconsistent #115604
    Jeremy Howard
    Participant

    Hello Stephanie, I am having a bit of trouble envisioning the method/scenario that you would be having trouble with this. Which method of text wrap are you using? (Wrap around bounding box, Wrap around object shape or Jump object).

    Is the object with the wrap bumping all of the text in a frame down or is text flowing around the side(s) and then across the bottom?

    in reply to: Data Merge QR-Codes issue #115603
    Jeremy Howard
    Participant

    Try wrapping the command string in quotes? (I really don’t know)

    If you send me the script then I could take a look to see if I can help!

    in reply to: Character style that changes font but not size, etc. #115602
    Jeremy Howard
    Participant

    I am not super familiar with versions of InDesign prior to 5 but I know that since 5, the anchored object controls have been more or less the same. If you want the images to reflow and stick with a particular paragraph/set of paragraphs then I absolutely recommend using anchored objects. There are lots of tutorials out there but I have found that thoughtful experimentation with the anchored objects options is the quickest and surest way to learn.

    If you want to jump-start your understanding and get an idea on where to begin then check out InDesign Magazine issue 117, it contains a great deal of info about anchored images/frames.

    in reply to: Character style that changes font but not size, etc. #115567
    Jeremy Howard
    Participant

    Ah, David beat me to it, I was going to mention the numberpad limitation on the style sheet shortcuts =)

    Note that you can create style sheet shortcuts using command/control + num, option/alt + num or command + option + num/control + alt + num. If I am setting up a complex template then I will often assign “command + num” shortcuts to paragraph styles, “option + num” shortcuts to character styles and “command + option + num” shortcuts to object styles.

    Another piece of advice, to try to help keep your sanity intact: When attempting to make a character style that only changes one property (only the font, in your case) make sure that you don’t have any page items selected and make sure that you have “[None]” selected in your character styles panel before you click “create new character style”. If you have an existing character style selected when you create a new character style then the new character style will contain properties that were specified in the style you had selected.

    Selecting “[None]” before creating a new style will give a completely clean style that has no properties set.

    in reply to: Export All Open Files to PDF #115468
    Jeremy Howard
    Participant

    Hey Masood,

    The batch convert script that you are referring to will also work on all open documents. You don’t need to select a folder to batch for that script to work.

    in reply to: Hyperlink to pages in one document #115467
    Jeremy Howard
    Participant

    Hey Bob,

    Are you creating the table of contents using InDesign’s table of contents tool? If so,check your pdf export settings.

    When you export the PDF, check the “Include” section of the “General” tab and be sure that “Hyperlinks” is checked. The TOC should now be linked!

    If you’re not using InDesign’s TOC tool, start.

Viewing 14 posts - 91 through 105 (of 105 total)