ARIS Community - We Love BPM

How to insert attached document in an output document ?

OriBPM's picture
by Ori . in Reports & Macros posted on 2017-02-14


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.

There are no attachments
Liju Ram posted on 2017-08-30

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.