Posts in Category "C++"

New PlugPlug APIs for hybrid extension developers

InDesign CC 2014.1 (InDesign version 10.1) and its corresponding plug-in SDK (x070 and x071) contains a new include which will be of particular interest to anyone developing hybrid extensions.

In case you don’t know, a hybrid extension is an extension which consists of one or more native plug-ins and one or more HTML (or Flash) extensions.

The new APIs, found in the SDK at /source/public/interfaces/ui/ICSXSPlugPlugExtensions.h, enable workflows where a native plug-in needs to open or close an extension.

Whilst there is no need to port or recompile your plug-ins from 10.0 to be compatible with 10.1, if you want to use this API you will need to use the latest SDK to pick up the new header and you will then have to recompile.

Continue reading…

HTML Extensibility in InDesign CC

The InDesign update you received in August 2013 (InDesign 9.1) included the enabling of HTML5 extensions.

As you may already know, starting in the middle of 2014 Adobe will begin removing Flash-based extension support in Creative Cloud products, starting with Photoshop CC.

If you have any hybrid or regular Flash extensions for InDesign you need to begin migrating them to HTML5 as soon as possible.

Continue reading…

Using EVE for UI layout

The Adobe Express View Engine (EVE) is the recommended method of laying out UI widgets in InDesign dialogs. The main benefit of using EVE is that widget geometry is calculated for you, so that when you add or remove widgets to a dialog all of the other widgets are shifted automatically without you having to recalculate sizes etc.

Continue reading…

Flash UIs with InDesign CS4

InDesign user-interface development can be expensive. It takes a lot of effort to implement a dialog or panel in ODFRC. Things should improve in future versions, with the possibility of using Flash-based user-interface tools like Flex and FlexBuilder. While this represents the future direction of InDesign user-interface development, there is a present reality in InDesign CS4. With an understanding of the current situation, you can implement Flash-based user-interfaces for InDesign CS4.

Continue reading…

InDesign Flash Export with C++

InDesign CS4 adds the ability to export pages to Flash (SWF and XFL files).

The following is a 10 page InDesign CS4 document exported to SWF (Flash). 

You can turn the pages by clicking the text “Next”.  This text was converted to a button in InDesign.  After the first page you will also see a “Previous” button.

More interesting, you can use drag and drop to turn the pages as if you’re turning the pages of of a book or a magazine.  To turn the pages using drag and drop do the following: 

  1. Hover the mouse cursor over the top right corner of the blue rectangle and drag it to the left.  You should see the page curl.
  2. Click and drag to the left.
  3. Release the mouse button when the page appears close to having turned.

If you need to export SWF from a plug-in, take a look at the ExportDynamicDocument code snippet in the InDesign CS4 Products SDK.  The above SWF was exported using that code snippet.

Note: We added a few enhancements (XFL export, and output file selection) in the 6.0.1 update.

The source file lives in the following location in the InDesign CS4 Products SDK.


The code snippet does the following in C++.

  1. Creates a 10 page document.
    • The pages dimensions are small to create the desired SWF size.
    • At 100% scale this is 72 pixels per inch
  2. Creates two text frames on the master pages and converts them both to buttons.
  3. Adds appropriate events (back and next) to these two buttons.
  4. Exports to SWF or XFL.

This last step demonstrates processing the kSWFExportCommandBoss and kXFLExportCommandBoss commands.

It’s more likely you would use scripting to build and export SWFs.  I anticipate adding an equivalent scripting sample in the near future.