InDesign 2020 CEP Panel Size Bug

Add your vote to my bug report here:
https://indesign.uservoice.com/forums/601180-adobe-indesign-bugs/suggestions/39698728-indesign-2020-15-0-1-cep-panel-size-bug-on-windows

A customer of mine reported that a CEP panel I made for them was randomly changing size and growing.

That sounded like the old bug we experienced way back, which I assumed had been fixed.

(See https://community.adobe.com/t5/get-started/cep-panel-wrong-size-in-cc2018/td-p/9660228?page=1)

I had not seen this problem in InDesign 2020, but I can now confirm: it’s still there, at least on my Windows laptop, using InDesign 2020 15.0.1, Windows 10, Microsoft Surface 4 with HiDPI.

At first I had a bit of trouble duplicating the problematic behavior; it only happens in fairly specific circumstances.
The conditions are:
– InDesign 2020 15.0.1
– Windows 10 x64
– HiDPI display
– Windows Display Scaling > 100%
I do know the HiDPI and scaling > 100% conditions are necessary, but I don’t know for sure if these conditions are sufficient, i.e. there might be additional circumstances that I’ve not yet identified.

What I’ve been able to determine is this:

  • it is related to the display scaling on Windows. I have a HiDPI display, and when the Windows Settings for Display Scaling is set > 100%, my panel goes wonky when displayed. Often, it grows every time it is opened.
  • the issue cannot be worked around with a call to CSInterface.prototype.resizeContent
  • Once wonky, stays wonky. After the panel goes haywire, setting the scaling back to 100% does NOT fix it.
  • to reset things to normal, I need to
    a) quit InDesign
    b) set the display scaling to 100%
    c) Delete the InDesign SavedData file from below %LOCALAPPDATA%\InDesign\[LANGCODE]\Caches
    After doing that it comes back to normal
  • The best workaround I have for now is to not use scaling. Instead, I set the display to a lower resolution (so everything stays about the same size, but becomes fuzzy), and then the panel behaves properly.
  • I don’t know if having scaling set to > 100% is sufficient as a condition to trigger the problem. I only have one machine set up to test with.

I’ve not seen this same issue on my (Retina) Macs. I suspect it’s a Windows-only issue.

My customer sent me a video, so I knew for sure the issue was real, but I had some trouble making it happen on my machines.

I had initially tried using VirtualBox to mimic my customer’s setup, but the issue never happened using VirtualBox.

My VM setup (even though it also uses Windows Display scaling) did not exhibit the problem. VirtualBox is weird when it comes to scaling and resolutions.

Then I tried using an old T420 Lenovo laptop. This only has a ‘normal’ display and is set to use 100% scaling so I did not see the issue on thact machine either.

It’s only when I pulled out my MS Surface 4 which has a HiDPI display and scaling set to 200% that I could duplicate the issue my end.

I created a ‘dummy’ extension using CEPSparker

This extension is a simple ‘HelloWorld’ panel with size set to 600×600.

The ZXP file can be downloaded here:
https://rorohiko.com/downloads/ID2020PanelSizeBug/ID2020PanelSizeBug.1.0.0.zxp

The source code archive for this ZXP can be downloaded here:
https://rorohiko.com/downloads/ID2020PanelSizeBug/ID2020PanelSizeBug.zip

If I have scaling at 100%, it looks like this when I open the dummy panel:

With the scaling at 200%, I open the panel:

And then I get this:

The panel is wider than my whole screen.

Fetch URL over https using InDesign ExtendScript: now also for InDesign 2020

The ExtendExtendScript installer was updated to also cover InDesign 2020/macOS Catalina. Download link at the end of this post.

