This is a migrated thread and some comments may be shown as answers.

Printout size in programmatic mode

4 Answers 75 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Pawel
Top achievements
Rank 1
Pawel asked on 08 Aug 2017, 10:02 PM

Hello, my problem is when I try to generate printout in c# app, design in Designer to trap file, the final generated printout looks like scaled in plus.

My target is to get 95 mm x 44 mm label, and this one is designed, in Designer, printout is fine. When I try to print is by below code, label Paper Size looks like scaled. How to set paper size or fix my problem?

Code:

            string path = HostingEnvironment.MapPath(@"~/Content/printouts/packageLabel.trdp");
            System.Drawing.Printing.PrinterSettings printerSettings = new System.Drawing.Printing.PrinterSettings();
            printerSettings.PrinterName = "Bullzip PDF Printer";
            System.Drawing.Printing.PrintController standardPrintController = new System.Drawing.Printing.StandardPrintController();
            Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
            reportProcessor.PrintController = standardPrintController;
            UriReportSource reportSource = new UriReportSource();
            reportSource.Uri = path;
            reportProcessor.PrintReport(reportSource, printerSettings);

 

4 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 11 Aug 2017, 01:08 PM
Hello Pawel,

We had this issue in previous versions of Telerik Reporting. However, it is fixed in the last few versions. 

  • Are you using the last version of Telerik Reporting? If not, you could update and check if the problem will replicate.
  • Could you double-check that the PaperSize property of the PageSetting of the report is set correctly.

If these approaches do not solve the issue, could you open a Support ticket for the problem, and let us know what your computer DPI settings are.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Pawel
Top achievements
Rank 1
answered on 29 Aug 2017, 05:39 AM

Hi,

I'm using the last version. I'm using reporting with an external monitor, and I observed that after I connect or disconnect monitor during operating Windows, Reporting Designer have such issue when I restart system almost all working good but in the previous case. Almost means:

1. loaded file as paper background which area should cover 100% of page size in designer, but cover only 25% (upper-left corner),

2. at the print preview, it's cover 100% of paper size area.

Please find attached print screens. All were made with 3x restart Windows system and without the external monitor.

0
Todor
Telerik team
answered on 30 Aug 2017, 04:16 PM
Hi Pawel,

We were able to reproduce the issue after changing the DPI of the monitor. However, after signing out/in Windows the problem disappeared and the report appeared correctly in both Designer and Preview mode.
It seems that this is a common problem in windows applications that are not dpi-aware, and signing out is required.
Alternatives for using dual monitors with differend DPI on Windows could be found here.

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Pawel
Top achievements
Rank 1
answered on 01 Sep 2017, 11:35 AM
Thanks, it works. Please take care of resolution sensitive in next version.
Tags
General Discussions
Asked by
Pawel
Top achievements
Rank 1
Answers by
Todor
Telerik team
Pawel
Top achievements
Rank 1
Share this question
or