このセクションでは、ComponentOne PdfViewerテンプレートを使用して、MVCアプリケーション内にPDFファイルを表示する方法について説明します。ComponentOne PdfViewerテンプレートには、WebブラウザでPDFファイルをプレビューする2つのオプションがあります。現在のプロジェクト内のPDFを使用して、ローカルシステムに保存されているPDFファイルをプレビューするか、他のPDFサービス内のPDFオプションを使用して、WebApiサービスURLにホストされているPDFファイルを表示できます。

| Index.cshtml |
コードのコピー
|
|---|---|
<head>
<title>ComponentOne MVC PdfViewer</title>
<c1-styles />
<c1-scripts>
<c1-flex-viewer-scripts />
</c1-scripts>
</head>
<body>
<c1-pdf-viewer file-path="PDF/Selection.pdf" service-url="http://localhost:4615/PDFWebAPI"></c1-pdf-viewer>
</body>
</html>
|
|