Possibility to set pdf export options

Stimulsoft Reports.NET discussion
Post Reply
ericwheeler
Posts: 1
Joined: Wed Jul 17, 2024 8:14 am

Possibility to set pdf export options

Post by ericwheeler »

Hello,
We currently have a report that has so many columns that when we create a pdf each page is split. This leads to incorrect formatting. According to the Stimulsoft support team we might be able to prevent this by using the option StiOptions.Export.Pdf.DivideSegmentPages=false.

Is there any way to set this option using the extension?
Thanks in advance!
Lech Kulikowski
Posts: 7284
Joined: Tue Mar 20, 2018 5:34 am

Re: Possibility to set pdf export options

Post by Lech Kulikowski »

Hello,

What extension do you mean?

Thank you.
terassda
Posts: 2
Joined: Thu Sep 05, 2024 1:27 am

Re: Possibility to set pdf export options

Post by terassda »

To set the StiOptions.Export.Pdf.DivideSegmentPages = false option in Stimulsoft, you need to configure this setting programmatically before generating the report as a PDF. Depending on how you're using Stimulsoftsnow rider 3d (whether in a web app, desktop app, or another platform), you would typically adjust this setting through code.
  • Locate the export options in your code: You need to set the export option just before you export the report as a PDF.
  • Set the DivideSegmentPages Option to false:

Code: Select all

// Import the necessary Stimulsoft namespaces
using Stimulsoft.Report;
using Stimulsoft.Report.Export;

// Load your report
StiReport report = new StiReport();
report.Load("YourReport.mrt");

// Set the PDF export option to prevent page splitting
StiOptions.Export.Pdf.DivideSegmentPages = false;

// Render the report
report.Render(false);

// Export to PDF
report.ExportDocument(StiExportFormat.Pdf, "YourReport.pdf");
Lech Kulikowski
Posts: 7284
Joined: Tue Mar 20, 2018 5:34 am

Re: Possibility to set pdf export options

Post by Lech Kulikowski »

Hello,

Thank you for sharing your experience with other users.
Anthona
Posts: 1
Joined: Fri Jun 20, 2025 4:16 am

Re: Possibility to set pdf export options

Post by Anthona »

I looked at your code and replaced it a bit but it can't work.drive mad
I don't know where I went wrong :|

Code: Select all

// Import required Stimulsoft namespaces
using Stimulsoft.Report;
using Stimulsoft.Report.Export;

// Create a new instance of the report
StiReport report = new StiReport();
report.Load("YourReport.mrt");

// Configure PDF export settings to avoid segment page splitting
StiOptions.Export.Pdf.DivideSegmentPages = false;

// Render the report without saving to the document
report.Render(false);

// Export the report as a PDF file
report.ExportDocument(StiExportFormat.Pdf, "YourReport.pdf");
Lech Kulikowski
Posts: 7284
Joined: Tue Mar 20, 2018 5:34 am

Re: Possibility to set pdf export options

Post by Lech Kulikowski »

Hello,

Please send us a sample that reproduces the issue for analysis.

Thank you.
Post Reply