[CS6] [InDesign SDK] Any way to export SWF without a memory leak?

I use the part of a code example in the example file SnpExportDynamicDocument.cpp that will:

ErrorCode SnpExportDynamicDocument::ExportSWF (const UIDRef & documentUIDRef, IDFile & swfFileName)
{
Status of ErrorCode = kFailure;
OutStream InterfacePtr < IPMStream > (StreamUtil::CreateFileStreamWriteLazy (swfFileName, kOpenOut | kOpenTrunc));

FileHelper (swfFileName) SDKFileHelper;
If (fileHelper.GetPath () .empty ())
{
ASSERT_FAIL ("invalid or missing filename.");
Return kFailure;
}

create the order export SWF action
InterfacePtr < ICommand > swfExportCmd(CmdUtils::CreateCommand(kSWFExportCommandBoss));)
If (swfExportCmd is nil)
{
Assert (swfExportCmd);
Return kFailure;
}

Target
UIDList items (documentUIDRef.GetDataBase ());
InterfacePtr < IPageList const > pageList (documentUIDRef, UseDefaultIID());
for (int32 pageIndex = 0, pageCount = pageList - > GetPageCount(); pageIndex < pageCount; ++ pageIndex)
elements. Append (pageList-> GetNthPageUID (pageIndex));
swfExportCmd-> SetItemList (items);


Cmd adjustment data
IID_IDYNDOCSEXPORTCOMMANDDATA
DynamicDocsCmdData InterfacePtr < IDynamicDocumentsExportCommandData > (swfExportCmd, UseDefaultIID());
dynamicDocsCmdData-> SetStream (outStream);
dynamicDocsCmdData-> SetUIFlags (kSuppressUI);

IID_ISWFEXPORTPREFERENCES
SwfCmdData InterfacePtr < ISWFExportPreferences > (swfExportCmd, UseDefaultIID());
InterfacePtr < IWorkspace > iAppWS (GetExecutionContextSession ()-> QueryWorkspace());
ISWFExportPrefs InterfacePtr < ISWFExportPreferences > (iAppWS, UseDefaultIID());
swfCmdData-> Copy (iSWFExportPrefs);


process the order
retourner CmdUtils::ProcessCommand (swfExportCmd);

}

He fled on the very last line. In other words, if I remove the ProcessCommand() then there is no memory leak.

There seems to be 'leaks 2, 130072 bytes' leaks every time I call the above.

I'm just stick the code that ships with SDK CS6 examples, so I don't see what the problem is.

I checked the code

Any suggestions?

It could also be a bug in InDesign. You can check if you have a newer version of the ID? 8.0.2.413

SDK Build 406

Tags: InDesign

