72 lines
2.2 KiB
Plaintext
72 lines
2.2 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");
|
|
|
|
|
|
//DOC 저장에 대한 옵션을 설정합니다.
|
|
TIFExportOption option = ExportOptions.tif();
|
|
|
|
|
|
// 페이지 범위. 2-9, 1-, -5 와 같이 범위를 설정할 수 있습니다.
|
|
//option.setPageRange("1-");
|
|
|
|
// true : 모든 페이지를 하나의 tif 파일에 넣습니다.
|
|
// false : 웹 페이지에서 다운로드할 때 모든 페이지를 zip 으로 묶어서 내려줍니다.
|
|
// 지정된 디렉토리에 저장할 때는 페이지별로 별개의 파일로 나누어 저장합니다.
|
|
option.setMultiPage(false);
|
|
|
|
//option.setBlackWhite(true);
|
|
//option.setDpiX(96);
|
|
//option.setDpiY(96);
|
|
//option.setWidth(0);
|
|
//option.setHeight(0);
|
|
//option.setRotate90(false);
|
|
|
|
|
|
option.setName("리포트_@#$@#$");
|
|
|
|
|
|
//아래 주석을 해제하면 파일을 브라우저를 통하여 확인할 수 있다.
|
|
// 단, 브라우저에 문서 뷰어 플러그인이 존재하는 경우 가능.
|
|
//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 호출 실패.
|
|
}
|
|
*/
|
|
|
|
return;
|
|
%> |