Page 1 of 3

Runtime Image Watermark

Posted: Fri Nov 02, 2018 5:14 am
by BCS
I'm trying to use the watermark as a means of making my reports look more professional. We plan to render, via professional artists, different themes that are most likely SVG files. The best way I can accomplish this is using (on a 8.5 x 11 inch page) an image that is rendered to take up the entire printable area to server as a background.

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");
})

Re: Runtime Image Watermark

Posted: Fri Nov 09, 2018 6:23 am
by BCS
It's been a week, has this even been looked at?

Re: Runtime Image Watermark

Posted: Sat Nov 10, 2018 11:51 am
by Lech Kulikowski
Hello,

Please send us a simple project which reproduces the issue for analysis.

Thank you.

Re: Runtime Image Watermark

Posted: Mon Nov 12, 2018 6:46 am
by BCS
...the code is in my original post along with the image I wish to use...

My report file was a brand new blank report with nothing on it.

Re: Runtime Image Watermark

Posted: Thu Nov 15, 2018 8:54 pm
by BCS
How is the progress on this, I am badly needing this to finish a phase in a project.

Re: Runtime Image Watermark

Posted: Fri Nov 16, 2018 3:28 pm
by HighAley
Hello.

We have checked your code. It is working right.
But it is not really right. There are no semicolons at the end on some lines.
This could be the cause of your issue.

Sorry, but we need additional information to help you.
What version of our product do you use?
Maybe the cause is in something else.

Thank you.

Re: Runtime Image Watermark

Posted: Fri Nov 16, 2018 5:13 pm
by BCS
The semi-colons are not required.

I am running v2018.3.3

Here is a tangible example with semicolons for the sake of argument. (See Zip File)

Adjust paths where needed.

I also included screenshots of the desktop editor vs the browser.

Re: Runtime Image Watermark

Posted: Wed Nov 21, 2018 2:47 pm
by Lech Kulikowski
Hello,

We need some additional time to investigate the issue.

Thank you.

Re: Runtime Image Watermark

Posted: Tue Nov 27, 2018 8:24 pm
by BCS
Just checking to see if there has been some progress.

Re: Runtime Image Watermark

Posted: Tue Dec 04, 2018 7:39 pm
by HighAley
Hello.

We are still working on your issue.
Sorry for such delay.
We will let you know when we get any result.

Thank you.