Hi Ronald, it seems that there is a new restriction on the size of the images in the newer Jakarta version. They are stated here from what i have found: HR Document Templates



It basically states:


  • The logo image to use in your header. The header image can be a maximum of 50px high. If your letterhead includes a logo and text, ensure that the logo image includes the text, as you can only configure the image in the header.
  • The logo image to use in your footer, if applicable. The logo image can be a maximum of 15px high. You can configure both an image and text in the footer.


Also the way they accept images has changed from the previous versions. Take a look at the HR plugins example, but doing a direct image works better like:


this.headerImage = instance + "Print-logo-workorder.jpgx";



I ended up sending in the image like this:


var headerId = gr.u_header.getDisplayValue() ? gr.u_header.getDisplayValue().substring(0, gr.u_header.getDisplayValue().indexOf('.iix')) : '';


this.headerImage = this._getTemplateImage(headerId);



And the function invoked looked like this:


  _getTemplateImage: function(attachmentSysId){


// gs.addInfoMessage('Going to add image of ID= ' + attachmentSysId);


if(gs.nil(attachmentSysId))


return '';


var imageAttachment = new GlideRecord('sys_attachment');


imageAttachment.get(attachmentSysId);


var binaryData = new GlideSysAttachment().getBytes(imageAttachment);


var base64Image = GlideStringUtil.base64Encode(binaryData);


if (!gs.nil(base64Image))


return '<img src=\"data:image/png;base64,'+ base64Image +   '"/>';


else


gs.info('Issue found with getting the image');


return '';


},