Changing an Export Settings on the Server-Side
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.When the user exports from the viewer, the export settings can be adjusted on the server through the
Change file name and format settings.
How it works. The event runs on the server, so export options are applied centrally regardless of what the user clicks in the viewer.
onBeginExportReport event.Change file name and format settings.
def beginExportReport(args: StiExportEventArgs):
args.fileName = 'MyExportedFileName.' + args.fileExtension
if args.format == StiExportFormat.PDF:
settings = args.settings
settings.creatorString = 'My Company Name (c) YEAR'
settings.embeddedFonts = False
viewer.onBeginExportReport += beginExportReportonBeginExportReport— fires before the export runs;args.settingsholds the format-specific options.args.fileName— override the download name; PDF settings likeembeddedFontstune the output.
How it works. The event runs on the server, so export options are applied centrally regardless of what the user clicks in the viewer.