Possibility to set pdf export options
-
- Posts: 1
- Joined: Wed Jul 17, 2024 8:14 am
Possibility to set pdf export options
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!
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!
-
- Posts: 7284
- Joined: Tue Mar 20, 2018 5:34 am
Re: Possibility to set pdf export options
Hello,
What extension do you mean?
Thank you.
What extension do you mean?
Thank you.
Re: Possibility to set pdf export options
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");
-
- Posts: 7284
- Joined: Tue Mar 20, 2018 5:34 am
Re: Possibility to set pdf export options
Hello,
Thank you for sharing your experience with other users.
Thank you for sharing your experience with other users.
Re: Possibility to set pdf export options
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
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");
-
- Posts: 7284
- Joined: Tue Mar 20, 2018 5:34 am
Re: Possibility to set pdf export options
Hello,
Please send us a sample that reproduces the issue for analysis.
Thank you.
Please send us a sample that reproduces the issue for analysis.
Thank you.