Similar Questions

  • I tried exporting a PDF score in word format, but it seems incomplete. Is there any way to export the music score PDF to word correctly?

    I tried exporting a PDF score in word format, but it seems incomplete. Is there any way to export the music score PDF to word correctly?

    Very, very unlikely, unless you export each page in the form of a simple graph, slats, words and everything. You ask too much, especially given that Word is not a music creation application.

  • Any way to export several columns in the links Panel?

    This was posted on the InDesign forum, suggested that there could be a script that could achieve this?

    Work on a manual with hundreds of illustrations. Each chapter has up to 100.  Need to get more than one column of data (file name and # it appears on the page) exported from the links Panel (in a sorted order) so they can be recessed into a spreadsheet. I use TextWrangler which will clear out all the names of files in a folder, but it sorts alphabetically and I really want them sort by Page numbers where they appear.

    This script creates a CSV file on the desktop that you can import into Excel. The name of the file is the same as the name of the indesign document active.

    Kasyan

    var scriptName = "Generate list of links";
    if (app.documents.length == 0) ErrorExit("No documents are open. Please open a document and try again.");
    
    var page, allGraphics, graphic;
    var text = "File name;Page\r";
    var doc = app.activeDocument;
    
    for (var i = 0; i < doc.pages.length; i++) {
         page = doc.pages[i];
         allGraphics = page.allGraphics;
         for (var k = 0; k < allGraphics.length; k++) {
              graphic = allGraphics[k];
              if (graphic.itemLink != null) {
                   text += graphic.itemLink.name + ";" + page.name +"\r";
              }
         }
    }
    
    WriteToFile(text);
    
    //-------------------------------------- FUNCTIONS ---------------------------------------------
    function WriteToFile(text) {
         var theFile = new File("~/Desktop/" + GetFileNameOnly(doc.name) + ".csv");
         theFile.open("w");
         theFile.write(text);
         theFile.close();
    }
    //--------------------------------------------------------------------------------------------------------------
    function ErrorExit(error, icon) {
         alert(error, scriptName, icon);
         exit();
    }
    //--------------------------------------------------------------------------------------------------------------
    function GetFileNameOnly(myFileName) {
         var myString = "";
         var myResult = myFileName.lastIndexOf(".");
         if (myResult == -1) {
              myString = myFileName;
         }
         else {
              myString = myFileName.substr(0, myResult);
         }
         return myString;
    }
    //--------------------------------------------------------------------------------------------------------------
    
  • Any way to reinstall windows without using external software?

    Sometimes I use programs that are too big for my computer.  They are usually dialog boxes.  And dialog boxes usually have the final orders down.  Which I don't see.  I drag the window to the top, but it is still too long and I can't move it all further because the title bar is completely out of the screen at the top.  I'm holding it by a single line one pixel.  With the help of the tool move does nothing: it must always click/drag on the title bar.  Is anyway to move in a coordinated way, without using external software such as Sizer?  Sorry, I've had the suspect using substantive programmes and it really wouldn't help me, because I do not see the handle which allows access to the size options.

    To move the Windows Active when you can't reach the title bar with the mouse cursor, press and release of + , and press .  You can now use the cursor arrows to move the window back to the desired location.  When the box is located here where you want, press .

  • [8i] Simple question... any way to do this without a subquery?

    Please note that I work in 8i...

    I have the following data samples:
    CREATE TABLE     t1
    (     rec_id     NUMBER
    ,     id_nbr     CHAR(4)
    ,     id_code     CHAR(2)
    );
    
    INSERT INTO t1
    VALUES (1,'A001','HR');
    INSERT INTO t1
    VALUES (2,'A001','HR');
    INSERT INTO t1
    VALUES (3,'A001','DL');
    INSERT INTO t1
    VALUES (4,'A001','HR');
    INSERT INTO t1
    VALUES (5,'A002','HR');
    INSERT INTO t1
    VALUES (6,'A002','DL');
    INSERT INTO t1
    VALUES (7,'A002','HR');
    INSERT INTO t1
    VALUES (8,'A003','HR');
    INSERT INTO t1
    VALUES (8,'A003','HR');
    And the following query gives me the results I want:
    SELECT     id_nbr
    ,     id_code
    FROM     (
         SELECT     id_nbr
         ,     id_code
         ,     ROW_NUMBER()     OVER (
                             PARTITION BY     id_nbr
                             ORDER BY          COUNT(*) DESC
                             )     AS r_nbr
         FROM     t1
         GROUP BY     id_nbr
         ,          id_code
         )
    WHERE     r_nbr     = 1
    ORDER BY     id_nbr
    ;
    But it seems like a simple thing to do... it really does need a subquery / view online? I know that I can't use an analytic function in a WHERE clause, then, how would simplify this (can I simplify)?

    Hello

    Thnaks for the display of the sample data!
    Don't forget to post the results desired from these data, and an explanation of how you get these results.

    I think that's what you asked for:

    SELECT DISTINCT
           id_nbr
    ,       FIRST_VALUE (id_code) OVER (
                                         PARTITION BY id_nbr
                              ORDER BY     COUNT (*)     DESC
                             ) AS id_code
    FROM       t1
    GROUP BY  id_nbr
    ,         id_code
    ;
    

    From the data of sample you posted, it gets the same results as your query, but I have no way of knowing if she gets good results for the wrong reasons, because I don't know what are the right reasons. (I just see Lee answer; apparently, he gets good results for the wrong reasons. Don't make people guess what are the right reasons. Say what you want).

    What is the problem with a subquery? I don't think that the above query is more specific what you posted, and I'm not sure that it is not more effective, either.

    Published by: Frank Kulash, October 4, 2010 12:19

  • Have Vista Ultimate. You want to upgrade to Pro 7 I don't need the ultimate "extras." Any way to do it without having to re - install all the applications?

    32 bit.

    Install many applications so that it would be a tedious exercise if I have to do a cleaning...

    If the license for Windows 7 Ultimate, you have access to is an upgrade of retail full version or upgrade Express, you can use the product key and upgrade Express from Windows 7 Professional to Windows 7 Ultimate. First of all, check that the edition of Windows 7, you are upgrading is already enabled (if it isn't, you will encounter complications and that you might start all by performing a clean installation). Click Start, type Anytime Upgrade, click on the option enter a key, enter the key of Windows 7 Ultimate edition at the request, click Next, wait while checking the key, accept the license agreement, click on upgrade, wait while the software upgrades, (it may take 10 minutes or more depending on the if updates are required) your computer restarts automatically, after the reboot, Windows 7 will notify you updating the computer, the computer will restart once more automatically and will be completed the upgrade, a window will appear notifying the upgrade was successful and your computer is ready to use, click Close, you should be upgraded to Windows 7 Ultimate files the stored settings and programs.

    Version upgrade-

    Microsoft Windows 7 Ultimate Upgrade

  • InDesign / best way to export for the Web?

    Hi guys,.

    I did a poster A2 (large size) and now I need to have the same image for webcast on the Internet. I guess it will be a 650 by 800 px pixeles.

    What is the best way to export this content to Internet?

    (1) I noticed that if I save the InDesign file to PDF format, even in the lowest quality of the text in small characters keeps perfectly crisp and clear, while the file is of very small size. Unfortunately the PDF cannot be used-i think - images included in a mailing list.

    (2) if I export the InDesign file even to the most high resolution available as a JPG - a traditional Internet standard image - text is vague and ill-defined, not to mention that the file is big enough.

    (3) should I exported to PDF and then open it in Photoshop and "Save for Web" in JPG? Photoshop has maybe a better engine export when as for images that InDesign... I don't know.

    I'm looking for a way to have well-defined text and clear, small size and image? I'm not sure I could use PDF here.

    Any help or ideas? It would be great

    Thank you

    S

    I export to PDF

    Open in Photoshop

    Save for Web

    PNG 24

  • CControlView class in Adobe Indesign SDK CC

    Hello

    I am working on porting our Indesign CS6 Indesign CC plugin plugin. I go through the differences of method between the classes of APIs common in CS6 Indesign and Indesign CC build that gave to the Indesign SDK CC (reference file). In this change of class of CControlView gave, but this class was not available in the following way,

    AdobeIndesignCC SDK-> source-> public - > java-> widgetbin - > includes.

    I don't know if the class name (CControlView) has been changed in the SDK of CC Indesign or not.so please help me if anyone has the idea in this regard.

    Hello

    Take a look at DVControlView.

  • Export SWF use dangerous error and blurry text

    Hi, I'm new to cs5, but when I export from indesign to SWF or PDF format interactive an error comes: Adobe Flash Player has stopped an operation potentially dangerous etc. etc.

    When I'm a link to a URL or a file on my local server.

    The links work the ' listen to extracts and so I know that they are all good.

    Can anyone help.  I tried the Flash Global security settings and adding URL etc... .This makes a difference?

    Is there a setting somewhere that I need unchesk to allow links to be recognized once exported?

    The other problem I have is that the text seen after export in SWF so blurry?

    Desperate and all that!

    Any ideas greatly appreciated.

    Thank you

    As you say, it s an issue only when you use exported SWF (with hyperlinks) locally. After you don't upload to the server, West no problem. If you want to bypass these warnings in your computer, check out this nice blog post of Rufus Deuchler:

    http://blogs.Adobe.com/Rufus/2009/06/about_hyperlinks_in_swfs_expor.html

    What normally comes to quality text in SWF, text should be of very high quality, maybe you place a PDF file in your layout. InDesign rasterizes all placed PDFs for SWF export process. Basic get better if you throw your resolution of export image (CS5 only). Or open your PDF file in the Illustrator content and copy and paste it for InDesign...

  • Don't you know that there is a way to export through ASDM VPN?

    Dear all

    Don't you know that there is a way to export through ASDM VPN? There are a lot of VPN in our ASA. It would take considerable time to transfer the VPN one of an ASA to anther. I want to export the VPN configuration, and then import it to anther ASA. Anyone has any idea on this? Thank you

    Hello

    Please follow the thread for SSL VPN
    https://supportforums.Cisco.com/discussion/12562686/migration-AnyConnect-VPN-issues

    For IPSec VPN, you can manually copy the phase 1, phase 2 configuration from one device to another or copy the entire configuration and then truncate the redundant output.

    Kind regards
    Dinesh Moudgil

    PS Please rate helpful messages.

  • How to use the InDesign SDK on Visual Studio 2013 for C++ project?

    I had a stuck on my research on 'use InDesign SDK to develop a plugin for InDesign'. Through my research, I tried to launch a sample project comes with the SDK in Visual Studio 2013 (note that all the examples of projects are using C++). Also, I have many questions about InDesign to apply for assistance, but long unanswered forum post. And this final change that I need your help to continue my research on this issue. The issue is described as follows:

    • Document involved: plugin_sdk_CC2015_072_20150618.zip (year SDK InDesign-downloaded from the Adobe site - http://www.adobe.com/devnet/indesign/sdk.html)
    • Development environment: Visual Studio 2013 (C++)
    • I followed the guideline in the folder "plugin\docs\html\index.html".
    • I opened a sample project in the folder "plugin\build\win\prj" Visual Studio 2013.
    • In the Visual Studio 2013 window, I click on "Local Windows Debuggeer" to run the project. But after compiling the project, it generated an error message and the project cannot run more.

    Note: All draft documents and sample are belong to InDesign SDK.

    I stuck there and could not find a solution for this problem yet, I followed the document of InDesing SDK strictly. Finally, the purpose of this research is to create a sample for InDesign plugin.

    Kind regards

    Hello

    Set your path of debugging in visual studio 2013.

    If you find any problem you can contact me please on my mail ID

    [email protected]

    Thank you

    Philippe joshi

    + 91-8860697370

  • I try to install my photoshop material... but I have not a dvd player... is any way for me to do this without a dvd player?  I already bought the software in a form of DVD

    I try to install my photoshop material... but I have not a dvd player... is any way for me to do this without a dvd player?  I already bought the software in a form of DVD

    Download Photoshop Elements products | 10, 11, 12, 13

    Download the CS6 products

    Mylenium

  • Error Code (4) CC 2014 &amp; CS6 Indesign

    Hello community and Adobe staff

    Today I came across a really annoying problem, I have all the files open in indesign cc 2014 comes up with the error code 4

    SOM of the documents have no relation to each other, some are even months. and it gives same error code no idea what to do here.

    same error comes back on EACH document.

    so I did a test document in CS6 and tried to open it incs6 after I tried in indesign cc 2014

    Here's what I gotSkærmbillede 2014-08-27 kl. 12.14.28.png

    the 2014 ccSkærmbillede 2014-08-27 kl. 12.16.58.png

    everything an els have had this problem with the new indesign cc 2014?

    old documents that where it is saved on the CS6 won't be open in CS6 more cause it gives.

    advice would be useful. to resolve this problem.

    I have exactly the same problem as Henrik.  All files created in 2014 CC or CS6 InDesign do not now open in 2014 of CC.  Same (4) error code.  Some files have been created in the past few months, while another was created only yesterday.  I can't open all the files.  InDesign CC 2014 has installed updates.  Any ideas?

  • Export SWF to have all the animation in the main timeline?

    I have an animated logo (LOGO. SWF) and I have several instances of the same symbol playing outside the main storyline. I would like to export this SWF (LOGO. SWF) so that I can import it into an another FLA (BANNERAD. (FLA). But when I import now in (BANNERAD. FLA) does not have these symbols as they are not played in the main storyline of the original (LOGO. (SWF). Is there a way to export the movie (LOGO. SWF) so that you can in a sense all of the animation of the scene? Who is?

    This is a flash banner ad, so I can't it be linked through ACE

    The only thing I can think to think is to copy the logo file timeline in the timeline of the file bannerad.

  • THE STABILIZER of WARP CHANGED OR ENHANCED IN ANY WAY IN After Effects 6.0?

    It was quite an improvement on single track.

    Is there substantial greater progress in the stabilizer deform in AE 6?

    In addition, Mocha AE has changed in any way?

    Thank you!

    Matt Dubuque

    The main change with respect to the mocha AE, is that it is more closely integrated. You can launch a track in After Effects rather than having to go out to open mocha AE separately.

    There is no change in the user interface by stabilizing Warp for CS6. Bug fixes and performance tweaks, however.

Maybe you are looking for