Doconut 업데이트 방법
버전 1.0.5.2 이하에서 최신 버전으로 업데이트하는 단계
.NET 프레임워크 4.7
Web.config 구성
뷰어는 web.config 파일을 통해 HttpHandler가 등록되어야 합니다. IIS 버전에 따라 아래에 정의된 web.config 섹션을 사용하여 설정할 수 있습니다.
IIS 7 이하:
xml
<httpHandlers>
<add verb="GET,POST" path="DocImage.axd" type="Doconut.DocImageHandler, Doconut" />
</httpHandlers>IIS 7 이상:
xml
<handlers>
<add name="DocImage" verb="GET,POST" path="DocImage.axd" type="Doconut.DocImageHandler, Doconut" />
</handlers>ASPX 페이지에서 등록 업데이트
ASPX 페이지에서 어셈블리 등록을 변경하십시오.
이전:
aspx
<%@ Register Assembly="DocumentViewer" Namespace="DotnetDaddy.DocumentViewer" TagPrefix="asp" %>새로운:
aspx
<%@ Register Assembly="Doconut" Namespace="Doconut" TagPrefix="asp" %>컨트롤 태그 업데이트
컨트롤 태그를 DocViewer에서 Viewer로 업데이트하십시오.
이전:
aspx
<asp:DocViewer ID="ctlDoc" runat="server"/>새로운:
aspx
<asp:Viewer ID="ctlDoc" runat="server"/>네임스페이스 업데이트
Doconut 24.3.0에서 네임스페이스 이름이 변경되었습니다. 새로운 DLL을 추가하십시오: Doconut.dll, Doconut.Formats.dll, Doconut.Configs.dll, Doconut.Clouds.dll.
새로운 Using:
csharp
using Doconut;
using Doconut.Configs;
using Doconut.Clouds;초기화:
csharp
var viewer = new Viewer();패키지 종속성
- 패키지: Newtonsoft.Json 13.0.3
- 패키지: System.Text.Encoding.CodePages 6.0.0
- 패키지: System.Text.Json 6.0.0
.NET 표준 / 코어
네임스페이스 업데이트
Doconut 24.3.0에서 네임스페이스 이름이 변경되었습니다. 새로운 DLL을 추가하십시오: Doconut.dll, Doconut.Formats.dll, Doconut.Configs.dll, Doconut.Clouds.dll.
새로운 Using:
csharp
using Doconut;
using Doconut.Configs;
using Doconut.Clouds;초기화:
csharp
using System;
// Viewer 인스턴스는 이제 팩토리, DI 컨테이너 또는 기타 제공자를 통해 얻습니다.
// GetViewer의 구현을 실제 획득 로직으로 교체하십시오.
Viewer GetViewer() => throw new NotImplementedException();
var viewer = GetViewer(); // Viewer 인스턴스를 얻습니다패키지 종속성
- 패키지: Microsoft.Extensions.Caching.Abstractions 3.1.10
- 패키지: SkiaSharp 2.88.6
- 패키지: Newtonsoft.Json 13.0.3
- 패키지: System.Drawing.Common 6.0.0
- 패키지: System.Text.Json 6.0.0
- 패키지: System.Text.Encoding.CodePages 7.0.0
.NET 6 이상
네임스페이스 업데이트
Doconut 24.3.0에서 네임스페이스 이름이 변경되었습니다. 새로운 DLL을 추가하십시오: Doconut.dll, Doconut.Formats.dll, Doconut.Configs.dll, Doconut.Clouds.dll.
새로운 Using:
csharp
// 현재 .NET 6 통합: Viewer는 DI에서 제공되며 문서 열기가 비동기식입니다.
var token = await viewer.OpenDocumentAsync(path, new PdfConfig { AllowSearch = true });초기화:
csharp
app.MapPost("/api/open", async (Viewer viewer) =>
{
// 토큰은 불투명합니다 — 위젯에 전달하고, 절대 로그에 기록하거나 영구 저장하지 마십시오.
string token = await viewer.OpenDocumentAsync("wwwroot/files/Sample.pdf");
return Results.Ok(new { token });
});패키지 종속성
- 패키지: Microsoft.Extensions.Caching.Abstractions 3.1.10
- 패키지: Newtonsoft.Json 13.0.3
- 패키지: SkiaSharp 2.88.6
- 패키지: System.Drawing.Common 7.0.0
- 패키지: System.Text.Encoding.CodePages 7.0.0
이 페이지가 도움이 되었나요?