exportFile() on executives of related texts - strange behavior, how to fix?

Hello

What I need, is to export the blocks of text in the form of images, by using the exportFile() method and get the same appearance as in the document.

But if I manipulate with textframe somewhat, as resize it a bit, the picture, I got is not the same size as the selection: it has a certain margin.

El = element TextFrame

var file = new File(path + "el" + el.id + ".png");
app.pngExportPreferences.exportResolution = 72;
app.pngExportPreferences.transparentBackground = true;
el.exportFile(ExportFormat.PNG_FORMAT, file);

by example, if I check el.geometricBounds (or visibleBounds, these are the same) is [64, 104,88, 85, 336], which is (231 x 22).

But with exportFile, png with 231 x 29 size got.

How to get an accurate picture? Or how to match so I could crop later automatically?

[JS] PageItem Export in PNG: dimesion of the exported image differs from PageItem

Tags: InDesign

Similar Questions

  • How to link two executives of related texts?

    Hi all

    I'm new to the sdk. I have UIDref of executives two related texts, how it can be screwed?

    «Indesign 5.0»

    Thanks in advance

    A.Hakkim

    You must add the UID of the kMultiColumnItemBoss kTextLinkCmdBoss itemList.

    For the multiColumnItemUID of kSplineItemBoss.

    MultiColumnItemUID UID = kInvalidUID;

    InterfacePtr iHierarchy (pageItemUIDRef, UseDefaultIID());

    InterfacePtr iChild (iHierarchy-> QueryChild (0));

    If (iChild &: GetClass (iChild) == kMultiColumnItemBoss)

    {

    multiColumnItemUID =: GetUID (iChild);

    }

    For the multiColumnItemUID of kFrameItemBoss.

    MultiColumnItemUID UID = kInvalidUID;

    InterfacePtr iHierarchy (iTextFrameColumn, UseDefaultIID());

    InterfacePtr iParent (iHierarchy-> QueryParent());

    If (iParent &: GetClass (iParent) == kMultiColumnItemBoss)

    {

    multiColumnItemUID =: GetUID (iParent);

    }

  • Get specific information from executives of related texts

    Hi all

    So here's my question. I need to get information from text within a thick layer. The layer contains images and text and the text is the information that I need, which looks like this:

    (4) L attest 1,2,3,4

    (13) XL 5,7,8,9,10,11,12,14,15,17,19,20,21 bolt torque

    (4) bolt torque 22,23,25,27 XXL

    (1) XXXL 34 bolt torque

    I need to do three things: the number that represents the number inside the parenthesis, the size that it is the next set of letters (L, XL, XXL, XXXL) and the list of numbers (I need not "# s" characters), and information storage together to know for example that size L has a 4 number and numbers are 1,2,3 and 4.

    If someone could point me in a direction to achieve this I would really appreciate it. I'm working on CS6.

    Thank you.

    This is not EXACTLY how I described above... but this is the one I tested with. It doesn't have the conditional statement about whether she should use asterisks or peren and me have just pre-programmed the chain of the textFrame. It worked for me. It will be perhaps more useful than this wall of text and attempts at explanations...

    function getRoster()
    {
        var roster = {};
    
        var text = "(4) AL #'s 1,2,3,4\
        (13) AXL #'s 5,7,8,9,10,11,12,14,15,17,19,20,21\
        (4) AXXL #'s 22,23,25,27\
        (1) AXXXL #'s 34\
         \
        TOTAL: 22"
    
        var lines = text.split('\n');
    
        roster["sizes"] = {};
    
        for(var a=0;a5 && lines[a].indexOf(":") == -1)
            {
                var qty = lines[a].substring(lines[a].indexOf("(")+1, lines[a].indexOf(") "));
                var size = lines[a].substring(lines[a].indexOf(") ")+2, lines[a].indexOf(" #"));
                var nums = lines[a].substring(lines[a].indexOf("s ") + 2, lines[a].length);
                nums = nums.split(",");
    
                roster["sizes"][size] = {};
                roster["sizes"][size]["quantity"] = qty;
                roster["sizes"][size]["numbers"] = nums;
            }
        }
        return roster;
    }
    var theRoster = getRoster();
    

    This script returns the next object and saves it under theRoster:

    var theRoster = {
         "sizes" : {
              "AL" : {
                   "numbers": ["1", "2", "3", "4"],
                   "quantity" : 4
              },
              "AXL" : {
                   "numbers":["5","7","8","9","10","11","12","14","15","17","19","20","21"],
                   "quantity" : 13
              },
              "AXXL" : {
                   "numbers": ["22","23","25","27"],
                   "quantity" : 4
              },
              "AXXXL" : {
                  "numbers" : ["34"],
                   "quantity" : 1
              }
         }
    
  • Wrap JS CS3 How to apply options for some executives of related texts

    If you manually select a number of linked text frames, and then click wrap encompassing for example, it is applied to all selected items.

    To do this in a script can be done without a loop in each selection?

    For example:

    var myNewGroup = app.selection


    myNewGroup.textWrapPreferences.textWrapType = TextWrapTypes.NONE;


    var myGroup = app.activeDocument.groups.add(myNewGroup);

    This does not work, but if you have more than 1000 selected text blocks it takes awhile.

    for (i=app.selection.length-1; i>=0; i--) {


            app.selection[i].textWrapPreferences.textWrapType = TextWrapTypes.NONE;

    }

    Any suggestions?

    Cheers, John.

    Yes, you are right...

    You can not textFramePrefernces re-branded to the Group of objects. It's my fault.

    I think that you need to loop through objects...

    --

    tomaxxi

  • Why have I not these inconsistencies of strange text spacing, and how to fix?

    I get a lot of strange spacing issues in the CV document I created. Please see the screenshot file and attached project. I have inserted a few guides to show that the following pairs of text must be aligned horizontally but are not: experience/training, April 2013/OCT 2015, II/B.S. contract administrator: Information technology.

    Thank you!

    P.S. - Other parts of the document are incomplete; First of all, I want to solve these problems of alignment at the top of the document.

    Capture.JPG

    Link to the file: https://files.acrobat.com/a/preview/a2da35ed-9fd0-4743-a7e3-1a28cb4b482b

    It seems that the block of text on the left is not a rectangular frame. See the inset spacing, it does not allow to choose the top, the bottom and so on. This is perhaps the reason for your problem.

  • Facebook no text some photos how to fix

    not just Facebook photos how can I fix the text

    Hello

    1. what web browser do you use?

    2. not this problem occurs only with Facebook or all sites?

    3. were there any changes made to the computer before the show?

    If you are using Internet Explorer, plaids, proceed from the link.

    Images are not displayed and a red X may appear on Web sites in Internet Explorer

    http://support.Microsoft.com/kb/283807

  • Failing to read about ADE software able to read when they have framed color graphics and text files EPDF, how do fix us?

    We have 2 different InDesign files read does not correctly in the drive of the ADE. The two files have framed color images and texts in them. The original file EPDF one showed blank pages for the entire page with text boxes inside when open in ADE (they are wrapped in DRM). Pages that do not have the sidebar appeared fine. Our ebook distributor said us we need to rasterize the file. We are working in InDesign with Adobe Acrobat X Pro 6. We made each page JPEG files and re-imported in an InDesign file and exported in PDF format and our player ADE then showed pages from the sidebar. The file is quite large but and I have a book that has the same problem. What is the problem with our boxes and what are the best solutions as JPEG files for each page? Thank you.

    Try the forum of ADE.

  • for - loop in all managers of related texts (cs4 jsx)

    var app.activeDocument = docRef;

    for (var num = 0; num < docRef.textFrame.length; num ++) {}

    alert (docRef.textFrames [num]);

    }

    I would like for all the blocks of text in a document to experiment with what properties return information.  I have a simple test document with as three different text blocks and I want information on each collection.  This loop for doesn't seem to work though, and I can't quite wrap my head around how work the textFrame objects and linked text frames.

    Thanks for the help!

    executives of related texts = a collection of linked text frames

    textFrame = a single textFrame, example frames of texts linked [1] made reference to the second textFrame

    Try this

    var docRef = app.activeDocument;
    
    for (var num=0; num		   
  • executable jar, a strange behavior

    Hello

    I noticed a strange behavior with a jar file executable that I just created.

    If I start from the command prompt with java-jar executablejarfile.jar, everything works well, but if I start it by double-clicking on the jar file, the application is visible more slowly and it stops working properly after a while.

    Any ideas what could cause this strange behavior?

    I use windows xp and java version "1.6.0_20.

    Thank you!

    user6102378 wrote:
    Hello

    I noticed a strange behavior with a jar file executable that I just created.

    If I start from the command prompt with java-jar executablejarfile.jar, everything works well, but if I start it by double-clicking on the jar file, the application is visible more slowly and it stops working properly after a while.

    Any ideas what could cause this strange behavior?

    I use windows xp and java version "1.6.0_20.

    Thank you!

    Under XP, I think you have some sort of options area in maybe control panel where you can configure the file assciations. Make sure that the .jar files are assciated with [java dir]/bin/javaw.exe

    If you do not find this test (I know it works on vista but I forget XP) right click on the .jar file, click "open with...". "and find javaw.exe and check the box that says always 'open with that '. If this doesn't work then reinstall java I guess that :D

  • Strange behavior with the function «Help in command line»

    So I do a little playing with the opening of the files compiled help (.chm) with the command-line help feature, and I saw a strange behavior when trying to index multi-level access keywords. According to the documentation, if you set the 'Key' operation, you can enter a value for ' string to search for "to access this section. The more precise help that:

    If this string contains a keyword index, the string must match the key of the index as it appears in the help index file. To access a topic with a multilevel index keyword, enter the keyword of the top-level index, a colon and the keyword of the second level index. Do not separate the elements with spaces. For example, a chain of error codes: GPIB jumps about a subject with a keyword of top-level index of error codes and a second level keyword index of GPIB.

    All right, seems simple enough. Except that when I tried, I couldn't work, even with the example provided. I tried the following simple test:

    Opens the help file, but it opens to this page, not to the page ' error codes: GPIB "non-descript. I saw this in 8.2 and 8.6. Anyone have any success with access to a multi-level keyword?

    Note - side

    Curiously, the Index for the help lvconcepts.chm file looks like this:

    In other words, the input index text is just "GPIB", but the text that appears in the keyword field is "codes error, GPIB. I'm curious to know how this was accomplished. I decompiled the lvconcepts.chm file and watched the .hhk file, and it is not immediately obvious to me. (By the way, if you try to use "error codes, GPIB" it does not either).

    Hello

    Please contact National Instruments!
    It is a very strange behavior.  I tested out and seen the exact
    same results you are experiencing.  This was reported to R & D (AUTO ID # 130246) for further investigations.
    From what I can tell the a possible workaround solution that we have documented
    in the post of root Canal.  I can't continue to look into this in order
    to see if there is no other workaround solution or a reason why it is
    run in this way.  Thanks much for the feedback!  If
    you have any other questions on this subject please post them here.
    Have a great day!

  • Issues coming out of "sleep mode" and strange behavior when restarting with GPU

    I use a desktop computer HP P7-1240 completely stock except for a GPU EVGA GeForce GTX 750 TI SC. The GPU works well when the computer is running (which is strange because the forums have several other discussions mentioning the 700 series must be incompatible with my BIOS).

    However, there are two main strange problems that have arisen since the installation of the GPU. One is that, every time that the computer enters mode "sleep", he refuses to wake back up correctly. It seems to me that the computer active but sends all the signals back panel (at the very least, no video because my monitors remain blank). On rare occasions, he wakes back correctly, but at least 90% of the time, it must be restarted. Upon reboot, the same problem sometimes (not), and the computer must be rebooted a second time until it will start again.

    This leads to the second problem. During startup, the computer goes to a black screen, listing the specifications of basic computer skills (see attached photo. In this screen, the computer does not meet any entry.  He proceeds to beep 3 times, all the same length and height spaced about 30 seconds of gap. After the third beep, the screen goes black and then the computer starts normally with no other strange behavior.

    Without the GPU, none of these problems occur. At the very least, not regularly.

    I saw another thread mentioned that, while the HP support for my office page lists not her, there is an update of the BIOS for my motherboard which has fixed issues related to the GPU more modern. By nature it is an update of the BIOS that does not (seem to) officially support Windows 7, I am reluctant to go forward with this potential solution.

    Although I intend to build myself a new computer from scratch at a certain point, I was hoping to get at least another year out of this machine, if not 2.  While this question does not seem to be immediately threatening the stability of the computer, I can't help but think that it is a question should I go quickly to avoid future problems (not to mention it would save me a good amount of electricity to be able to enter the mode 'sleep' on a regular basis).

    Any suggestions would be greatly appreciated!

    Problem has been solved!

    For those of you who have trouble sleeping with the p7-1240 or computers with a card mother identical (MSI Jasmine Ms 7778 ver 1.0), I suggest that you follow this thread:

    http://h30434.www3.HP.com/T5/desktop-hardware/unable-to-boot-with-new-graphics-card/TD-p/3930544/highlight/true

    It is to use an update for your BIOS that is intended only for PC under Windows 8, but that seems to work perfectly well with Windows 7 PC. It solved my problems of sleep and makes the computer to behave at least semi normally while restarting.

    However, as indicated in the wire, an update of the BIOS should be a last resort because it can turn your machine into a very heavy and expensive paperweight if something does not work. Do not forget that you have the worm 1.0 card mother MSI Ms 7778 Jasmine and remember that you update the BIOS version 8.18.

    As I am looking for 2aeo on HP.com currently (according to the thread leading up to), I'm not find the same links I found last week when I went through the update. However, you can find elsewhere.

  • strange behavior

    Hello

    I have a strange behavior on the main screen of my application.

    My screen looks like this:

    1, 2, 3, 4 and 5 are bitmap with navigation button, click scope.

    I have a separate Thread for processing and this X thread updates the content of the label and label B.

    Whenever the thread call X function is update the function labels are running label.setText (newtext) on both labels.

    Stange behavior:

    When the x thread updated, the text of the labels (via the function Y) the emphasis is on button bitmap 1,2,3 or 4, the text of labels disappears and the screen looks like this:

    If we move to the development for bitmap button 5 or ListField labels updated successfully and the screen looks like this:

    I checked on debug only when the labels are updated that the text is not null.

    You have some ideas on what is the cause?

    Best regards

    Hello

    I found the solution for the strange behavior. I added a "HFMst.ivalidate ()"; on the function Y and that fixed the strange behavior.

    Thks simon_hain and arkadyz for your help.

  • Strange behavior with postGlobalEvent and eventOccurred()...

    Hello world

    I have a browser plugin for my application that will do two things:

    Firstly, when the BlackBerry browser is forwarded to a Web page with a particular MIME type, the browser plugin will say my application to go to the foreground. It works without any problem.

    Secondly, the browser plugin will display a global event at my request. My request, making use of eventOccurred(), will look for this event and the EC type-approval, it will execute an authorize() method that I have. This also works. However, I notice some strange behavior:

    The first time my application launches the BlackBerry browser and goes to the page specified (with a custom MIME type), everything works fine. If I had while my application to launch the browser and do it AGAIN, my authorize() method is running TWICE. If I open the browser of my application for the third time, so my authorize() method is started THREE times. See the model?

    .. .This is all this without leaving my application. If I had to leave and then start my application again, the 'sequence' prior would begin again. Thus, it seems that whenever x times that I repeat this process, the eventOccurred() method will receive x events.

    Here are a few snippets:

    public class Events {
        final public static int EVENT_AUTHORIZE = 1;
        final public static int EVENT_OTHER = 2;
    }
    
    manager.postGlobalEvent(pid, 0xCAFEBABE, 1, 0, null, null);
    
    public void eventOccurred(long guid, int event_type, int arg2, Object arg3,
                Object arg4) {
            if (guid == 0xCAFEBABE) {
                switch (event_type) {
                case Events.EVENT_AUTHORIZE:
                    authorize();
                    System.out.println("EVENT EXECUTION");
                    break;
                case Events.EVENT_OTHER:
                    break;
                }
            }
    
        }
    

    Can we see what is happening here? I've been "racking my brain" on this one for a while now...

    Thank you!

    "Thus, this can work any time the class is instantiated." The class is instantiated just before I open my browser".

    Application.getApplication().addGlobalEventListener(this);
    

    If you call the above (by instantiating your class) every time that you open the browser, applications to register this event listener again and again.

    If you're going to do it this way, make sure removeGlobalListener you when your application is done processing.

    "Can I make addGlobalListener when my application starts even if this class does not implement GlobalEventListener?"

    You can always have your UiApplication implement GlobalEventListener or just instantiate a new object that implements it in the constructor of your UiApplication.

  • Loss of data of strange behavior.

    Hi all

    I am facing a strange behavior, I have a table and a form of the VO even pointing the same iterator in the binding.i to change in shape and support bean that I try to get the new values by using the code below:

    DCIteratorBinding iterIntegration = (DCIteratorBinding) UtilityBean.getBindings () .get ("Integration1Iterator");

    Line = iterIntegration.getCurrentRow ();

    getAttributes

    but I get the old values. even if I try to commit before using:

    OperationBinding operationBinding is getBindings () .getOperationBinding ("Commit");.

    operationBinding.execute ();

    the form is loaded with the old values of the table.

    Thank you

    In test form to define the components (inputText, selectOneChoice..), autoSubmit = 'true '.

  • Strange behavior of the browser blocks SQLDEV DM

    Hello

    I feel some strange behaviors in the browser of Datamodeler.

    After the opening of my model

    I have doubleclick in the window of the browser to fetch a few properties of the index:

    Drawings and models > MyModel > relational models > my RelModel > models > Oracle Database 10g > Tables

    So far, everything that happens.

    -I can select the tables and

    -doubleclicking shows the properties of the table.

    -I can scroll vertically

    -Select other tables

    -open and close the subtree of this physical tables

    Now, as soon as I click on any 'more' in the physical tables (for example, the index node or node of the plate) the browser "tri-de gel".

    The tree is distorted, scrolling seems erratic and it is impossible to select. Most of the time the main menu is also distorted.

    If I make the browser window, most of the time I'm able to hit the "file > save" from the menu. The model seems to be registered properly.

    No damage seems to have been done to the template on the reopening

    I'm on Windows 8 pro with the 64-bit version of datamodeler version 4.1.2.895 (from datamodeler - x 64 - 4.1.2 - 895.zip)

    Any ideas anyone?

    any response greatly appreciated.

    concerning

    Wouter

    Hi Wouter,

    I'm sorry, this is a bug and we are preparing a new version with this bug fixed.

    If I make the browser window, most of the time I'm able to hit the "file > save.

    Close the Data Modeler (X - close button in the upper right corner) and it will ask to save the drawing it is changed.

    Philippe

Maybe you are looking for