Hi,
i'm using the below funciton to programatically export some dashboards to pdf. This is being done by a windows service so there isn't a user interface. When i run the command the export works fine however it makes the resolution or page size very small which squashes up the dashboards. eg the dashboards have a resoltion of 1800 x 900 which looks fine on any monitor, how when render by the export function the elements get all squashed and no longer fit on the page properly. If using the dashboard UI to export it i get an option to specify the page size, but using the calling the function directly it seems to always default to what seems to be A4.
Is there a way to specify the export document size when using the function below?
public StiReport ExportDocument(StiExportFormat exportFormat, Stream stream);
Programatic Export Page Size
-
- Posts: 42
- Joined: Mon Apr 13, 2020 7:29 am
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Programatic Export Page Size
Hello,
You can use the following code:
var settings = new StiPdfDashboardExportSettings();
settings.PaperSize = System.Drawing.Printing.PaperKind.A4;
settings.Orientation = Stimulsoft.Report.Components.StiPageOrientation.Portrait;
StiDashboardExportTools.ExportToFile(report, pdf, settings);
Thank you.
You can use the following code:
var settings = new StiPdfDashboardExportSettings();
settings.PaperSize = System.Drawing.Printing.PaperKind.A4;
settings.Orientation = Stimulsoft.Report.Components.StiPageOrientation.Portrait;
StiDashboardExportTools.ExportToFile(report, pdf, settings);
Thank you.
-
- Posts: 42
- Joined: Mon Apr 13, 2020 7:29 am
Re: Programatic Export Page Size
HI Lech,
i'm able to get that to work, however no matter what i set in the settings.PaperSize it is always A4. The orientation setting works but always comes out as the A4 size.
i'm able to get that to work, however no matter what i set in the settings.PaperSize it is always A4. The orientation setting works but always comes out as the A4 size.
-
- Posts: 6266
- Joined: Tue Mar 20, 2018 5:34 am
Re: Programatic Export Page Size
Hello,
We couldn't reproduce the issue.
Please send us a sample project that reproduces the issue for analysis.
Thank you.
We couldn't reproduce the issue.
Please send us a sample project that reproduces the issue for analysis.
Thank you.