This is the basic code I'm using, it loads the image, I can see it loaded into the report object via console.log() but nothing displays. Is this intended, a bug, or me not coding this right? When I use the editor Watermark dialog and load the image with its options, it saves the image as base64 encode, however when loaded thru the browser it doesn't show either. If I preview the report inside the Editor, it shows as advertised. If there is another or easier way to accomplish this I'm open to suggestions.
Using the following code to try to load it:
Code: Select all
var options = new Stimulsoft.Viewer.StiViewerOptions({showTooltips:false});
var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);
var report = new Stimulsoft.Report.StiReport({isAsyncMode: true});
report.loadFile("Backgroundimg.mrt");
var page = report.pages.getByIndex(0)
page.watermark.image = Stimulsoft.System.Drawing.Image.fromFile('header.png')
page.watermark.aspectRatio = true
page.watermark.imageStretch = true
page.watermark.imageShowBehind= true
report.renderAsync(function () {
viewer.report = report;
viewer.renderHtml("viewerContent");
})