Is there any way to export swf with only pageItem(not document) in InDesign Document?


is there way export swf pageitem(not document) in indesign document?

 

in case follow as:

 

uidlist selecteditems(ilayouttarget->getuidlist(kstripstandoffs)); 
int32 inbobjects   = selecteditems.length();

uidref pageitemuidref = selecteditems.getref(0);

 

  tchar swffilepath[ max_path+2 ];
  _stprintf( swffilepath, _t("d:\\temp\\test.swf") );

  widestring swffilename( (utf16textchar*)  swffilepath );
  idfile swffile;
  swffile.setfilename( swffilename );

 

  interfaceptr<ipmstream> outstream(streamutil::createfilestreamwritelazy(swffile, kopenout | kopentrunc));
  if ( !outstream )    return kfalse;

  interfaceptr<icommand> swfexportcmd(cmdutils::createcommand(kswfexportcommandboss));
  if ( !swfexportcmd )   return kfalse;

 

  uidlist items(pageitemuidref.getdatabase());
  swfexportcmd->setitemlist(items);

  interfaceptr<idynamicdocumentsexportcommanddata> dynamicdocscmddata(swfexportcmd, usedefaultiid());
  dynamicdocscmddata->setstream(outstream);
  dynamicdocscmddata->setuiflags(ksuppressui);

 

  // iid_iswfexportpreferences
  interfaceptr<iswfexportpreferences> swfcmddata(swfexportcmd, usedefaultiid());
  interfaceptr<iworkspace> iappws(getexecutioncontextsession()->queryworkspace());
  interfaceptr<iswfexportpreferences> iswfexportprefs(iappws, usedefaultiid());
  swfcmddata->copy(iswfexportprefs);

  cmdutils::processcommand(swfexportcmd);

 

in case, when executing, indesign killed, no message

yes can export swf pageitems.

 

for this, need set commands itemlist list of page items want export, have tried statement

swfexportcmd->setitemlist(items);

 

its 'items' uidlist empty .

'selecteditems' intended used suppose. , thats reason indesign crashing, guess.

 

hth.

 

regards,

jasmine



More discussions in InDesign SDK


adobe

Comments

Popular posts from this blog

Installation database is corrupt

Nogen der kender et simpelt hvidt template med topmenu kun - Joomla! Forum - community, help and support

Error compiling for board Arduino/Genuino Uno.