[JS][CS4/CS5] Images dropping off in scripted pdf export

I've encounted a bug that I wonder if someone could try to replicate or suggest a workaround of some sort for.
Some background: we often need to batch-export a number of versioned InDesign files to pdf. These files will often share a lot of content, particularly placed images. We've used Peter Kahrel's export script for this purpose, as well as a number of scripts of my own. The specifics of the script don't seem to be important. I've seen the problem in both CS4 and CS5 on the Mac.
The problem: Placed Illustrator files (and pdfs) drop off of exported pdfs, without any kind of error being raised, after a user tries to interact with InDesign while it's tied up during a script which opens and exports one file after another. Once an image drops off, it will be missing from every subsequently exported pdf until the script completes. The pdfs are valid—they open and display just fine—they just don't contain all the images they're supposed to. Placed raster images are not affected.
If anyone cares to try to replicate this for me, the script I used to trigger it was:
var f = File("/path/to/InDesign/file.indd"),
    d = Folder("/path/to/export/directory"),
    e = 0,
    i = 1000,
    doc, pdf;
while(e++,i--){
    doc = app.open(f);
    pdf = File(d.fullName + "/" + f.displayName.replace(/\.indd$/,"") + e + ".pdf");
    doc.exportFile(ExportFormat.PDF_TYPE,pdf,false,app.pdfExportPresets.firstItem());
    doc.close(SaveOptions.NO);
The InDesign file can simply be a single page with any (as far as I know) placed Illustrator file or pdf. I used an .ai file with one black rectangle in the middle of the page.
After getting the export script going in the ESTK, I Command-Tab over to InDesign. As soon as I try to click on any UI element (which will get me a spinning beach ball), the placed vector image drops off of the exported pdf and stays dropped off until I stop the script.
While the solution seems simple—don't mess with InDesign while it's batch exporting pdfs—it's easy to forget that it's tied up, and the consequences of an image silently dropping off of an exported pdf could be quite dire.
Thanks in advance.
Jeff

edit: Did file a bug report (5th of december 2012)..
It is just unbelievable that this bug still exists! absqua, have you filed a bug-report?!
Easy to reproduce, just launch script and click any toolpanel header while indesign running script..
test_document.indd includes those black rectangles in linked .ai file.
Right after InDesign ui-element is clicked, that linked .ai is dropped from rest of exported pdf's.
#target indesign
var f = File("~/Desktop/test/doc/test_document.indd"),
    d = Folder("~/Desktop/test"),
    e = 0,
    i = 20,
    pdf;
while(e++,i--){
          myDoc = app.open(f);
    pdf = File(d + "/" + " test_" + e + ".pdf");
    myDoc.exportFile(ExportFormat.PDF_TYPE,pdf,false,app.pdfExportPresets.firstItem());
          myDoc.close(SaveOptions.NO);

Similar Messages

  • Image dropping off the screen

    I am new to Photoshop (CC).  I have been using some tools successfully, but now when I try to use the Healing, Tool, Patch, Type and some others, the image drops off the screen as soon as I place the tool onto the screen. Then I cannot work on the image.  It just started today. Amy ideas???

    Usually any issue thats have to do with the displaying an image or any part of photoshop for that matter, is due to an out dated video driver. Try updating it and see if that fixes the issue.
    If the image is just too large to display, you can hold the ctrl key and the 0 on the numeric panel to zoom out to the full size of that image.

  • Images appearing jagged, warped in PDF export

    I am working in Indesign CS5. I have been exporting print and digital files to PDF for years with no trouble. All of my images are of appropriate resolution.
    Over the weekend, I began to experience issues with export to PDF. Any placed image file is appearing as jagged or warped when exported to PDF. But looks OK when exported to JPG.
    See attached image where the green text "GIONS" is rendering badly. The logo image file is 300DPI at 2000px wide. Placed in this document it is only at 35% its true size. Also looks perfectly clear with no pixellation or jagged edges when viewed in photoshop.
    By contrast the placed vector file (white "Link" text at top) and all text in the inDesign file are rendering correctly.
    I have never had this kind of issue before and I am at a loss.

    First, why would you use a raster file for a log made of type?
    Second, check the export settings you are using to be sure you are not downsampling too much or overcompressing.

  • Images scrambled and error on PDF export since upgrade to 2014.1 / 10.1.0.71 build

    I am using a mac and just upgraded to the 2014.1 / 10.1.0.71 build.  I was working on a file and installed the upgrade (I know I shouldn't have done that while in the middle of a project.  Brain lapse), but as soon as I opened the file the images are scrambled when viewed on "high quality display".  If I view them on "typical display" they show up fine.  But now when I try to export as a PDF it throws an error and will not export.   The only solution I found was to reopen each image and save them out again as a new .psd, pdf files.  Then it seems to export properly.  If I try to import the previous files it says there is not an import filter for that file type.  Any ideas what could be causing this?

    Hello,
    it turned out to be an application problem that somehow only manifested itself since the upgrade.
    The problem was that we performed an update to the DB in the Corba object's deactivate method. The object had the method activation policy, and the update was a left-over from way back when the object was stateful.
    There was a race between the last update (xaostart/xaoend cycle) in the first Tuxedo server and the commit (xaoprepare) in the second Tuxedo server.
    The fix is to move the update out of the deactivate method and add it at the end of the service method(s). Alternatively we could have switched to transactional object activation, but since there is only one invocation to the object, that did not make sense.
    Roger
    Edited by: Roger Fischer on Sep 7, 2011 10:32 AM

  • InDesign CS5 PDF export status

    It seems that now with CS5 we no longer receive a pdf export status bar. Export is running in background. When exporting large files, the only way I know it's still working or exporting is the error message when I try and close document... Saying task running in BKG.
    In Cs3 and 4 there was a status bar that displayed progress. Is this a preference that can be turned on or off?
    Annoying when exporting large files with many pages...
    Any help?
    Thanks

    OK, well, here we go. I hope people find it useful -- if so, I'l make an announcement thread so people are more inclined to see it.
    You can also download it from here.  See How to Install InDesign Scripts for installation instructions. If you save it in the
    Startup Scripts folder, it will run automatically when InDesign is started. Running it a second time disables it.
    // exportPop.jsx -- pops up Background Tasks when you start an export
    //   and a modal dialog when an export finishes.
    // Beta version. Please post feedback at
    //   http://forums.adobe.com/thread/822192
    // John Hawkinson, 17 March 2011
    // Save in STARTUP SCRIPTS folder to start automatically.
    #targetengine session
    (function() {
        var
            old1 = app.eventListeners.itemByName("exportPop1"),
            old2 = app.eventListeners.itemByName("exportPop2");
        if (old1.isValid || old2.isValid) {
            if (old1.isValid) { old1.remove(); }
            if (old2.isValid) { old2.remove(); }
            alert("Export pop up window removed.\n"+
                "Indesign will behave as normal.");
            return;
        app.addEventListener("beforeExport", function() {
            var
                tasksPanel = app.panels.itemByName("Background Tasks");
            if (tasksPanel) { tasksPanel.visible=true; }
        }).name = "exportPop1";
        app.addEventListener("afterExport", function(ev1) {
            var task, listener;
            task = app.idleTasks.add({ name: "exportPop", sleep: 1000});
            listener = task.addEventListener(IdleEvent.ON_IDLE,
                function(ev2) {
                    listener.remove();
                    task.remove();
                    alert(ev1.format+" export complete of "
                        +ev1.fullName+" at "+ev1.timeStamp);
        }).name = "exportPop2";
        alert("Export pop up window installed\n"+
            "Background Tasks will appear the start of an export\n"+
            "and a dialog will appear after each export complete.");

  • Script that worked in CS does not work in CS4 - multiple open page, print , pdf export and close

    I had a script that worked great for me in Indesign CS. But now does not work in CS4. Anyone knows what needs to be done to make it work again ?
    When I drop folder with indesign files on top of this script:
    1. opens first page
    2. turns specific layer on
    3. prints using preset
    4. exports using preset
    5. close without saving
    6. next page
    Anyone who can give me solution or idea how this should work is greatly appreciated.
    on open sourceFolders
    repeat with sourceFolder in sourceFolders
    tell application "Finder"
    try
    -- If you would like to include subfolders, you say - every file of entire contents of folder…
    set idFiles to (every file of folder sourceFolder whose file type is "IDd5") as alias list
    on error -- work around bug if there is only one file
    set idFiles to (every file of folder sourceFolder whose file type is "IDd5") as alias as list
    end try
    end tell
    if idFiles is not {} then
    tell application "Adobe InDesign CS4"
    set user interaction level to never interact
    repeat with i from 1 to count of idFiles
    open item i of idFiles
    tell document 1
    try
    set visible of layer "ImagesTag_Layer" to true
    end try
    set myPreset to "letter size" -- name of print style to use
    with timeout of 700 seconds
    print using myPreset without print dialog
    end timeout
    set myPreset1 to "pdf preset name" -- name of pdf export style to use
    set myName to the name -- name includes .indd should remove at some point          
    with timeout of 700 seconds
    export format PDF type to "users:temp:Desktop:pdf:" & myName & ".pdf" using myPreset1 without showing options -- set path here format ComputerName:Folder1:Folder2:......:FileName.pdf
    end timeout
    close without saving
    end tell
    end repeat
    set user interaction level to interact with all
    end tell
    end if
    return 10 -- try again in 10 seconds
    end repeat
    end open

    (Disclaimer: me not an AS guy!)
    First thing I noticed is the interaction level is set off. If you comment out this line
    set user interaction level to never interact
    you might be able to pinpoint the exact error -- ID will display a standard "failed" dialog, hopefully showing the line that it fails on.
    A quick question: the script assumes two presets in your InDesign: one for print ("letter size") and one for PDFs ("pdf preset name"):
    set myPreset to "letter size" -- name of print style to use
    set myPreset1 to "pdf preset name" -- name of pdf export style to use 
    Do these actually exist in your CS4, with the same (non)capitalization and spaces?

  • CS4: Fit Image Problem

    Recently had a very bizarre issue that just happened. Not sure why, but it won't go away.
    I use the Fit Image script quite a bit. For sizing images that will end up on the blog, batching out files for proofs, etc. I have it written into many of my actions.
    Up until a few days ago, if you opened any action that I've recorded and expanded out the Fit Image step, you would see the dimensions (in pixels) that were recorded. Then, I started getting an error message for any action that used Fit Image. The error message was "Javascript code was missing".
    I checked my scripts folder and the Fit Image script is there. Nothing has changed. I even used Time Machine to go back a few weeks and see if anything had been deleted. Nothing.
    I tried to write a new action using Fit Image and now, instead of the expanded view showing the size in pixels, it's showing in inches! When I manually use Fit Image, the dialog box comes up with pixels ONLY, so why is it that the recorded step is shown in inches?
    I've gone so far as to uninstall CS4 and reinstall it. The first thing I did was record an action and I'm getting the same results. Why would this just change and does this mean I have to re-record all my actions that use Fit Image?
    Any ideas or insight?

    The problem come down to the fact the the way scripts are recorded in actions the full path of the script is recorded. If you un-install CS3 its script directory will be deleted so the script is gone CS4 script is in a different directory.
    CS2 and prior recording of the plug-in fit image were recorded as step Fit Image not as a script path step.  These actions should still work for when Photoshop starts up the CS4 Fit Image scripts register as the plug-in Automate>Fit Image.  When these action  are played and the plug-in step Fit Image get played it is looking for the registered Fit Image Plug-in Photoshop should run the CS4 Fit Image Script.
    The bug in Fit Image is very minor.  One day I used fit image on a image that was 1080 x 1080 and fit image was set to 1200 x 1200 the resulting image turned out to be 1201 x 1200 one side was one pixel off there were 1200 extra pixels.
    Reading the CS3 Fit Image Script I saw this:
         docRatio = docWidth / docHeight; // decimal ratio of original width/height
         // NOTE - ccox - 17 Aug 2004 - I added the rounding by 0.5
         // this should solve reported cases of fit image being off by 1 (always under)
         // NOTE - elr - 3 May 2006 - keep original aspect ratio
         newWidth = width;
         newHeight = ((1.0 * width) / docRatio) + 0.5; // decimal calc
         newHeight = 1 * newHeight; // make integer
         if (newHeight > height) {
              newWidth = 0.5 + docRatio * height; // decimal calc
              newWidth = 1 * newWidth; // make integer
              newHeight = height;
    Someone fixed fit image not to be one pixel under.  I thought this fix most likely cause my one over problem so I stuck in some alerts to see the numbers. Looked like the multiply by one to round did not round and I thought the .5 value perhaps would work better if it were .4.  So I changed to code to
         docRatio = docWidth / docHeight; // decimal ratio of original width/height
         // NOTE - ccox - 17 Aug 2004 - I added the rounding by 0.5
         // this should solve reported cases of fit image being off by 1 (always under)
         // rounding by .5 seem to make some sides 1 Px large change to .4 and used math round to round JJMack
         // NOTE - elr - 3 May 2006 - keep original aspect ratio
         newWidth = width;
         newHeight = ((1.0 * width) / docRatio) + 0.4; // decimal calc
         newHeight = Math.round(newHeight); // make integer
         if (newHeight > height) {
              newWidth = 0.4 + docRatio * height; // decimal calc
              newWidth = Math.round(newWidth); // make integer
              newHeight = height;
    The name of my script file is "My Fit Image.jsx" I renamed Adobe file to "Fit Image.jsx.Adobe" My script is in My Photoshop Script tree which I linked to Photoshop's Presets\Script\ by placing a shortcut to my tree into into Photoshop's Script directory. "My Fit Image.jsx" registers itself as Automate>Fit Image...
    $$$/JavaScripts/FitImage/Name=Fit Image...
    $$$/JavaScripts/FitImage/About=Fit Image   Version 10.0   By Quality Process^r^rCopyright 2007 Adobe Systems Incorporated. All rights reserved.^r^rResizes a document constrained by the given bounds.^r^rJohn J. McAssey Modified Version^rFixed the one side one pixel to long problem^rand changed the interpolation Method used^rUpsizing will use Bicubic Smoother^rDownsizing Bicubic Sharper^rInstead of just using Bicubic for all resizing like Adobe did.
    automate

  • IChat audio drops off

    I've looked about, but can't seem to find anyone with a similar issue, my iChat audio drops off.
    I spend long hours on video iChat and for no apparent reason, after a while, my fiancée will think I'm being quiet.
    I can open the Audio/Video preferences and the sound meter bar will be unresponsive to all sounds.
    I go into the computer sound settings and the input bar will be active, jumping up and down the meter with any sounds made.
    The only way I seem to be able to regain the sound it to quit iChat and open it again and then recall my fiancée.
    Does anyone know a cure that will stop this happening, it's been going on since updating to 10.7.3

    Hi,
    As there are no actual volume settings in iChat itself there is obviously some sort of Capping mechanism or some process that does not fire properly.
    On the whole I tend to keep my computer volume Low  and use this AppleScript to increase the Volume (output)
    Some while ago I added the Input volume line:-
    using terms from application "Messages"
    on av chat started
            set status to away
            set status message to "In Conference . . ."
            delay 0.2
            set volume input volume 85
            delay 0.2
            set volume output volume 50
            delay 0.2
        end av chat started
    end using terms from
    this needs to be stored in your Home Library/Scripts/iChat (or Messages folder) and linked to in iChat  > Preferences > Alerts by changing the top item to  Video Chat Started and enabling the Applescript option and linking to the Script.
    7:21 PM      Saturday; March 31, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Machines 'dropping off' the render queue

    Hi guys,
         We have Windows 2008 server as our centralized storage.  All the render machines have the shared folders mapped correctly with all the permissions set.  We are using After Effects CS5.  What we are finding is that after a few comps have been rendered in a multi-comp project, some will drop off the render queue.  What happens is that the render window list disappears and the watch window pops up and keeps cycling as if it's 'lost' the project is supposed to render.  Usually, if we reboot or restart the render engine and go back to the watch folder, it "might" pick up the project and carry on rendering.  All the machines are on Windows 7 64-bit.
    Any suggestions?
    Jason

    This is a known state, but not directly AE's fault - one of your machines is not able to access footage items within a specific limit and this effectively also shuts down other machines because they, too, go into this waiting forever state. Ultimately it boils down to too many machines trying to access the same files or directories and clogging up your network. The only way to avoid it is to ramp up your network bandwidth or e.g. instead of working with compound movie clips, work with image sequences.
    Mylenium

  • Elements dropping off my files when printed from a PDF

    Please can anyone help... I am running InDesign CS1, I have recently designed a leaflet which included dotted lines for answers to questions.
    To make the dotted lines I used the full stop button (rather than the dotted line option on the line tool). Because the file had an awkward bleed area it was necessary to create a PDF file (using the inDesign PDF export option at High Resolution, no compressions) to lay the document up ready for print.
    However when I printed the document to a networked Colour Copier and to the Platemaking system the lines had mysteriously dropped off... Unfortunately I didn't spot that they weren't on the Platemaker Preview because they hadn't appeared on the Colour Copy (which I use to compare the two for errors) and so a 10,000 print run later and the job was rejected. Does anyone know why this has happened?
    If I print directly from the original InDesign document they show perfectly. If I print the same PDF layup from InDesign CS2 they don't show. Yet if I print from InDesign CS4 they print perfectly from exactly the same file, so I don't think it can be down to the PDF or the typeface (which is standard Helvetica Light).
    I obviously can't afford for this to happen again and it would be good to know if there is something I can do to prevent it... In a perfect world all 3 machines in the office would be running the same version, but in the current financial climate we can't afford to upgrade. I would use CS4 all the time, but for the other two computers which would never be able to open the InDesign files again. It doesn't make sense to me as EVERYTHING was created on the CS1 machine, so I would assume that the machine and software would be able to use it's own programming without issue.
    Thank you for any help you can give me.

    Why are you using the line tool or full stops for this? Use a right indent tab and use a "full stop" in the leader
    http://indesignsecrets.com/tab-leaders-part-1-separating-columns-of-text-with-dots.php
    http://indesignsecrets.com/tab-leaders-part-2-formatting-leaders.php
    I'm not clear on what version of InDesign you are referring to - CS1, CS2, CS4?
    As for why it's not appearing, that is a mystery? Any screenshots ?

  • Sound drops off after 15 minutes after upgrading from windows 7 to Windows 8.1.

    I upgraded my PC from Windows 7 to Windows 8.  Then, from Windows 8 to Wimdows 8.1.   When playing a Movie I've downloaded from iTunes it plays normally for a good while.  Then, after 15 minuites or so the sound drops off. If I close and reopen iTunes it plays again for about the same time.  I had to do that five or six times to get through a movie.   I've tried installing the latest sound drivers, uninstalling and reinstalling the latests iTunes with no luck fixing the issue.  I have my PC connected to my TV via HDMI cable.  Any suggestions?

    Hi,
    You could download and install the trial version of Photoshop Elements 12.
    For your serial number, try this:-
    Go to Adobe.com and there should be a button to Manage account - click on that and sign in with your Adobe Id.
    Click on View All under Plans & Products
    Click on View other products
    After a short while, you should see your Photoshop Elements appear and you can expand it to see your serial number.
    The serial number can be entered into the trial version to activate it.
    Do you have your catalog and images?
    Brian

  • Using Photoshop CS4/CS5 and Lightroom 2/3 on Win 7 vs OSX

    I do NOT want to re-ignite the no-win discussion of pc vs mac. Now that CS5 is announced, yet again as I preprare to upgrade from CS4, I ask if I should convert fromWin7 64-bit on a PC to MAC Pro running OSX. I currently run a WIN 7 64-bit PC with 8 GB Ram. I would consider buying a MAC PRO with 8 GB RAM. The machine(s) are used strictly for image processing, no general office work or general internet surfing except as relates to supporting my software, etc. 
    I don't want to discuss PC vs MaC but I would like to understand the limits, advantages/disadvantages of one platform vs the other as specifically relates to CS4/CS5 and/or Lightroom 2/3. In other words are there functions or processes that I can do on one platform and not the other, or do better on one compared to the other, not does one cost more than the other any comments or help?? Mike

    As a casual user of CS products, I find no substantive differences between using them on a Mac vs. PC. I can cross post this question over to the Photoshop forum (originally posted to the Photoshop.com web site forum, which is not just about the desktop app).
    It's probably going to become a Mac vs. PC discussion, since the question is inherently 'which is better', but hopefully people will remain objective and constructive!
    -Mark

  • [JS CS4/CS5] ScriptUI Click Event Issue in JSXBIN

    Still working on a huge ScriptUI project, I discovered a weird issue which appears to *only* affect 'binary compiled' scripts (JSXBIN export), not the original script!
    When you repeatedly use addEventListener() with the same event type, you theorically have the possibility to attach several handlers to the same component and event, which can be really useful in a complex framework:
    // Declare a 'click' manager on myWidget (at this point of the code)
    myWidget.addEventListener('click', eventHandler1);
    // Add another 'click' manager (for the same widget)
    myWidget.addEventListener('click', eventHandler2);
    When you do this, both eventHandler1 and eventHandler2 are registered, and when the user clicks on myWidget, each handler is called back.
    The following script shows that this perfectly works in ID CS4 and CS5:
    // Create a dialog UI
    var     u,
         w = new Window('dialog'),
         p = w.add('panel'),
         g = p.add('group'),
         e1 = p.add('statictext'),
         e2 = p.add('statictext');
    // Set some widget properties
    e1.characters = e2.characters = 30;
    g.minimumSize = [50,50];
    var gx = g.graphics;
    gx.backgroundColor = gx.newBrush(gx.BrushType.SOLID_COLOR, [.3, .6, .9, 1]);
    // g->click Listener #1
    g.addEventListener('click', function(ev)
         e1.text = 'click handler 1';
    // g->click Listener #2
    g.addEventListener('click', function(ev)
         e2.text = 'click handler 2';
    w.show();
    The result is that when you click on the group box, e1.text AND e2.text are updated.
    But now, if I export the above code as a JSXBIN from the ESTK, the 2nd event handler sounds to be ignored! When I test the 'compiled' script and click on the group box, only e1.text is updated. (Tested in ID CS4 and CS5, Win32.)
    By studying the JSXBIN code as precisely as possible, I didn't find anything wrong in the encryption. Each addEventListener() statement is properly encoded, with its own function handler, nothing is ignored. Hence I don't believe that the JSXBIN code is defective by itself, so I suppose that the ExtendScript/ScriptUI engine behaves differently when interpreting a JSXBIN... Does anyone have an explanation?
    @+
    Marc

    John Hawkinson wrote:
    Not an explanation, but of course we know that in JSXBIN you can't use the .toSource() method on functions.
    So the implication here is that perhaps the .toSource() is somehow implicated in event handlers and there's some kind of static workaround for it?
    Perhaps you can get around this by eval() or doScript()-ing strings?
    Thanks a lot, John, I'm convinced you're on the good track. Dirk Becker suggested me that this is an "engine scope" issue and Martinho da Gloria emailed me another solution —which also works— and joins Dirk's assumption.
    Following is the result of the various tests I did from your various suggestions:
    // #1 - THE INITIAL PROBLEM// =====================================
    // EVALUATED BINARY CODE
    var handler1 = function(ev)
         ev.target.parent.children[1].text = 'handler 1';
    var handler2 = function(ev)
         ev.target.parent.children[2].text = 'handler 2';
    var     u,
         w = new Window('dialog'),
         p = w.add('panel'),
         g = p.add('group'),
         e1 = p.add('statictext'),
         e2 = p.add('statictext');
    e1.characters = e2.characters = 30;
    g.minimumSize = [50,50];
    var gx = g.graphics;
    gx.backgroundColor = gx.newBrush(gx.BrushType.SOLID_COLOR, [.3, .6, .9, 1]);
    g.addEventListener('click', handler1);
    g.addEventListener('click', handler2);
    w.show();
    eval("@JSXBIN@[email protected]@MyBbyBn0AKJAnASzIjIjBjOjEjMjFjShRByBNyBnA . . . . .");
    // RESULT
    // handler 1 only, that's the issue!
    Now to John's approach:
    // #2 - JOHN'S TRICK
    // =====================================
    var handler1 = function(ev)
         ev.target.parent.children[1].text = 'handler 1';
    var handler2 = function(ev)
         ev.target.parent.children[2].text = 'handler 2';
    // EVALUATED BINARY CODE
    var     u,
         w = new Window('dialog'),
         p = w.add('panel'),
         g = p.add('group'),
         e1 = p.add('statictext'),
         e2 = p.add('statictext');
    e1.characters = e2.characters = 30;
    g.minimumSize = [50,50];
    var gx = g.graphics;
    gx.backgroundColor = gx.newBrush(gx.BrushType.SOLID_COLOR, [.3, .6, .9, 1]);
    g.addEventListener('click', handler1);
    g.addEventListener('click', handler2);
    w.show();
    eval("@JSXBIN@[email protected]@MyBbyBn0AIbCn0AFJDnA . . . . .");
    // RESULT
    // handler1 + handler2 OK!
    This test shows that if handler1 and handler2's bodies are removed from the binary, the script works. Note that the handlers are declared vars that refer to (anonymous) function expressions. (BTW, no need to use a non-main #targetengine.) This is not a definitive workaround, of course, because I also want to hide handlers code...
    Meanwhile, Martinho suggested me an interesting approach in using 'regular' function declarations:
    // #3 - MARTINHO'S TRICK
    // =====================================
    // EVALUATED BINARY CODE
    function handler1(ev)
         ev.target.parent.children[1].text = 'handler 1';
    function handler2(ev)
         ev.target.parent.children[2].text = 'handler 2';
    var     u,
         w = new Window('dialog'),
         p = w.add('panel'),
         g = p.add('group'),
         e1 = p.add('statictext'),
         e2 = p.add('statictext');
    e1.characters = e2.characters = 30;
    g.minimumSize = [50,50];
    var gx = g.graphics;
    gx.backgroundColor = gx.newBrush(gx.BrushType.SOLID_COLOR, [.3, .6, .9, 1]);
    g.addEventListener('click', handler1);
    g.addEventListener('click', handler2);
    w.show();
    eval("@JSXBIN@[email protected]@MyBbyBnACMAbyBn0ABJCnA . . . . .");
    // RESULT
    // handler1 + handler2 OK!
    In the above test the entire code is binary-encoded, and the script works. What's the difference? It relies on function declarations rather than function expressions. As we know, function declarations and function expressions are not treated the same way by the interpreter. I suppose that function declarations are stored at a very persistent level... But I don't really understand what happens under the hood.
    (Note that I also tried to use function expressions in global variables, but this gave the original result...)
    Thanks to John, Dirk, and Martinho for the tracks you've cleared. As my library components cannot use neither the global scope nor direct function declarations my problem is not solved, but you have revealed the root of my troubles.
    @+
    Marc

  • "No image found in subtitle script line" -- What's wrong with my FAB file import?

    I've used Encore for years, version 4 and now 5.1 on both Mac and PC (Windows 7).
    I export FAB files with bitmaps from my subtitling program and import them into subtitle tracks in Encore.
    The last few times this has not worked.  Every time I export FAB files and try to import them into Encore, I get the error message "No image found in subtitle script line."  I've used different machines and different versions (4 and 5.1) of Encore.
    There are indeed images (bitmaps) in the folder containing the FAB file.
    Is there a solution to this problem?
    Thank you!

    I don't recall anyone describing this problem. If you can post a link to a short fab script, I'll test it in an Encore project. I am CS5 only, but it is worth a shot.

  • Editing in Photoshop CS4 rotates image

    After making adjustments in Lightroom 3.2, if I then edit the image in Photoshop CS4, the image rotates slightly clockwise and affects any cropping and adjustments to the vertical I have already done in Lightroom. The rotation occurs as the image is opened in Photoshop so that when I return from Photoshop to Lightroom my image has changed (not counting those made in Photoshop). Why is this happening? I am working in Windows 7.

    Thanks, Dorin, for your response. That sounds like the right explanation. Would CS5 handle the perspective adjustments and lens corrections correctly?
    The files I am editing in Lightroom are pef (Pentax) or dng converted from pef by DxO. Right now I am right-clicking the image in Lightroom and selecting "Edit in Adobe Photoshop CS4". I get the same result with Ctrl+E; but Ctrl+Alt+E does nothing for me. Nothing happens with the latter. That may be because I am already using Topaz's tlfusionexpress2 as Lightroom's secondary editor.

Maybe you are looking for