Easily the most popular feature of ExtendExtendScript is that it provides an easy-to-use replacement for the old GetURL() method I wrote long time ago (https://rorohiko.blogspot.com/2008_07_01_archive.html)

The old GetURL only supported unencrypted http. The replacement provided by ExtendExtendScript will handle encrypted https traffic too.

ExtendExtendScript is more than just GetURL(). It allows you to enhance ExtendScript with all kinds of functionality written with node.js.

Version 1.0.4 was released on 16-Dec-2019, and adds support for InDesign 2020 and macOS Catalina.

Example: downloading an image over https, after installing ExtendExtendScript becomes as easy as:

// Need to run in a persistent engine for callbacks to work
// Make sure to add JSInterface.jsx and json2.jsx

#targetengine TestSomewhere
#include "JSInterface.jsx"

function handleData(data) { 
        var fileURL = "~/Desktop/image.jpg";
        var file = new File(fileURL);
        file.encoding = "BINARY";
        file.open("w");
        file.write(data);
        file.close();
        alert("File downloaded to " + fileURL);
}

var url = "https://www.rorohiko.com/MagnetoGuides2-poster.jpg";
JSInterface.evalScript("JSInterface.plugins.getURL(JSInterface.getData())", url, handleData);

More info on what it is, how it works, how to use it, and the source code can be found here: https://coppieters.nz/?p=133

ExtendExtendScript is a labor of love, and maintaining this tool represents a substantial cost to my company, Rorohiko Ltd.

You can help avoid that ExtendExtendScript would become abandonware!

Building installers, testing, code signing, notarizing, providing free tech support and hand-holding: it all adds up.

If this extension is useful to you, help the bean counters at Rorohiko properly gauge how useful this is to you, and show your level of interest and appreciation by making a donation to [email protected] via PayPal.

One way to go about it could be to make an honest estimate of how much time and effort this tool has saved you, then send Rorohiko 5% or 10% percent of your savings.

Download link to the latest installer:

https://www.rorohiko.com/downloads/ExtendExtendScript.1.0.4.zip

ExtendExtendScript and macOS Catalina

At the moment, the ‘canned’ ExtendExtendScript installer is not compatible with macOS Catalina (installer is 32 bit) and the source code comes with a manifest that ends with InDesign 13.x (CC 2018).

Recently, I’ve received a request for a macOS Catalina-compatible installer, but I am wondering whether I should put in the effort to update the ExtendExtendScript installer to 64-bit and cover InDesign CC 2019 and InDesign 2020.

The issue is that I have no ‘feel’ for how useful or popular this installer is. As a one-man band I need to judiciously divide my time between income-earning and free projects, and I want to avoid putting a lot of unpaid time and effort into a project that no one is interested in.

Easiest is to leave the thing as-is: the source code provided in an earlier post is sufficient to make this work for yourself on macOS Catalina and with InDesign 2020, but it’s not straightforward and would take some effort. (https://coppieters.nz/?p=133)

So, email me some feedback (kris at coppieters.nz or kris at rorohiko.com), and let me know if you’re using the ExtendExtendScript installer and whether you need or want it for macOS Catalina or InDesign CC 2019/InDesign 2020

If there is sufficient interest, I’ll try to put in some time in the coming months.

Finding InDesign Developer Versions

Disclaimer: the info below is a ‘best effort’ – it might be inaccurate or outdated by the time you read it. Make sure to verify any of the information below. Feel free to drop me an email to
kris at rorohiko.com
if you spot any inaccuracies.

Jump further down to the second section Where can we find…? for a straight list of InDesign versions and download locations.

I always have a hard time finding my way around the Adobe developer resources for InDesign development.

Maybe I am missing something, but I find them scattered over multiple places, and each time I need to download something, I end up in a wild goose chase trying to catch the elusive file I am after.

Below I will put my notes that are meant to help me remember where stuff is. It’ll just be a list of links and sites and stuff, organized in a way that fits my way of working. I am putting it out here, as it might be useful to someone else too.

What Is Available?

If you are looking for all material regarding a particular InDesign version, skip to the next section – I will re-order the same information in this section by version.

First, I’ll list what is available, collated by the location where you can find it.

There are two main focal points where you will find the files you’re after: the Adobe Prerelease program, and the Adobe I/O web site.

https://console.adobe.io/downloads/id

https://www.adobeprerelease.com/

That first URL is somewhat hard to find. I found it via the following sequence: first, I went to https://www.adobe.io/apis.html, clicked on ‘Adobe InDesign’, which lead to https://www.adobe.io/apis/creativecloud/indesign.html. Then I had to click on ‘Get Started Today’ and that then took me to the downloads page I was after. Once you’re on the download page, you need to scroll down a bit; that might not immediately obvious.

On the downloads page you can download the CEP, ITK Symbol, C++ Plugin SDK, Scripting, and Server SDK for InDesign CC 2017, 2018 and 2019.

To gain access to the second URL, you need to enroll in the Adobe Prerelease program. AFAIK, some or all of the material in this area is under NDA.

Once you’re enrolled, you then might be interested to request access to the following programs:

  • InDesign CC Developers Prerelease: Here you’ll find debug and release versions of InDesign and InDesign Server, going as far back as CC 2017, up to 2020.
  • InDesign CC Prerelease: seems to be a subset of the above program
  • InDesign CC Server Trial Downloads Program: this gives you access to time-limited copies of InDesign server.
  • InDesign Family SDK Download Program: this gives you access to old C++ SDKs (CC 2017 and before).
  • InDesign Family Rapid Release Program: this gives you access to rapid release bug fixes.
  • Creative Cloud Developer Prerelease: (NDA program). Gives you access to tools you might need when working with CEP.

Where can we find…?

ExtendScript Toolkit

You need to enable ‘Show Older Versions’ in the Creative Cloud control panel. After that, ExtendScript Toolkit will be listed and available to install.

InDesign 2020

Beta version: via InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Windows 64-bit only

InCopy 2020

Beta version: via InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Windows 64-bit only

InDesign Server 2020

Beta version: via InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Windows 64-bit only

InDesign CC 2019

Release version: via the Creative Cloud Panel
Installer version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via https://console.adobe.io/downloads/id
Windows 32-bit and 64-bit available

InCopy CC 2019

Release version: via the Creative Cloud Panel
Installer version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via https://console.adobe.io/downloads/id
Windows 32-bit and 64-bit available

InDesign CC Server 2019

Release version: via normal distribution channels
Time-limited test: via the InDesign CC Server Trial Downloads Program on https://www.adobeprerelease.com/
Watermarked developer release version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via https://console.adobe.io/downloads/id
Windows 64-bit only

InDesign CC 2018

Release version: via the Creative Cloud Panel
Installer version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via https://console.adobe.io/downloads/id
Windows 32-bit and 64-bit available

InCopy CC 2018

Release version: via the Creative Cloud Panel
Installer version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via https://console.adobe.io/downloads/id
Windows 32-bit and 64-bit available

InDesign CC Server 2018

Release version: via normal distribution channels
Time-limited test: via the InDesign CC Server Trial Downloads Program on https://www.adobeprerelease.com/
Watermarked developer release version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via https://console.adobe.io/downloads/id
Windows 64-bit only

InDesign CC 2017

Release version: –
Installer version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via https://console.adobe.io/downloads/id and InDesign Family SDK Download Program on https://www.adobeprerelease.com/
Windows 32-bit and 64-bit available

InCopy CC 2017

Release version: –
Installer version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via https://console.adobe.io/downloads/id and InDesign Family SDK Download Program on https://www.adobeprerelease.com/
Windows 32-bit and 64-bit available

InDesign CC Server 2017

Release version: via normal distribution channels
Time-limited test: via the InDesign CC Server Trial Downloads Program on https://www.adobeprerelease.com/
Watermarked developer release version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via https://console.adobe.io/downloads/id and InDesign Family SDK Download Program on https://www.adobeprerelease.com/
Windows 64-bit only

InDesign CC 2015

Release version: –
Installer version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via InDesign Family SDK Download Program on https://www.adobeprerelease.com/
Windows 32-bit and 64-bit available

InCopy CC 2015

Release version: –
Installer version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via InDesign Family SDK Download Program on https://www.adobeprerelease.com/
Windows 32-bit and 64-bit available

InDesign CC Server 2015

Release version: via normal distribution channels
Time-limited test: via the InDesign CC Server Trial Downloads Program on https://www.adobeprerelease.com/
Watermarked developer release version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
Debug version: via the InDesign CC Developers Prerelease program on https://www.adobeprerelease.com/
C++ SDK: via InDesign Family SDK Download Program on https://www.adobeprerelease.com/
Windows 64-bit only

Using the VSCode/ExtendScript Debugger

Below my (Mac specific) working notes for working with the new ExtendScript debugger plug-in for VSCode. I decided to put these out in the open and hope to save someone some frustration.

Your mileage may vary. I find it currently very hard to use because it is brittle and there is no end to crashes, lockups, and general wonkiness.

Switching from ESTK to VSCode:

  • Replace ‘#’ for directives with ‘//@’:
    #targetengine -> //@targetengine
    etc…
  • Add your parent folder with your script or scripts to a new workspace in VSCode. Save the workspace file somewhere close by.
  • Create a .vscode/launch.json file in the workspace folder.
    App "targetSpecifiers” are as in ESTK.
    Examples:
    indesign-14.064 -> 14 refers to InDesign CC 2019, 064 refers to it being a 64 bit version.
    illustrator-23.064 -> 23 refers to Illustrator CC 2019, 064 refers to it being a 64-bit version.
    And so on…
    For the path to the script I right-click the .jsx file in workspace source tree view in the left hand side of the VSCode window.
    Select Copy Path from the context menu, then paste it into the launch.json for the "program" property.

Example launch.json that I use to start with:

{
"version": "0.2.0",
"configurations": [
{
"type": "extendscript-debug",
"request": "launch",
"dontBreakOnErrors": true,
"targetSpecifier": "indesign-14.064",
"engineName": "whateverengine",
"name": "A name",
"program": "pathToTheScript",
"stopOnEntry": false
}
]
}

  • In VSCode, switch to Debug mode (click the bug icon in left hand toolbar)
  • Click the popup right of the green ‘Play’ button at the top, and select a config that you listed in the launch.json
  • Make sure ESTK is not running. If it is running, you’ll get
    (#15) Can’t initialize target
    in the next step.
  • In VSCode, click at the bottom, on the yellow
    Select the target Application
  • If ESTK is not running but you still get 
    (#15) Can’t initialize target
    you need to quit VSCode and on the command line, run

    killall "Code Helper"

    Restart VSCode, then try selecting target application again as before.
  • If you get

    (#15) Cannot execute script in target engine ‘…’!

    It most often indicates a syntax error or so. The fun bit is when it comes to //@include files: VSCode will not report any issues (so all seems well), but it will refuse to run. If that’s the case, you need to open all include files and hunt for the error. Or launch ESTK, which does report the issue straight away.
  • For debugger versions before 1.1.0: If you get

    Cannot debug Error #1116

    you might have inadvertently upgraded to VSCode >= 1.33 which is incompatible.
  • If so, first turn off automatic updates in VSCode. Switch them off now, or it will immediately re-update as soon as you install VSCode 1.32.
  • Then downgrade to VSCode 1.32
    https://vscode-westeu.azurewebsites.net/updates/v1_32
  • Once it’s all good, click the green ‘Play’ button at the top.
  • If your find things start to go wonky (e.g. you cannot inspect certain variables any more or other general wonkiness), you need to start over. Quit your target app, quit VSCode, do the killall…

Useful links

Cannot initialize target:

https://medium.com/adobetech/extendscript-debugger-for-visual-studio-code-public-release-a2ff6161fa01


https://forums.adobe.com/message/10952076#10952076

Version 1.32 of VSCode (1.33 is broken)
https://vscode-westeu.azurewebsites.net/updates/v1_32

Forum
https://forums.adobe.com/community/creative_cloud/add-ons/extensions

ESTK Cannot debug Error #1116
https://medium.com/adobetech/workaround-for-extendscript-toolkit-debugger-error-1116-f067f81f96c6

https://medium.com/adobetech/extendscript-debugger-for-visual-studio-code-windows-compatible-prerelease-f1537375c3f6

Prerelease forum

https://forums.adobeprerelease.com/exmancmd/categories/estkvsc

ReadMe
https://forums.adobeprerelease.com/exmancmd/discussion/42/extendscript-debugger-for-macos-readme/p1

wxMaxima with MacPorts/Mojave

I recently updated my Mac to macOS Mojave (10.14.1).

I was upgrading my MacPorts stuff, and found that wxMaxima was behaving weirdly – some smallish rectangular scroll frame is overlapping the main window and wxMaxima does not work right.

The display looks garbled and corrupted.

I found a way to make it behave better: show, then hide the History (menu item View – History). 

The scrolly thing seems to be a garbled history frame, and show/hiding cleans it up.

Hope that helps someone!