I have a report that output information of objects in a .doc or .pdf.

The problem is when the attribute "Documentation" of the object had attached a document, I can't find the way to insert it (attached with icon, not its contents) in the table.

(Attached sample image in MS Office Word, and if you open the icon open the document attached)

Any help ?

Actually If the atribute "Documentation" had an image attached I print it but if had other documents does nothing.


Short Code:

output = Context.createOutputObject();

var document = objDef.Attribute(Constants.AT_DOCUMENTATION, LANGUAGE).getExternalDocument();

if (document.isValid()) {
    if ( document.getFileExtension().search(/jpg|jpeg|png|gif|emf|tif|tiff/i) != -1 ) {

         var img = Context.createPicture(document.getDocument(), Constants.IMAGE_FORMAT_PNG);
         output.OutGraphic(img, -1, imgWidth, imgHeigth);

   } else {
          // Insert document as an icon ¿?


Many Thanks.

by Liju Ram
Posted on Wed, 08/30/2017 - 11:00

How did you insert the image into the report. Actually i am trying to do the same using the Report template. But only the image name is getting printed in to the report. Appreciate your inputs.

Posted on Tue, 02/26/2019 - 14:09


We have the same need. Has anyone been able to insert an external Word document into a Word document generated from a script (report)?

Thanks in advance and greetings


Featured achievement

You blog more than you breathe, and your articles stand out: Create 20 more articles, receive very good feedback and stimulate conversations
Recent Unlocks


Weekly | All-time
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon