[]
        
(Showing Draft Content)

Export-Settings

预置导出属性

如果您想在客户导出文件之前,为其设置一些默认的属性,可通过本节学习完成,更多可参考ExportsSettings

PDF

以下是预置 PDF文件属性

    <script>
        const settings = {
            pdf: {
                title: "Invoice List",
                author: "John K",
                keywords: "PDF; import; export",
                subject: "This is the Invoice List",
                userPassword: "user_Pwd",
                ownerPassword: "owner_Pwd",
                printing: 'lowResolution',
                copying: true,
                modifying: true,
                annotating: true,
                contentAccessibility: false,
                documentAssembly: false,
                pdfVersion: '1.7ext3',
                autoPrint: true,
                filename: "InvoiceList"
                }};
        function load() {
                const viewer = new ActiveReports.Viewer('#ARJSviewerDiv', { ExportsSettings: settings });
                viewer.open('/reports/Fonts.rdlx-json');
                }
    </script>

Excel

以下是预置 Excel 文件属性

    <script>
        const settings = {       
                xlsx: {
                    creator: 'Jack',                                 
                    sheetName: 'Sheet_Details',                   
                    size: 'A4',
                    orientation: 'landscape',
                    password: 'password'
                }};
        function load() {
                const viewer = new ActiveReports.Viewer('#ARJSviewerDiv', { ExportsSettings: settings });
                viewer.open('/reports/Fonts.rdlx-json');
                }
    </script>

HTML

以下是预置 HTML 文件属性

    <script>
        const settings = {       
                html: {
                    creator: 'Jack',                                 
                    sheetName: 'Sheet_Details',                   
                    size: 'A4',
                    orientation: 'landscape',
                    password: 'password'
                }};
        function load() {
                const viewer = new ActiveReports.Viewer('#ARJSviewerDiv', { ExportsSettings: settings });
                viewer.open('/reports/Fonts.rdlx-json');
                }
    </script>