Runtime Image Watermark

Stimulsoft Reports.JS discussion
BCS
Posts: 83
Joined: Thu Nov 17, 2016 5:47 am

Runtime Image Watermark

Post 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");
})
Attachments
header.png
header.png (105.54 KiB) Viewed 4032 times
BCS
Posts: 83
Joined: Thu Nov 17, 2016 5:47 am

Re: Runtime Image Watermark

Post by BCS »

It's been a week, has this even been looked at?
Lech Kulikowski
Posts: 6244
Joined: Tue Mar 20, 2018 5:34 am

Re: Runtime Image Watermark

Post by Lech Kulikowski »

Hello,

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

Thank you.
BCS
Posts: 83
Joined: Thu Nov 17, 2016 5:47 am

Re: Runtime Image Watermark

Post 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.
BCS
Posts: 83
Joined: Thu Nov 17, 2016 5:47 am

Re: Runtime Image Watermark

Post by BCS »

How is the progress on this, I am badly needing this to finish a phase in a project.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Runtime Image Watermark

Post 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.
BCS
Posts: 83
Joined: Thu Nov 17, 2016 5:47 am

Re: Runtime Image Watermark

Post 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.
Attachments
Demo.zip
(314.58 KiB) Downloaded 350 times
Lech Kulikowski
Posts: 6244
Joined: Tue Mar 20, 2018 5:34 am

Re: Runtime Image Watermark

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue.

Thank you.
BCS
Posts: 83
Joined: Thu Nov 17, 2016 5:47 am

Re: Runtime Image Watermark

Post by BCS »

Just checking to see if there has been some progress.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Runtime Image Watermark

Post 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.
Post Reply