뷰어 컴포넌트 - 설정 내보내기

이 샘플은 ActiveReportsJS Viewer 컴포넌트의 내보내기 UI를 설정하는 방법을 보여 줍니다. 이 코드에서는 뷰어 컴포넌트의 availableExports 속성을 사용하여 사용 가능한 내보내기 유형을 지정하고, ExportsSettings 옵션을 사용하여 출력 문서의 설정을 미리 지정합니다. 보고서를 지원되는 형식 중 하나로 내보내고 출력 문서에 적용되는 설정을 살펴보십시오. 자세한 내용은 설정 내보내기 페이지를 방문하십시오. 코드를 보려면 아래로 스크롤하십시오.

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title>ActiveReportsJS sample</title> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap" rel="stylesheet" /> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous" /> <link rel="stylesheet" href="https://cdn.materialdesignicons.com/2.8.94/css/materialdesignicons.min.css" /> <script src="/activereportsjs/demos/arjs/dist/ar-js-core.js"></script> <script src="/activereportsjs/demos/arjs/dist/ar-js-viewer.js"></script> <script src="/activereportsjs/demos/arjs/dist/ar-js-pdf.js"></script> <script src="/activereportsjs/demos/arjs/dist/ar-js-tabular-data.js"></script> <script src="/activereportsjs/demos/arjs/dist/ar-js-html.js"></script> <script src="/activereportsjs/demos/arjs-localization/dist/ar-js-locales.js"></script> <script src="$DEMOROOT$/lib/purejs/license.js"></script> <link rel="stylesheet" type="text/css" href="/activereportsjs/demos/resource/themes/orange-ui.css" /> <link rel="stylesheet" type="text/css" href="/activereportsjs/demos/resource/themes/orange-viewer.css" /> <style> #viewer-host { margin: 0 auto; width: 100%; height: 600px; } </style> </head> <body> <div id="viewer-host"></div> <script> const exportsSettings = { pdf: { title: "ActiveReportsJS Sample", author: "MESCIUS", subject: "Web Reporting", keywords: "reporting, sample", userPassword: "pwd", ownerPassword: "ownerPwd", printing: "none", copying: false, modifying: false, annotating: false, contentAccessibility: false, documentAssembly: false, pdfVersion: "1.7", autoPrint: true, filename: "ActiveReportsJS-Sample.pdf", }, html: { title: "ActiveReportsJS Sample", filename: "ActiveReportsJS-Sample.html", autoPrint: true, multiPage: true, embedImages: "external", outputType: "html", }, }; GC.ActiveReports.Core.FontStore.registerFonts( "/activereportsjs/demos/resource/fontsConfig.json" ); var viewer = new ActiveReports.Viewer("#viewer-host", { ExportsSettings: exportsSettings, }); // remove items from this array to hide unnecessary Exports Types viewer.availableExports = ["pdf", "html", "tabular-data"]; viewer.open( "/activereportsjs/demos/resource/reports/Frontstore.rdlx-json" ); </script> </body> </html>