Data merge images shrink down proportionally to fit the image if it does not fit 100%

I do a merger of large data of some labels and want the images to be narrowed proportionately to match the image if it is too large to fit 100%.

What I've read, this is only possible with the data merge feature in InDesign. However, I think that it is possible using a script? In addition, there are three frameworks and I would like it to apply to one of the managers (once again, if this is possible).

If this is feasible, how would I go on this subject? Is anyone able to write a script for me? Or have an existing one that I could use? I have had a look but couldn't find something similar.

Thanks in advance!

Adam

Hello

If you call pageItem by name - it returns 1st occurrence not all of them.

You must browse the pageItems and check names.

Like this:

var
  mPI = app.activeDocument.allPageItems,
  cPI, cGB, cW, cH;

while ( cPI = mPI.pop() ) {
  if (cPI.name == "3D") {
       cPI.fit(FitOptions.PROPORTIONALLY);
       continue;
       }
  if (cPI.name == "PROFILE") {
       cGB = cPI.graphics[0].geometricBounds;
       cW = cGB[3] - cGB[1];
       cH= cGB[2] - cGB[0];
       if (cW > 40 || cH > 43)
            cPI.fit(FitOptions.PROPORTIONALLY);
       }
  }

If the CPI has no graphics ==> don't return error

(you will then need to check if possible)

Jarek

Tags: InDesign

