65 lines
2.0 KiB
Plaintext
65 lines
2.0 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" %>
|
|
<%@ Import Namespace="CLIPreport.OOF"%>
|
|
<%@ Import Namespace="CLIPreport.SDK"%>
|
|
|
|
|
|
<%
|
|
ReportUtil reportUtil = ReportUtil.getInstance();
|
|
|
|
OOFDocument oof = OOFDocument.newOOF();
|
|
OOFFile file = oof.addFile("crf", "CLIP.crf");
|
|
|
|
|
|
PPTExportOption option = ExportOptions.ppt();
|
|
|
|
// 페이지 범위. 2-9, 1-, -5 와 같이 범위를 설정할 수 있습니다.
|
|
//option.setPageRange("1-");
|
|
|
|
|
|
//이웃한 테이블과 병합할 것인지 여부
|
|
option.setMergeTable(false);
|
|
//행간에 라인 영역 무시
|
|
option.setIgnoreLineSpace(true);
|
|
|
|
|
|
|
|
// 확장자를 제외한 파일이름, 파일이름으로 사용될 수 없는 문자열은 '_' 으로 치환됩니다.
|
|
String fileName = "----한글-파일-이름-테스트-문서(특수문자:#$%^&)";
|
|
|
|
option.setName(fileName);
|
|
|
|
|
|
//아래 주석을 해제하면 파일을 브라우저를 통하여 확인할 수 있다.
|
|
// 단, 브라우저에 문서 뷰어 플러그인이 존재하는 경우 가능.
|
|
//response.setContentType("application/pdf");
|
|
//response.setHeader("Content-Disposition", "inline; filename=" + fileName + ";");
|
|
/*
|
|
try { */
|
|
|
|
// 웹 브라우저를 통하여 파일을 다운로드 받을 때 아래의 코드를 사용.
|
|
reportUtil.sendExport(Request,Response, oof, option);
|
|
|
|
// 파일 저장시 아래 코드 사용.
|
|
//File directory = new File("저장될 파일이 위치할 디렉토리");
|
|
//reportUtil.saveExport(directory, oof, option);
|
|
|
|
/*
|
|
} catch(OutOfLicenseException e) {
|
|
e.printStackTrace();
|
|
// 라이센스 없음.
|
|
} catch(CRFFileNotFoundException e) {
|
|
e.printStackTrace();
|
|
// CRF (혹은 reb) 파일 찾을 수 없음.
|
|
} catch(ServerConnectionFailExecption e) {
|
|
e.printStackTrace();
|
|
// 서버와 연결할 수 없음.
|
|
} catch(APIRemoteCallErrorException e) {
|
|
e.printStackTrace();
|
|
// 어떠한 이유로 API 를 호출할 수 없음. (주로 네트워크 오류)
|
|
} catch(APIFailException e) {
|
|
e.printStackTrace();
|
|
// API 호출 실패.
|
|
}
|
|
*/
|
|
|
|
%> |