PureJS 디자이너를 거치지 않고, 즉시 정해진 포맷의 PDF를 다운로드 할 수 있나요?
페이지 정보
작성자 도각도각 작성일 2023-01-17 09:38 조회 333회 댓글 0건본문
관련링크
구매전 문의 드립니다.
디자인된 포맷을 가지고, 즉시 pdf를 만들어내 다운로드 하고 싶습니다.
디자이너를 통하지 않고, 즉시 내보내기로 파일을 만들 수 없나요?
댓글목록
등록된 댓글이 없습니다.
구매전 문의 드립니다.
디자인된 포맷을 가지고, 즉시 pdf를 만들어내 다운로드 하고 싶습니다.
디자이너를 통하지 않고, 즉시 내보내기로 파일을 만들 수 없나요?
등록된 댓글이 없습니다.
안녕하세요 그레이프시티입니다.
답변이 많이 늦어져서 죄송합니다.
가능합니다.
아래와 같은 코드를 사용해 주시면 됩니다.
import { Core, PdfExport } from "@grapecity/activereports"; const pdfExportSettings: PdfExport.PdfSettings = { info: { title: "Test document", author: "GrapeCity", keywords: "export, report", subject: "Report" }, pdfVersion: "1.4", }; const report = new Core.PageReport(); await report.load("/reports/text-only.rdlx-json"); // to set report parameter values, you can use the code like below. // note that there is should be an array on the right side even if a parameter has single value report.parameters["ParamName"].values = ["Value1", "Value2"]; // if report parameters have default values, the following method should be invoked await report.resolveParametersValues(); const doc = await report.run(); const result = await PdfExport.exportDocument(doc, pdfExportSettings); result.download("exportedreport.pdf");
아래의 링크를 참고해 주시기 바랍니다.
https://demo.grapecity.co.kr/activereportsjs/docs/DeveloperGuide/ActiveReportsJSViewer/Export
감사합니다.
그레이프시티 드림
등록된 댓글이 없습니다.