Resize printing

Stimulsoft Reports.NET discussion
Post Reply
dyth
Posts: 8
Joined: Tue Sep 09, 2014 1:13 pm

Resize printing

Post by dyth »

Hi All,

I can't get any clue / solution to fix my current problem, let me explain abit.

I've design a report with height until Y=27.6 and width until X=18.8. When use laser printer to print its ok (print 1 page it will come out 1 page) and when try to print using some printer model of inkjet / deskjet it will have some issue (e.g. print 1 page it will out 2 page) because the some inket / deskjet printer margin issue.

I did try use Resize function however doesn't work (the whole page is blank).

Can anyone give me advise for me to solve this issue? (Maybe for normal printing it will 100% and it can possible resize the whole page to 95% so the printing will be ok for those injket / deskjet - hope my solution is work for all).

Thanks in advance

- David
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Resize printing

Post by HighAley »

Hello, David.

The best solution is to set the page margins as printer margins. Then all printer will print fine.

If you need to change the margins or report size dynamically, if should be done before rendering or you should render the report again.

You could try to use try to use the ResizeReport method but we suggest to do it in the last order.

Code: Select all

            StiReport stiReport = new StiReport();
            stiReport.Load(@"d:\SimpleList.mrt");
            stiReport.Render();

            PaperSize newSize = new PaperSize("A5", 583, 827);
            newSize.RawKind = (int)PaperKind.A5;

            StiResizeReportHelper.ResizeReport(stiReport,
                StiPageOrientation.Portrait,
                newSize.Kind,
                stiReport.Pages[0].Margins,
                stiReport.Unit.ConvertFromHInches(newSize.Width),
                stiReport.Unit.ConvertFromHInches(newSize.Height),
                StiResizeReportOptions.RescaleContent | StiResizeReportOptions.ProcessAllPages,
                0);

            stiReport.Print();
Thank you.
dyth
Posts: 8
Joined: Tue Sep 09, 2014 1:13 pm

Re: Resize printing

Post by dyth »

Hi Aleksey,

Thanks for your the solution and it work well...

Cheers!!
dyth
Posts: 8
Joined: Tue Sep 09, 2014 1:13 pm

Re: Resize printing

Post by dyth »

Hi Aleksey,

After resize the report, can make the report show in center of the page?

Thanks
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Resize printing

Post by HighAley »

Hello.

The report is resized exactly as it was.
If you need to change position of the report you could try to change printer settings but this is out of our product and we can't help you with it.
Or you could create a report template for each paper size that you use.

Thank you.
Post Reply