Similar Questions

  • "The cover image you selected does not fit this folio." - but should be.

    I get the error message.

    "An error occurred during the loading of an image. The cover image you selected does not fit this folio. There must be no more to 1024px in height and width 768px. »

    Jpg files horizontal and vertical I'm trying to download for coverage are exactly the 1024 x 768 and vice versa. I have tred exporting to different presets and resoluitions and Folio Builder still will not accept them.

    I know I ran this problem before and I have searched for it in this forum thinking it would have been displayed in all but impossible to find aynthing - sorry if I'm double posting.

    I think I realized my problem... I got 96 DPI selected, when it should have been 72. stupid.

  • My image that icon does not appear in the e-mail

    My image that icon does not appear in the messaging section. When I click on the place where the photo should be, it is said: the contact does not exist. I use a Moto X 2nd Gen on Republic cordless phone.

    You have a contact for yourself - probably mapped to your connection to google?

  • MS Money 2005 - I rebooted the software, but it does not automatically download the update needed to read my existing data files

    Due to a hard drive crash, I had to reformat my hard drive,
    therefore lost my copy previous update of MS Money.
    I reloaded the software from the CD, but it does not automatically download the update needed to read my existing data files.
    Can someone help me read my old data files?

    Microsoft or anyone have made available as a patch to download?

    Hi Derek,.

    Since the problem is related to Microsoft Money, I suggest you post your question on the Forums of money from Microsoft.

    Microsoft Money Forum

  • I've set up the virtual machine in win 7 Ultimate and put some data. Now when I try to connect it asks password and does not accept any password.

    Default password Machine virtual XP Mode

    I've set up the virtual machine in win 7 Ultimate and put some data. Now when I try to connect it asks password and does not accept any password. Please giveme the default password

    If you're talking about XP Mode the default password is XPMUser.  In general you can not use Windows without a password in Windows Virtual PC that you can with Virtual PC 2007 and before.  XPMUser is used only with the XP Mode virtual machine.  All other virtual machines requires a user created password.  If you have changed the password in XP Mode and forgotten, then you have to start over.

    Windows Virtual PC is based on virtual server rather than VPC and all virtual machines need a password.  If necessary, uninstall the integration features, start the virtual machine and create a password for the admin user.  Restart the virtual machine, and then reinstall the integration features.  You will not be able to access a virtual machine created by the user that has no password, while the integration features are installed.  Once you have everything right, that a virtual machine will not be asked a password if you are the admin user in Windows 7.

    @george1009,.

    Everything got?  :)

  • Windows theme does not work (Windows Ultimate), there is no desktop image and photo does not evolve

    Windows theme does not work (Windows Ultimate), there is no desktop image and photo does not evolve, is one knows how to fix this problem

    Hello

    Your Windows passes genuine validation? If your activation session has expired and that windows did not pass the validation, it will not show any visual effect such as background noise, themes etc. It will only show a black screen and at the bottom right of the screen you can see attention.
    Cihan
  • Windows 7 and using Google Chrome - the arrow pointing down in the side scroll bar does not appear

    Have Windows 7 and using Google Chrome - the arrow pointing down in the side scroll bar does not show unless I click on far right of the bar to scroll down and then click again to bring Google chrome

    Hi NeilHacking,

    The issue is specific to Google Chrome?

    If the problem is specific to Google Chrome, I recommend you to ask your question in this link:

    http://productforums.Google.com/Forum/#! Forum/chrome

  • The product key entered does not match any available window images, please enter a different product key

    Original title: complaint of Microsoft

    Dear team,

    Please note that we had bought a laptop Lenovo S 405 of Croma store located at Silver Bow Ludhiana.

    Type of machine:-IdeapadS405APGRTXA84555M4G5008EIN(20196) mode

    Machine Type No.:-59348194

    Serial number of the machine: -.

    Laptop provided with the integrated Windows 8 homepage unilingual, we tried to remove formatting the hard drive & then tried to install Windows 8 PRO that was purchased separately, but the system does not work, system displays a message error that says "the product key entered does not match any available window images, please enter a different product key

    Ask you please help to solve this problem

    Anticipating a quick answer on the same

    Thanking you,

    Yogesh clavreul,

    +

    Hi yogesh,

    This problem could be due to the fact that the product key provided does not match the press which is used to install Windows. The product key that is provided can be a file without assistance, in a. EI. CFG file, in the PID.txt file or in the BIOS firmware. Windows OEM 8 machines ship with the product key in the firmware, and if this product key does not match the press, then you will see the above error message.

    You are able to start after receiving the error message on the screen?

    I suggest you to change the product key to the correct for the media you are trying to install. If the system has a product key in the motherboard (o. a. 3.0 [Activation OEM] provides an OEM product key in the firmware), you use an Unattend file, file (EI.cfg) edition Configuration or the product ID file (PID.txt).

    You can check the link:

    «Windows 8 or Windows Server 2012 installation may fail with the error message: the product key entered does not match any of the images available for installation Windows.» "Enter a different product key"

    http://support.Microsoft.com/kb/2796988/en-us

    For reference, you can check the link and follow the steps proposed by Steven on 24 January 2013:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_8-windows_install/the-product-key-entered-does-not-match-any-of-the/47e6f575-5792-404B-9b7f-2065bdb91011

    Please let us know if the problem still persists.

  • Latest vmware image of ReactOS does not have in TP

    Hello

    I just wanted to try ReactOS VMware last image in the TP and it does not work in there.

    Without upgrading hardware to HW10, I eventually see a driver to install for a sound card, and then a crash VM asking to restart windows.

    From there on, I get a blue screen with the 1st error.

    Upgrade to HW10 keeps giving me the blue screen.

    Of course, this could be a problem on their part ReactOS, but thought it may be a scenario of debugging interesting to see why it crashes.

    Download here:

    ReactOS - browse /ReactOS/0.3.15 on SourceForge.net

    Select specific VMware image.

    --

    Wil

    Huh.  I tried ReactOS 3.0.15 with the Tech Preview workstation and got the same BSOD as you report it (no surprise, it's practically the same virtual environment) and also got the same race of BSOD this virtual machine under WS 9.0.x, isn't what we broke up recently, at least.  If I remove the USB controller, however, it works very well... that if the USB controller is present it seems reliable BSOD.  Could very well be a bug in ReactOS...  Please let us know if you find something else to this topic!

    See you soon,.

    --

    Darius

  • Does not display the images and CSS does not work generated WebHelp

    Hi all

    I have two issues which I believe are related. It miss me probably a simple step somewhere, since I can't find this issue covered in the forum or help.

    We have just upgraded to RH7 to RH9. When I build a project to test, the CSS was fate not (it was connected properly in the topics of the project, but he was not released when the WebHelp has been generated). Trying to open the CSS file directly led to a 404 error.

    I was able to solve that by checking the "Apply to all" button and selecting the CSS file we use (see image). However, none of our lists - ordered and unordered - are properly formatted. The font and size of numbered lists is incorrect, lists all nested lists display with numbers, even if they are not ordained and autonomous bulleted lists use evenly filled as circles dig balls, where previously they used the small squares, circles, or a picture of triangle. The CSS is called correctly in the subject, lists are formatted to use the styles and the styles are in the style sheet, so I do not know what causes this problem. So far, I have not noticed any other styles does not, but those are the ones that stand out.

    WebHelp Settings (CSS).png

    The other problem is with the images. This problem appears in both our WebHelp generated and in the printed documentation. The images are not output. In WebHelp, the text appears (typically the name of the file). in the printed documentation, nothing appears. (I checked all the printed documents that "embedded" is selected, but as far as I know, there isn't a similar function for the WebHelp).

    What Miss me? Thanks in advance for any help!

    Source code control is involved?

    So you can see the CSS in the project manager and it works very well in the design editor but does not every time that you build for. Can you just build or generate and publish? You use Windows Explorer to check the CSS in both places?

    How do you get a 404 error? This happens when you click on a link where the target does not exist. Normally you would use Windows Explorer to locate the CSS.

    Lists are a known problem on upgrade from 7. See the lists on my site.

    The images show in the project manager?

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • Can't add placeholder text data merge for all blocks of text on the document

    I'm trying to put together a script that loops if all pages in an indesign file, search all text frames label caption1, caption2, caption3... (whenever you get to a new page, the number of text images label starts again from 1) and add a placeholder in the text data fusion: caption1, caption2, caption3... but this time, when you get to a new page the number continues to go... caption4, caption5 and so on.

    Page 1 - image text = caption1 = tag > data merge placeholder = < < caption1 > >

    Page 1 - image text = caption2 = tag > data merge placeholder = < < caption2 > >

    Page 1 - image text = caption3 = tag > data merge placeholder = < < caption3 > >

    page 2 - text = caption1 = image tag > data merge placeholder = < < caption4 > >

    page 2 - image text = caption2 = tag > data merge placeholder = < < caption5 > >

    Currently, the script is adding placeholder text merge data only for the two text frames first (out of 6) on a page (about 8 pages) and just the first image of text on the page two (out of 3)

    Any help will be greatly appreciated

    Here's the script:

    myDocument var = app.activeDocument;

    -SOURCE DATA CALLS FUSION

    main();

    main() {} function

    myDataSource var = File.openDialog ("Please select a datamerge source", "text files: * .txt");

    If (myDataSource! = null) {}

    myDocument.dataMergeProperties.selectDataSource (myDataSource);

    myDocument.dataMergeProperties.dataMergePreferences.recordsPerPage = RecordsPerPage.MULTIPLE_RECORD;

    }

    }

    -MERGE OF DATA FIELD

    function get_field (captionString, myDocument) {}

    fields var = myDocument.dataMergeProperties.dataMergeFields;

    for (var f = 0, l = fields.length; e < l; f ++) {}

    If (fields [f] .fieldName == captionString) {}

    Returns the fields [f];

    }

    }

    Alert ("error: did not find all the fields with the name" + field_name);

    }

    THE TEXT - ADD PLACEHOLDER DATA MERGE

    var countFrames = 1;

    for (i = 0; i < myDocument.pages.length; i ++) {/ / TOTAL NUMBER OF PAGES in the DOCUMENT}

    var capPerPage = 1;

    for (x = 0; x < myDocument.pages [i].textFrames.length; x ++) {//COUNT TEXT TOTAL IMAGES PER PAGE

    If (myDocument.pages [i] .textFrames [x] .label < 0) {}

    Alert ('can not find any image caption');

    } ElseIf (.textFrames [x] myDocument.pages [i] .label == 'caption' + capPerPage) {//IF IT IS A TEXT LABEL of IMAGE 'caption1' EXECUTE

    var captionString = "caption" + countFrames;

    var myTextFrame = myDocument.pages [i] .textFrames [x];

    var myDataMergeProperties = myDocument.dataMergeProperties;

    var myTextFrame.parentStory = monarticle;

    var myStoryOffset = myTextFrame.parentStory.insertionPoints [-1];

    var myNamePlaceHolder = myDocument.dataMergeTextPlaceholders.add (monarticle, myStoryOffset, get_field (captionString, myDocument)); ADD DATA FUSION TEXT HOLDER TO THE TEXT BLOCK

    countFrames ++; INCREASE THE NUMBER TO ADD DATA FUSION TEXT PLACEHOLDER FOR THE NEXT BLOCK OF TEXT

    capPerPage ++;

    }

    }

    }

    Hello

    To verify this change (replace for...) loop)

    var countFrames= 0, currLabel, capPerPage;
    
    for (i=0; i
    

    Notice countFrames starts at 0.

    Jarek

  • Component image source tag does not work in iOS devices

    Hello

    I want to put the url of the image in the source of the component of the image tag. I am currently using 12 c (12.1.3.0) JDeveloper.

    His works very well in Android devices, but does not not in the iOS Devices.

    Here's my amx page code:

    < amx:listView var = value ' row' = "#{bindings.youtubeFeeds.collectionModel} '"

    fetchSize = "#{bindings.youtubeFeeds.rangeSize} '"

    selectedRowKeys = "#{bindings.youtubeFeeds.collectionModel.selectedRow} '"

    selectionListener = "#{bindings.youtubeFeeds.collectionModel.makeCurrent} '"

    showMoreStrategy = 'autoScroll' bufferStrategy = 'viewport' id = "lv2.

    inlineStyle = "background - color:rgba (0,0,0,0.3);" margin-bottom: 10%; ">

    < amx:listItem id = "li2" >

    < amx:panelGroupLayout id = "pgl5".

    inlineStyle = "margin: 0;"  Padding: 4%; padding-top: 2%; padding-bottom: 2%; ">

    < amx:tableLayout id = "tl3' width = '100% ' inlineStyle =" width: 100%; ">

    < amx:rowLayout id = "rl3" >

    < amx:cellFormat halign = "center" id = "NF3" valign = "middle".

    inlineStyle = "width: 45%;" >

    < amx:image source = "#{row.thumbURL}" id = "i5" inlineStyle = "width: 100%;" / > "

    < / amx:cellFormat >

    < / amx:rowLayout >

    < / amx:tableLayout >

    < / amx:panelGroupLayout >

    < / amx:listItem >

    < / amx:listView >

    I also tried with the static url from java code parameter

    youtubeFeeds.setThumbURL ("http://iconbug.com/data/9f/507/7539a8d9ee940f052a34a4eaae4775a1.png" "");

    and through binding, I showed that in listView component. But same question does not not in the iOS Devices.


    Yes, its working very well. This image is in a picture file in a project itself.

    "< amx:image id ="i121"source="/images/bg.jpg "inlineStyle =" width: 100%; " height: 100%; "/ >


    Same thing I want to do this the image url.

    Any help will be appreciated.


    Kind regards

    Siddharth


    a. you only see the image in preview if encode you this url in amx?

    b. can you try to add *. iconbug.* whitelist and try. (You can do this MAF - application.xml-> Security-> remote URL whitelist)

    Kind regards

    Deepak

  • Image - menu entry does not work in Dreamweaver CC 2015

    The new Dreamweaver CC 2015 for the Image - Insert menu item does not work.  20141 until 2015, there are several menu items that have changed.  How shall we put an image now?  I have to return to school?  It seems strange for a new version of change too radically.

    While I'm on the SOAP box, there are a few versions the anchor tag went away, we asked to use the ID tag instead.  Now, which seems to create errors and does not work.

    I know it's two questions, but I imagine I'll find more.  I just went through the issue of expansion (mentioned at the top of this area).  Finish by using a third-party extension manager to get my extensions to work.

    What else will emerge?

    I am disappointed...

    Tom

    That's what you need to do (with the word 'Favorites' in the drop-down list) because you are currently in the Favorites panel of sup of the insertion window...

    After clicking on this course, you should see this...

    Where you would choose HTML to access the Insert Image function.

    I suppose, since you asked so much with this Panel, you had something go sideways during the installation. I would like to try the following steps in order to see if one of them your problem...

    Turn your hidden operating system files, and then try these...

    Clear the Cache in program: removing a corrupt cache file

    Food preferences: restore preferences | Dreamweaver CS6, Dreamweaver CC

    And if neither of this total above work, cleaning and reinstall the program using Adobe cleaning tool: use of the Adobe Creative Cloud cleaning tool to solve installation problems

  • a dynamic image in the plugin model generator does not work

    Hi all
    The documentation says:
    Direct insertion
    Insert the jpg, gif or png image directly into your model.
    +... This works of course.
    Reference URL
    1 insert a dummy image in your model.
    2. in the image of Microsoft Word Format dialog box, select the Web tab enter the following syntax in the alternative text box to reference the URL of the image:
    URL: {'location http://image'}
    For example, enter: url: {'http://www.oracle.com/images/ora_log.gif'}
    +... This also works when I encode a url in the form url: {"http://www.google.com.tr/images/firefox/mobiledownload.png"} +.

    The element of the XML file reference
    1 insert a dummy image in your model.
    2. in the image of Microsoft Word Format dialog box, select the Web tab enter the following syntax in the alternative text box to reference the URL of the image:
    URL: {IMAGE_LOCATION}
    where IMAGE_LOCATION represents an element of your XML file that contains the full URL of the image.
    +... This, however, does not work. +

    I use Apex' report query tool and my query is like
    Select 'http://www.google.com.tr/images/firefox/mobiledownload.png' IMAGE_LOCATION of... (a single results set for my model)
    the xml data is generated by an IMAGE_LOCATION tag. I have load to plug-in model of word. The Url appears correctly in the report if I get a simple ordinary field.
    But when he is at the image-> Internet-> alt as a url text format: {IMAGE_LOCATION} no image displayed.
    I need to keep this simple design for a user procedure simple word could design a report using the just of the plugin model generator. I do not wish to explore the region of xsl - fo... yet.
    Could you tell me why I can't get this url: {IMAGE_LOCATION} to work?
    Concerning

    PS: My BI version: 10.1.3.4.1

    Published by: oeren June 8, 2011 12:28 AM

    Try to replace IMAGE_LOCATION .//IMAGE_LOCATION
    It worked for me.
    Kind regards
    Joshua

  • down loaded more recent firefox and now it does not connect to the web.

    Just did the new down load and restarting the Fire Fox cannot connect to the web.
    No problem before this new version.
    IE works fine. Chrome works very well.
    Only fire fox does not.

    You get this error message.

    See also article Firefox cannot load websites, but can other browsers .

Maybe you are looking for

  • Apple Watch is a day of rest on the main screen

    I noticed this morning that my Apple Watch is one day behind the main screen. The calendar is correct, however. Is there any solution for this?

  • Seeks advice notice on the idea of clear TC that I sell yet still be able to demonstrate that it works.

    I'm selling my Time Capsule and before doing so would erase the content, what do I know will take time. As an electronic device, I expect the buyer to want to see that the functions of TC with Time Machine. Yes, I already backed up all of the content

  • seeking calendar alerts

    I am looking for a calendar program that will send alerts to my account (the way calendar used for). Since I upgraded to el Capitan, alerts, I put in place in the calendar 8.0 simply get lost in the Notification Center as hundreds of applications sen

  • Slow plu IMac

    Hi, all: I have an iMac that is no spring chicken, but he has a lot of memory and I recently upgraded the OS to OSX 10.7.5. I made an EtreCheck to see why it is slow and would appreciate any help you can give me on what said EtreCheck. I'm no expert,

  • M6-1035dx Pavilion: Pavilion m6-1035dx touchpad y axis too sensitive after upgrade Windows 10

    I installed my m6-1035dx Pavilion at 10 Windows laptop. Everything seems to work pretty well, except the touchpad. The Synaptics 10 Windows driver is much too sensitive along the y-axis (vertical movement), but it is very well along the x-axis (horiz