Cloud
Облачный сервис для быстрого и эффективного анализа и визуализации данных для вашего бизнеса без необходимости создания своих приложений и программирования.
@Component({
selector: "exporting-report-from-code-with-changing-export-settings",
template: `
<div class="container">
<h4>This example shows how to export a report to a PDF file and adjust the export settings via code. Please, enter the password <b>123</b> to show report</h4>
<div class="container-button">
<button (click)="saveReportPdf()" class="button" title="Export Report to PDF File">Export to PDF</button>
</div>
</div>
`,
styleUrls: ['../styles.css']
})
export class ExportingReportFromCodeWithChangingExportSettings {
async saveReportPdf() {
var report = new Stimulsoft.Report.StiReport();
report.loadFile("Reports/SimpleList.mrt");
await report.renderAsync2();
var settings = new Stimulsoft.Report.Export.StiPdfExportSettings();
settings.creatorString = 'My Company Name';
settings.keywordsString = 'SimpleList Report Export';
settings.embeddedFonts = false;
settings.passwordInputUser = "123";
var pdfData = await report.exportDocumentAsync2(Stimulsoft.Report.StiExportFormat.Pdf, undefined, settings);
Stimulsoft.System.StiObject.saveAs(pdfData, report.reportAlias + ".pdf", "application/pdf");
}
}StiPdfExportSettings carries options such as creatorString, embeddedFonts and passwordInputUser; passing it to exportDocumentAsync2 applies them to the generated PDF.