rdlc Report background image doesn't fit page - c#

I created a rdlc report and set background image to it but I can't find a way to make the image fit the page size like A4 or something .. the image is large and resizing it didn't fix the issue
how to set the background to fit the report page
thanks in advance

You can not. All you can do is have an image that is smaller than the page size repeat in either direction using the BackgroundRepeat property.

Related

IText large pictures

I am writing program to generate PDF from pictures. I want to my pictures will be in normal size foreach page.For example i have image 2000px width and 10000px height and I don`t want to scalling this image. I want his natural size in PDF and not constant A3, A4 or A0. How can I solved that?
Thanks for helps.
If you know the dpi it's just a matter of creating a page with the correct size.
For example with 300dpi and 2000px the size would be (2000/300)*72=480.

How to make an oval frame in RDLC ( Report Viewer )

Is it possible to round the corners of a rectangle in rdlc Report?
I'm trying to make an oval frame in which will be some parameter with text.
I don't think anything changed in that area since, but here is what I found when I was looking for similar feature: Rounded corners on report body and header borders. I think background image is your only option and you can create it dynamically too.
Also, here is the another suggestion: from SO, but I haven't tried that approach, so don't know if it works.

Adding image to rtf doc being resized

We're using migradoc api to create an rtf document.. intermittently when we add an image it;s being resized and coming out absolutely tiny.
Code sample as follows:
MigraDoc.DocumentObjectModel.Shapes.Image image = section.AddImage(imagePath);
image.WrapFormat.Style = MigraDoc.DocumentObjectModel.Shapes.WrapStyle.Through;
If I set LockAspectRatio to true and set a width it does stop is from rendering very small but ideally would like to be able to set a MaxWidth.
Has anyone experiences similar issue?
You have a choice of either changing the image itself by storing a different DPI value in it.
The .Net command to do so with a Bitmap bmp is:
bmp.SetResolution(newHRes , newVRes);
This should not involve reencoding, but I'm not sure.
However you also can simply set the desired DPI value in the Migradoc Image by using its Image.Resolution Property, which
Gets or sets a user defined resolution for the image in dots per inch.
I am not familiar with it at all but I found this code that might help you :
image.RelativeVertical = RelativeVertical.Page;
image.RelativeHorizontal = RelativeHorizontal.Page;

How to display scaled image without anti-aliasing?

Question
How can I scale an image in XAML quickly without anti-aliasing applied?
Background
I am trying to make a pixel editor as a Windows 8 XAML/C# app. I'm using c#/XAML because most of my experience is with c#/WPF.
Method 1: WriteableBitmap + Image control. Originally, I used a WriteableBitmap to store and edit an image. That image is displayed in a resized XAML Image control. The problem is that the image does not get scaled properly because of anti-aliasing. (XAML does not seem to provide the BitmapScalingOptions that are available in WPF)
Method 2: Redrawn WriteableBitmap + Image control. Next I tried writing my own scaling, where I take my original image and write to a larger WriteableBitmap so that the scaled image is pixelated. The scaled image is then presented inside a XAML Image control. This process is slow and inefficient.
Method 3: SharpDX + Direct2d ?? I am pretty sure a solution exists somewhere between SharpDx, SurfaceImageSource, and Direct2d. Event still, I can't quite figure out how to display a SharpDx.WIC.Bitmap inside a Windows.UI.Xaml Image control, and am generally getting lost in the documentation.
What exactly is a recommended setup for achieving my desired end? Are there c# samples available which might point me in the right direction?
I don't know if you mean by scaling it by resizing it with the mouse or just with a button click to auto scale to a predetermined size.
But the thing you can do is to use an Image panel and then, just set it to image.Stretch = Stretch.Fill; so if you override and create a method for the Resize event of the Image Panel, your image will take the size to fill the Image panel.

MS Report (rdlc) change body size

I need help to change the size of the body in a rdlc report. I cannot find anything to set the body size to A4. I selected A4 option in the report properties, but nothing changed. My only option was to manually change its sizes. Does anybody know how can I do this? Im finding rdlc interface pretty hard to understand.
You don't set the "body" size to A4, you set the "Report" outer-most level for the report. The overall PAGE of the report may default to the 8 1/2 by 11, but you can change that. Then the body will stretch and fill content to the allowed page size.

Categories