IronPDF 문제 해결 Blazor 서버 / 웹어셈블리(WASM) Blazor Server와 WebAssembly 비교 커티스 차우 업데이트됨:6월 1, 2025 다운로드 IronPDF NuGet 다운로드 DLL 다운로드 윈도우 설치 프로그램 무료 체험 시작하기 LLM용 사본 LLM용 사본 LLM용 마크다운 형식으로 페이지를 복사하세요 ChatGPT에서 열기 ChatGPT에 이 페이지에 대해 문의하세요 제미니에서 열기 제미니에게 이 페이지에 대해 문의하세요 Grok에서 열기 Grok에게 이 페이지에 대해 문의하세요 혼란 속에서 열기 Perplexity에게 이 페이지에 대해 문의하세요 공유하다 페이스북에 공유하기 트위터에 공유하기 LinkedIn에 공유하기 URL 복사 이메일로 기사 보내기 This article was translated from English: Does it need improvement? Translated View the article in English IronPDF는 Blazor Server 및 Blazor WebAssembly(WASM)를 지원합니까? IronPDF는 Blazor Server는 지원하지만 Blazor WebAssembly(WASM)는 지원하지 않습니다. Blazor Server에 PDF를 저장하려면 PDF 문서 스트림을 바이트 배열로 변환한 다음, 이 배열을 JavaScript 함수에 전달하여 다운로드를 수행해야 합니다. 다음은 Blazor Server 애플리케이션에서 PDF 문서를 바이트 배열로 변환한 다음 JavaScript를 사용하여 다운로드를 트리거하는 방법의 예입니다. @page "/pdfdownload" @inject IJSRuntime JSRuntime @* A button to download the PDF *@ <button @onclick="DownloadPDF">Download PDF</button> @code { private async Task DownloadPDF() { // Create a PDF document using IronPDF (this is hypothetical code) var renderer = new IronPdf.HtmlToPdf(); var pdfDocument = renderer.RenderHtmlAsPdf("<h1>Hello, World!</h1>"); // Convert PDF document to a byte array byte[] pdfBytes = pdfDocument.BinaryData; // Call the JavaScript function to download the PDF await JSRuntime.InvokeVoidAsync("downloadFile", pdfBytes, "example.pdf"); } } @page "/pdfdownload" @inject IJSRuntime JSRuntime @* A button to download the PDF *@ <button @onclick="DownloadPDF">Download PDF</button> @code { private async Task DownloadPDF() { // Create a PDF document using IronPDF (this is hypothetical code) var renderer = new IronPdf.HtmlToPdf(); var pdfDocument = renderer.RenderHtmlAsPdf("<h1>Hello, World!</h1>"); // Convert PDF document to a byte array byte[] pdfBytes = pdfDocument.BinaryData; // Call the JavaScript function to download the PDF await JSRuntime.InvokeVoidAsync("downloadFile", pdfBytes, "example.pdf"); } } $vbLabelText $csharpLabel 다음은 PDF 다운로드를 처리하는 JavaScript 함수입니다. _Host.cshtml 또는 index.html 파일에 다음 내용을 반드시 포함시키세요: <script> // Function to download a file from a byte array in JavaScript function downloadFile(fileBytes, fileName) { // Convert byte array to a Blob const blob = new Blob([fileBytes], { type: 'application/pdf' }); // Create a link element for downloading the file const link = document.createElement('a'); link.href = window.URL.createObjectURL(blob); link.download = fileName; // Append the link to the body, trigger it, and remove it afterwards document.body.appendChild(link); // Required for Firefox link.click(); document.body.removeChild(link); } </script> <script> // Function to download a file from a byte array in JavaScript function downloadFile(fileBytes, fileName) { // Convert byte array to a Blob const blob = new Blob([fileBytes], { type: 'application/pdf' }); // Create a link element for downloading the file const link = document.createElement('a'); link.href = window.URL.createObjectURL(blob); link.download = fileName; // Append the link to the body, trigger it, and remove it afterwards document.body.appendChild(link); // Required for Firefox link.click(); document.body.removeChild(link); } </script> JAVASCRIPT 핵심 요점: Blazor Server는 서버 측 작업을 허용하며 C# 코드를 서버에서 직접 실행할 수 있습니다. Blazor WebAssembly는 클라이언트 측에서 실행되며 IronPDF와 같은 서버 측 리소스에 직접 접근할 수 없습니다. 저희 웹사이트에서 Blazor 서버 전체 튜토리얼을 보실 수 있습니다: Blazor 서버 튜토리얼 커티스 차우 지금 바로 엔지니어링 팀과 채팅하세요 기술 문서 작성자 커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다. 커티스는 개발 분야 외에도 사물 인터넷(IoT)에 깊은 관심을 가지고 있으며, 하드웨어와 소프트웨어를 통합하는 혁신적인 방법을 연구합니다. 여가 시간에는 게임을 즐기거나 디스코드 봇을 만들면서 기술에 대한 애정과 창의성을 결합합니다. 시작할 준비 되셨나요? Nuget 다운로드 17,527,568 | 버전: 2026.2 방금 출시되었습니다 NuGet 무료 다운로드 총 다운로드 수: 17,527,568 라이선스 보기