C# 기반 AI PDF 처리: IronPDF를 사용하여 문서 요약, 추출 및 분석

This article was translated from English: Does it need improvement?
Translated
View the article in English

IronPDF를 사용한 C# 기반 AI PDF 처리는 .NET 개발자가 기존 PDF 워크플로 위에 직접 문서를 요약하고 , 구조화된 데이터를 추출하고 , 질문 답변 시스템을 구축할 수 있도록 지원합니다. 이 기능은 Microsoft Semantic Kernel을 기반으로 구축된 IronPdf.Extensions.AI 패키지를 사용하여 Azure OpenAIOpenAI 모델과 원활하게 연결됩니다. 법률 자료 검색 도구 , 금융 분석 파이프라인 또는 문서 인텔리전스 플랫폼을 구축하든 IronPDF는 PDF 추출 및 컨텍스트 준비를 처리하므로 AI 로직에 집중할 수 있습니다.

요약: 빠른 시작 가이드

이 튜토리얼에서는 C# .NET을 사용하여 IronPDF를 AI 서비스에 연결하여 문서 요약, 데이터 추출 및 지능형 쿼리를 수행하는 방법을 다룹니다.

  • 이 솔루션은 법률 정보 검색 시스템, 금융 분석 도구, 규정 준수 검토 플랫폼 또는 대량의 PDF 문서에서 의미를 추출해야 하는 모든 애플리케이션과 같은 문서 인텔리전스 애플리케이션을 개발하는 .NET 개발자를 위한 것입니다 .
  • 개발하게 될 기능: 단일 문서 요약, 사용자 지정 스키마를 사용한 구조화된 JSON 데이터 추출, 문서 콘텐츠 기반 질의응답, 장문 문서용 RAG 파이프라인, 문서 라이브러리 전반에 걸친 배치 AI 처리 워크플로.
  • 실행 환경: Azure OpenAI 또는 OpenAI API 키가 있는 모든 .NET 6 이상 환경. AI 확장 기능은 Microsoft Semantic Kernel과 통합되어 컨텍스트 창 관리, 청킹 및 오케스트레이션을 자동으로 처리합니다.
  • 이 접근 방식을 사용해야 하는 경우: 애플리케이션에서 텍스트 추출을 넘어 PDF를 처리해야 하는 경우(예: 계약 의무 이해, 연구 논문 요약, 재무 표를 구조화된 데이터로 추출, 문서 내용에 대한 사용자 질문에 대규모로 답변)에 사용합니다.
  • 기술적으로 중요한 이유: 원시 텍스트 추출은 문서 구조를 손실합니다. 표가 무너지고, 다단 레이아웃이 깨지며, 의미 관계가 사라집니다. IronPDF는 문서 구조를 보존하고 토큰 제한을 관리하여 AI가 처리할 수 있도록 문서를 준비하므로, 모델은 깔끔하고 잘 정리된 입력을 받게 됩니다.

단 몇 줄의 코드로 PDF 내용을 요약하세요:

Nuget Icon지금 바로 NuGet을 사용하여 PDF 만들기를 시작하세요.

  1. NuGet 패키지 관리자를 사용하여 IronPDF를 설치하세요.

    PM > Install-Package IronPdf

  2. 다음 코드 조각을 복사하여 실행하세요.

    await IronPdf.AI.PdfAIEngine.Summarize("contract.pdf", "summary.txt", azureEndpoint, azureApiKey);
  3. 실제 운영 환경에서 테스트할 수 있도록 배포하세요.

    지금 바로 무료 체험판을 통해 프로젝트에서 IronPDF를 사용해 보세요.
    arrow pointer

IronPDF를 구매하거나 30일 무료 체험판에 가입한 후, 애플리케이션 시작 부분에 라이선스 키를 입력하세요.

IronPdf.License.LicenseKey = "KEY";
IronPdf.License.LicenseKey = "KEY";
$vbLabelText   $csharpLabel

!{--010011000100100101000010010100100100000101010010010110010101111101001110010101010001110100010101010100010111110100100101001110010100110101010001000001010011000100110001001100010111110100001001001100010011110100001101001011--}

목차

AI와 PDF의 기회

PDF가 가장 활용되지 않은 데이터 소스인 이유는 무엇일까요?

PDF는 현대 기업에서 구조화된 비즈니스 지식을 저장하는 가장 큰 저장소 중 하나입니다. 계약서, 재무제표, 규정 준수 보고서, 법률 서류, 연구 논문과 같은 전문 문서는 대부분 PDF 형식으로 저장됩니다. 이 문서에는 계약 조건(의무 및 책임 명시), 재무 지표(투자 결정에 영향을 미치는 요소), 규제 요건(규정 준수 보장), 연구 결과(전략 수립 지침) 등 중요한 비즈니스 정보가 담겨 있습니다.

하지만 기존의 PDF 처리 방식에는 심각한 한계가 있었습니다. 기본적인 텍스트 추출 도구는 페이지에서 원시 문자를 추출할 수 있지만 중요한 맥락을 잃어버립니다. 표 구조는 뒤죽박죽된 텍스트로 변하고, 다단 레이아웃은 의미를 알 수 없게 되며, 섹션 간의 의미적 관계가 사라집니다.

이번 혁신의 핵심은 인공지능이 맥락과 구조를 이해하는 능력에 있습니다. 현대의 법학 석사(LLM)는 단순히 단어만 보는 것이 아니라 문서의 구성 방식을 이해하고, 계약 조항이나 재무표와 같은 패턴을 인식하며, 복잡한 레이아웃에서도 의미를 추출할 수 있습니다. GPT-5의 실시간 라우터를 갖춘 통합 추론 시스템과 Claude Sonnet 4.5의 향상된 에이전트 기능은 이전 모델에 비해 오류 발생률이 크게 감소하여 전문적인 문서 분석에 신뢰할 수 있는 성능을 제공합니다.

법학 석사(LLM)는 문서 구조를 어떻게 이해하는가?

대규모 언어 모델은 PDF 분석에 정교한 자연어 처리 기능을 제공합니다. GPT-5의 하이브리드 아키텍처는 여러 하위 모델(메인, 미니, 사고, 나노)과 작업 복잡성에 따라 최적의 변형을 동적으로 선택하는 실시간 라우터를 특징으로 합니다. 간단한 질문은 더 빠른 모델로 연결되고, 복잡한 추론 작업에는 전체 모델이 사용됩니다.

Claude Opus 4.6은 특히 장시간 실행되는 에이전트 작업에 탁월하며, 분할된 작업에 대해 에이전트 팀이 직접 협력하고 100만 토큰 규모의 컨텍스트 창을 통해 문서 라이브러리 전체를 분할 없이 처리할 수 있습니다.

AI 모델이 PDF 문서 구조를 분석하고 요소를 식별하는 방법

이러한 맥락적 이해를 통해 LLM은 진정한 이해를 필요로 하는 작업을 수행할 수 있습니다. 법학 석사(LLM)는 계약을 분석할 때 "해지"라는 단어가 포함된 조항을 식별할 뿐만 아니라 해지가 허용되는 구체적인 조건, 관련 통지 요건 및 그로 인해 발생하는 책임까지 이해할 수 있습니다. 이러한 기능을 가능하게 하는 기술적 기반은 최신 LLM(로지스틱 회귀 모델)에 사용되는 트랜스포머 아키텍처이며, GPT-5의 컨텍스트 창은 최대 272,000개의 입력 토큰을 지원하고 Claude Sonnet 4.5는 200,000개의 토큰 창을 통해 포괄적인 문서 처리 범위를 제공합니다.

IronPDF의 내장 AI 통합 기능

IronPDF 및 AI 확장 프로그램 설치

AI 기반 PDF 처리를 시작하려면 핵심 IronPDF 라이브러리, AI 확장 패키지 및 Microsoft Semantic Kernel 종속성이 필요합니다.

NuGet 패키지 관리자를 사용하여 IronPDF를 설치하세요.

PM > Install-Package IronPdf
PM > Install-Package IronPdf.Extensions.AI
PM > Install-Package Microsoft.SemanticKernel
PM > Install-Package Microsoft.SemanticKernel.Plugins.Memory
PM > Install-Package IronPdf
PM > Install-Package IronPdf.Extensions.AI
PM > Install-Package Microsoft.SemanticKernel
PM > Install-Package Microsoft.SemanticKernel.Plugins.Memory
SHELL

이 패키지들은 함께 작동하여 완벽한 솔루션을 제공합니다. IronPDF는 텍스트 추출, 페이지 렌더링, 형식 변환 등 모든 PDF 관련 작업을 처리하며, AI 확장 기능은 Microsoft Semantic Kernel을 통해 언어 모델과의 통합을 관리합니다.

참고해 주세요시맨틱 커널 패키지에는 실험적인 API가 포함되어 있습니다. 컴파일 경고를 억제하려면 .csproj 파일의 PropertyGroup에 <NoWarn>$(NoWarn);SKEXP0001;SKEXP0010;SKEXP0050</NoWarn>를 추가하세요.

OpenAI/Azure API 키 구성하기

AI 기능을 활용하기 전에 AI 서비스 제공업체에 대한 액세스 권한을 구성해야 합니다. IronPDF의 AI 확장 프로그램은 OpenAI와 Azure OpenAI를 모두 지원합니다. Azure OpenAI는 향상된 보안 기능, 규정 준수 인증, 특정 지리적 지역 내에 데이터를 보관할 수 있는 기능 등을 제공하기 때문에 기업 애플리케이션에 자주 사용됩니다.

Azure OpenAI를 구성하려면 Azure 포털에서 채팅 및 임베딩 모델 모두에 대한 Azure 엔드포인트 URL, API 키 및 배포 이름이 필요합니다.

AI 엔진 초기화

IronPDF의 AI 확장 프로그램은 내부적으로 Microsoft Semantic Kernel을 사용합니다. AI 기능을 사용하기 전에 Azure OpenAI 자격 증명으로 커널을 초기화하고 문서 처리를 위한 메모리 저장소를 구성해야 합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/configure-azure-credentials.cs
using IronPdf;
using IronPdf.AI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.OpenAI;

// Initialize IronPDF AI with Azure OpenAI credentials

// Azure OpenAI configuration
string azureEndpoint = "https://your-resource.openai.azure.com/";
string apiKey = "your-azure-api-key";
string chatDeployment = "gpt-4o";
string embeddingDeployment = "text-embedding-ada-002";

// Initialize Semantic Kernel with Azure OpenAI
var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .AddAzureOpenAIChatCompletion(chatDeployment, azureEndpoint, apiKey)
    .Build();

// Create memory store for document embeddings
var memory = new MemoryBuilder()
    .WithMemoryStore(new VolatileMemoryStore())
    .WithAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .Build();

// Initialize IronPDF AI
IronDocumentAI.Initialize(kernel, memory);

Console.WriteLine("IronPDF AI initialized successfully with Azure OpenAI");
$vbLabelText   $csharpLabel

초기화 과정에서 두 가지 핵심 구성 요소가 생성됩니다.

  • 커널: Azure OpenAI를 통해 채팅 자동 완성 및 텍스트 임베딩 생성을 처리합니다.
  • 메모리: 의미 검색 및 검색 작업을 위한 문서 임베딩을 저장합니다.

IronDocumentAI.Initialize()로 초기화하면 애플리케이션 전체에서 AI 기능을 사용할 수 있습니다. 실제 운영 환경에서는 자격 증명을 환경 변수 또는 Azure Key Vault에 저장하는 것이 강력히 권장됩니다.

IronPDF는 AI 컨텍스트에 맞게 PDF를 어떻게 준비할까요?

AI 기반 PDF 처리에서 가장 어려운 측면 중 하나는 언어 모델이 이해할 수 있도록 문서를 준비하는 것입니다. GPT-5는 최대 272,000개의 입력 토큰을 지원하고 Claude Opus 4.6은 이제 100만 개의 토큰 컨텍스트 창을 제공하지만, 단일 법률 계약이나 재무 보고서만으로도 이전 모델의 한계를 쉽게 초과할 수 있습니다.

IronPDF의 AI 확장 프로그램은 지능형 문서 준비를 통해 이러한 복잡성을 처리합니다. AI 메서드를 호출하면 IronPDF는 먼저 단락 식별, 표 구조 유지, 섹션 간 관계 유지 등 구조적 정보를 보존하면서 PDF에서 텍스트를 추출합니다.

문맥 제한을 초과하는 문서의 경우, IronPDF는 섹션 제목, 페이지 나누기 또는 단락 경계와 같은 문서 구조의 자연스러운 구분점인 의미론적 분기점에서 전략적으로 문서를 분할합니다.


문서 요약

단일 문서 요약

문서 요약은 긴 문서를 이해하기 쉬운 핵심 내용으로 압축하여 즉각적인 가치를 제공합니다. Summarize 메서드는 텍스트 추출, AI 처리 준비, 언어 모델에 요약 요청, 결과 저장 등 전체 워크플로를 처리합니다.

입력


이 코드는 PdfDocument.FromFile()를 사용하여 PDF를 로드하고 pdf.Summarize()를 호출하여 간결한 요약을 생성한 다음 결과를 텍스트 파일에 저장합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/single-document-summary.cs
using IronPdf;
using IronPdf.AI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.OpenAI;

// Summarize a PDF document using IronPDF AI

// Azure OpenAI configuration
string azureEndpoint = "https://your-resource.openai.azure.com/";
string apiKey = "your-azure-api-key";
string chatDeployment = "gpt-4o";
string embeddingDeployment = "text-embedding-ada-002";

// Initialize Semantic Kernel
var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .AddAzureOpenAIChatCompletion(chatDeployment, azureEndpoint, apiKey)
    .Build();

var memory = new MemoryBuilder()
    .WithMemoryStore(new VolatileMemoryStore())
    .WithAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .Build();

IronDocumentAI.Initialize(kernel, memory);

// Load and summarize PDF
var pdf = PdfDocument.FromFile("sample-report.pdf");
string summary = await pdf.Summarize();

Console.WriteLine("Document Summary:");
Console.WriteLine(summary);

File.WriteAllText("report-summary.txt", summary);
Console.WriteLine("\nSummary saved to report-summary.txt");
$vbLabelText   $csharpLabel


콘솔 출력

C#에서 PDF 문서 요약 결과를 보여주는 콘솔 출력

요약 과정은 정교한 프롬프트를 사용하여 고품질 결과를 보장합니다. 2026년 버전의 GPT-5와 Claude Sonnet 4.5는 모두 지시어 따라쓰기 기능이 크게 향상되어 요약 내용이 핵심 정보를 간결하고 읽기 쉽게 유지되도록 합니다.

문서 요약 기법 및 고급 옵션에 대한 자세한 설명은 사용 설명서를 참조하십시오.

다중 문서 합성

실제 상황에서는 여러 문서에 걸쳐 있는 정보를 종합해야 하는 경우가 많습니다. 법무팀은 여러 계약서 전체에서 공통 조항을 파악해야 할 수도 있고, 재무 분석가는 분기별 보고서의 지표를 비교하고 싶어할 수도 있습니다.

다중 문서 종합 접근 방식은 각 문서를 개별적으로 처리하여 핵심 정보를 추출한 다음, 이러한 통찰력을 종합하여 최종 종합 결과를 도출하는 것입니다.

이 예제는 여러 PDF를 순회하면서 각 PDF에 대해 pdf.Summarize()를 호출한 다음, 결합된 요약과 함께 pdf.Query()를 사용하여 통합된 종합 결과를 생성합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/multi-document-synthesis.cs
using IronPdf;
using IronPdf.AI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.OpenAI;

// Synthesize insights across multiple related documents (e.g., quarterly reports into annual summary)

// Azure OpenAI configuration
string azureEndpoint = "https://your-resource.openai.azure.com/";
string apiKey = "your-azure-api-key";
string chatDeployment = "gpt-4o";
string embeddingDeployment = "text-embedding-ada-002";

// Initialize Semantic Kernel
var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .AddAzureOpenAIChatCompletion(chatDeployment, azureEndpoint, apiKey)
    .Build();

var memory = new MemoryBuilder()
    .WithMemoryStore(new VolatileMemoryStore())
    .WithAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .Build();

IronDocumentAI.Initialize(kernel, memory);

// Define documents to synthesize
string[] documentPaths = {
    "Q1-report.pdf",
    "Q2-report.pdf",
    "Q3-report.pdf",
    "Q4-report.pdf"
};

var documentSummaries = new List<string>();

// Summarize each document
foreach (string path in documentPaths)
{
    var pdf = PdfDocument.FromFile(path);
    string summary = await pdf.Summarize();
    documentSummaries.Add($"=== {Path.GetFileName(path)} ===\n{summary}");
    Console.WriteLine($"Processed: {path}");
}

// Combine and synthesize across all documents
string combinedSummaries = string.Join("\n\n", documentSummaries);

var synthesisDoc = PdfDocument.FromFile(documentPaths[0]);

string synthesisQuery = @"Based on the quarterly summaries below, provide an annual synthesis:
ll trends across quarters
chievements and challenges
over-year patterns

s:
inedSummaries;

string synthesis = await synthesisDoc.Query(synthesisQuery);

Console.WriteLine("\n=== Annual Synthesis ===");
Console.WriteLine(synthesis);

File.WriteAllText("annual-synthesis.txt", synthesis);
$vbLabelText   $csharpLabel

이 패턴은 대규모 문서 세트에도 효과적으로 적용됩니다. 문서를 병렬로 처리하고 중간 결과를 관리함으로써 수백 또는 수천 개의 문서를 분석하고 일관성 있는 종합 결과를 유지할 수 있습니다.

요약 보고서 생성

경영진 요약은 일반적인 요약과는 다른 접근 방식이 필요합니다. 단순히 내용을 압축하는 것이 아니라, 경영진 요약 보고서는 가장 중요한 비즈니스 정보를 파악하고, 핵심 결정이나 권고사항을 강조하며, 경영진이 검토하기에 적합한 형식으로 결과를 제시해야 합니다.

해당 코드는 pdf.Query()를 사용하며, 주요 결정 사항, 핵심 결과, 재정적 영향 및 위험 평가를 비즈니스 용어로 요청하는 구조화된 프롬프트를 포함합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/executive-summary.cs
using IronPdf;
using IronPdf.AI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.OpenAI;

// Generate executive summary from strategic documents for C-suite leadership

// Azure OpenAI configuration
string azureEndpoint = "https://your-resource.openai.azure.com/";
string apiKey = "your-azure-api-key";
string chatDeployment = "gpt-4o";
string embeddingDeployment = "text-embedding-ada-002";

// Initialize Semantic Kernel
var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .AddAzureOpenAIChatCompletion(chatDeployment, azureEndpoint, apiKey)
    .Build();

var memory = new MemoryBuilder()
    .WithMemoryStore(new VolatileMemoryStore())
    .WithAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .Build();

IronDocumentAI.Initialize(kernel, memory);

var pdf = PdfDocument.FromFile("strategic-plan.pdf");

string executiveQuery = @"Create an executive summary for C-suite leadership. Include:

cisions Required:**
ny decisions needing executive approval

al Findings:**
5 most important findings (bullet points)

ial Impact:**
e/cost implications if mentioned

ssessment:**
riority risks identified

ended Actions:**
ate next steps

er 500 words. Use business language appropriate for board presentation.";

string executiveSummary = await pdf.Query(executiveQuery);

File.WriteAllText("executive-summary.txt", executiveSummary);
Console.WriteLine("Executive summary saved to executive-summary.txt");
$vbLabelText   $csharpLabel

그 결과로 나온 요약 보고서는 포괄적인 내용보다는 실행 가능한 정보를 우선시하여, 과도한 세부 정보 없이 의사 결정권자에게 필요한 정보만을 정확하게 제공합니다.


지능형 데이터 추출

구조화된 데이터를 JSON으로 추출

AI 기반 PDF 처리의 가장 강력한 응용 분야 중 하나는 비정형 문서에서 정형 데이터를 추출하는 것입니다. 2026년에 성공적인 구조적 추출을 위한 핵심은 구조화된 출력 모드를 갖춘 JSON 스키마를 사용하는 것입니다. GPT-5는 향상된 구조화된 출력을 제공하며, Claude Sonnet 4.5는 안정적인 데이터 추출을 위한 향상된 도구 통합 기능을 제공합니다.

입력


해당 코드는 JSON 스키마 프롬프트와 함께 pdf.Query()를 호출한 다음, 추출된 송장 데이터를 구문 분석하고 유효성을 검사하기 위해 JsonSerializer.Deserialize()를 사용합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/extract-invoice-json.cs
using IronPdf;
using IronPdf.AI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using System.Text.Json;

// Extract structured invoice data as JSON from PDF

// Azure OpenAI configuration
string azureEndpoint = "https://your-resource.openai.azure.com/";
string apiKey = "your-azure-api-key";
string chatDeployment = "gpt-4o";
string embeddingDeployment = "text-embedding-ada-002";

// Initialize Semantic Kernel
var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .AddAzureOpenAIChatCompletion(chatDeployment, azureEndpoint, apiKey)
    .Build();

var memory = new MemoryBuilder()
    .WithMemoryStore(new VolatileMemoryStore())
    .WithAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .Build();

IronDocumentAI.Initialize(kernel, memory);

var pdf = PdfDocument.FromFile("sample-invoice.pdf");

// Define JSON schema for extraction
string extractionQuery = @"Extract invoice data and return as JSON with this exact structure:

voiceNumber"": ""string"",
voiceDate"": ""YYYY-MM-DD"",
eDate"": ""YYYY-MM-DD"",
ndor"": {
""name"": ""string"",
""address"": ""string"",
""taxId"": ""string or null""

stomer"": {
""name"": ""string"",
""address"": ""string""

neItems"": [
{
    ""description"": ""string"",
    ""quantity"": number,
    ""unitPrice"": number,
    ""total"": number
}

btotal"": number,
xRate"": number,
xAmount"": number,
tal"": number,
rrency"": ""string""


NLY valid JSON, no additional text.";

string jsonResponse = await pdf.Query(extractionQuery);

// Parse and save JSON
try
{
    var invoiceData = JsonSerializer.Deserialize<JsonElement>(jsonResponse);
    string formattedJson = JsonSerializer.Serialize(invoiceData, new JsonSerializerOptions { WriteIndented = true });

    Console.WriteLine("Extracted Invoice Data:");
    Console.WriteLine(formattedJson);

    File.WriteAllText("invoice-data.json", formattedJson);
}
catch (JsonException)
{
    Console.WriteLine("Unable to parse JSON response");
    File.WriteAllText("invoice-raw-response.txt", jsonResponse);
}
$vbLabelText   $csharpLabel


생성된 JSON 파일의 부분 스크린샷

PDF에서 구조화된 JSON 형식으로 추출한 송장 데이터

2026년의 최신 AI 모델은 제공된 스키마를 준수하는 유효한 JSON 응답을 보장하는 구조화된 출력 모드를 지원합니다. 이로써 잘못된 응답에 대한 복잡한 오류 처리가 필요 없어집니다.

계약 조항 식별

법률 계약에는 계약 해지 조항, 책임 제한 조항, 면책 요건, 지적 재산권 양도 조항, 기밀 유지 의무 조항 등 특별히 중요한 특정 유형의 조항이 포함되어 있습니다. AI 기반 절 식별 기능은 높은 정확도를 유지하면서 이러한 분석을 자동화합니다.

이 예제에서는 조항 중심의 JSON 스키마를 사용하여 계약 유형, 당사자, 중요 날짜 및 위험 수준이 포함된 개별 조항을 추출합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/contract-clause-analysis.cs
using IronPdf;
using IronPdf.AI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using System.Text.Json;

// Analyze contract clauses and identify key terms, risks, and critical dates

// Azure OpenAI configuration
string azureEndpoint = "https://your-resource.openai.azure.com/";
string apiKey = "your-azure-api-key";
string chatDeployment = "gpt-4o";
string embeddingDeployment = "text-embedding-ada-002";

// Initialize Semantic Kernel
var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .AddAzureOpenAIChatCompletion(chatDeployment, azureEndpoint, apiKey)
    .Build();

var memory = new MemoryBuilder()
    .WithMemoryStore(new VolatileMemoryStore())
    .WithAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .Build();

IronDocumentAI.Initialize(kernel, memory);

var pdf = PdfDocument.FromFile("contract.pdf");

// Define JSON schema for contract analysis
string clauseQuery = @"Analyze this contract and identify key clauses. Return JSON:

ntractType"": ""string"",
rties"": [""string""],
fectiveDate"": ""string"",
auses"": [
{
    ""type"": ""Termination|Liability|Indemnification|Confidentiality|IP|Payment|Warranty|Other"",
    ""title"": ""string"",
    ""summary"": ""string"",
    ""riskLevel"": ""Low|Medium|High"",
    ""keyTerms"": [""string""]
}

iticalDates"": [
{
    ""description"": ""string"",
    ""date"": ""string""
}

erallRiskAssessment"": ""Low|Medium|High"",
commendations"": [""string""]


: termination rights, liability caps, indemnification, IP ownership, confidentiality, payment terms.
NLY valid JSON.";

string analysisJson = await pdf.Query(clauseQuery);

try
{
    var analysis = JsonSerializer.Deserialize<JsonElement>(analysisJson);
    string formatted = JsonSerializer.Serialize(analysis, new JsonSerializerOptions { WriteIndented = true });

    Console.WriteLine("Contract Clause Analysis:");
    Console.WriteLine(formatted);

    File.WriteAllText("contract-analysis.json", formatted);

    // Display high-risk clauses
    Console.WriteLine("\n=== High Risk Clauses ===");
    foreach (var clause in analysis.GetProperty("clauses").EnumerateArray())
    {
        if (clause.GetProperty("riskLevel").GetString() == "High")
        {
            Console.WriteLine($"- {clause.GetProperty("type")}: {clause.GetProperty("summary")}");
        }
    }
}
catch (JsonException)
{
    Console.WriteLine("Unable to parse contract analysis");
    File.WriteAllText("contract-analysis-raw.txt", analysisJson);
}
$vbLabelText   $csharpLabel

이 기능은 계약 검토를 순차적이고 수동적인 프로세스에서 자동화되고 확장 가능한 워크플로로 전환합니다. 법무팀은 수백 건의 계약서 전반에 걸쳐 위험도가 높은 조항을 신속하게 파악할 수 있습니다.

금융 데이터 분석

재무 문서는 복잡한 서술과 표 속에 중요한 정량적 데이터를 담고 있습니다. AI 기반 구문 분석은 문맥을 이해하기 때문에 재무 문서 분석에 탁월합니다. 즉, 과거 실적과 미래 예측을 구분하고, 숫자가 천 단위인지 백만 단위인지 식별하며, 다양한 지표 간의 관계를 파악합니다.

이 코드는 재무 JSON 스키마를 사용하여 손익계산서 데이터, 대차대조표 지표 및 향후 전망을 구조화된 출력으로 추출합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/financial-data-extraction.cs
using IronPdf;
using IronPdf.AI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using System.Text.Json;

// Extract financial metrics from annual reports and earnings documents

// Azure OpenAI configuration
string azureEndpoint = "https://your-resource.openai.azure.com/";
string apiKey = "your-azure-api-key";
string chatDeployment = "gpt-4o";
string embeddingDeployment = "text-embedding-ada-002";

// Initialize Semantic Kernel
var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .AddAzureOpenAIChatCompletion(chatDeployment, azureEndpoint, apiKey)
    .Build();

var memory = new MemoryBuilder()
    .WithMemoryStore(new VolatileMemoryStore())
    .WithAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .Build();

IronDocumentAI.Initialize(kernel, memory);

var pdf = PdfDocument.FromFile("annual-report.pdf");

// Define JSON schema for financial extraction (numbers in millions)
string financialQuery = @"Extract financial metrics from this document. Return JSON:

portPeriod"": ""string"",
mpany"": ""string"",
rrency"": ""string"",
comeStatement"": {
""revenue"": number,
""costOfRevenue"": number,
""grossProfit"": number,
""operatingExpenses"": number,
""operatingIncome"": number,
""netIncome"": number,
""eps"": number

lanceSheet"": {
""totalAssets"": number,
""totalLiabilities"": number,
""shareholdersEquity"": number,
""cash"": number,
""totalDebt"": number

yMetrics"": {
""revenueGrowthYoY"": ""string"",
""grossMargin"": ""string"",
""operatingMargin"": ""string"",
""netMargin"": ""string"",
""debtToEquity"": number

idance"": {
""nextQuarterRevenue"": ""string"",
""fullYearRevenue"": ""string"",
""notes"": ""string""



 for unavailable data. Numbers in millions unless stated.
NLY valid JSON.";

string financialJson = await pdf.Query(financialQuery);

try
{
    var financials = JsonSerializer.Deserialize<JsonElement>(financialJson);
    string formatted = JsonSerializer.Serialize(financials, new JsonSerializerOptions { WriteIndented = true });

    Console.WriteLine("Extracted Financial Data:");
    Console.WriteLine(formatted);

    File.WriteAllText("financial-data.json", formatted);
}
catch (JsonException)
{
    Console.WriteLine("Unable to parse financial data");
    File.WriteAllText("financial-raw.txt", financialJson);
}
$vbLabelText   $csharpLabel

추출된 구조화된 데이터는 재무 모델, 시계열 데이터베이스 또는 분석 플랫폼에 직접 입력되어 보고 기간 전반에 걸쳐 지표를 자동으로 추적할 수 있습니다.

사용자 지정 추출 프롬프트

많은 조직은 특정 도메인, 문서 형식 또는 비즈니스 프로세스에 따라 고유한 추출 요구 사항을 가지고 있습니다. IronPDF의 AI 통합 기능은 사용자 지정 추출 프롬프트를 완벽하게 지원하므로 추출해야 할 정보와 그 구조를 정확하게 정의할 수 있습니다.

이 예시는 연구 중심 스키마를 사용하여 학술 논문에서 방법론, 주요 결과(신뢰도 수준 포함) 및 한계를 추출하는 방법을 보여줍니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/custom-research-extraction.cs
using IronPdf;
using IronPdf.AI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using System.Text.Json;

// Extract structured research metadata from academic papers

// Azure OpenAI configuration
string azureEndpoint = "https://your-resource.openai.azure.com/";
string apiKey = "your-azure-api-key";
string chatDeployment = "gpt-4o";
string embeddingDeployment = "text-embedding-ada-002";

// Initialize Semantic Kernel
var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .AddAzureOpenAIChatCompletion(chatDeployment, azureEndpoint, apiKey)
    .Build();

var memory = new MemoryBuilder()
    .WithMemoryStore(new VolatileMemoryStore())
    .WithAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .Build();

IronDocumentAI.Initialize(kernel, memory);

var pdf = PdfDocument.FromFile("research-paper.pdf");

// Define JSON schema for research paper extraction
string researchQuery = @"Extract structured information from this research paper. Return JSON:

tle"": ""string"",
thors"": [""string""],
stitution"": ""string"",
blicationDate"": ""string"",
stract"": ""string"",
searchQuestion"": ""string"",
thodology"": {
""type"": ""Quantitative|Qualitative|Mixed Methods"",
""approach"": ""string"",
""sampleSize"": ""string"",
""dataCollection"": ""string""

yFindings"": [
{
    ""finding"": ""string"",
    ""significance"": ""string"",
    ""confidence"": ""High|Medium|Low""
}

mitations"": [""string""],
tureWork"": [""string""],
ywords"": [""string""]


 extracting verifiable claims and noting uncertainty.
NLY valid JSON.";

string extractionResult = await pdf.Query(researchQuery);

try
{
    var research = JsonSerializer.Deserialize<JsonElement>(extractionResult);
    string formatted = JsonSerializer.Serialize(research, new JsonSerializerOptions { WriteIndented = true });

    Console.WriteLine("Research Paper Extraction:");
    Console.WriteLine(formatted);

    File.WriteAllText("research-extraction.json", formatted);

    // Display key findings with confidence levels
    Console.WriteLine("\n=== Key Findings ===");
    foreach (var finding in research.GetProperty("keyFindings").EnumerateArray())
    {
        string confidence = finding.GetProperty("confidence").GetString() ?? "Unknown";
        Console.WriteLine($"[{confidence}] {finding.GetProperty("finding")}");
    }
}
catch (JsonException)
{
    Console.WriteLine("Unable to parse research extraction");
    File.WriteAllText("research-raw.txt", extractionResult);
}
$vbLabelText   $csharpLabel

맞춤형 프롬프트를 통해 AI 기반 데이터 추출 기능을 일반적인 도구에서 사용자의 특정 요구 사항에 맞춘 전문 솔루션으로 전환할 수 있습니다.


문서를 통한 질의응답

PDF 질의응답 시스템 구축하기

질문 답변 시스템을 통해 사용자는 PDF 문서와 대화형으로 상호 작용할 수 있으며, 자연어로 질문하고 정확하고 맥락에 맞는 답변을 받을 수 있습니다. 기본 패턴은 PDF에서 텍스트를 추출하고, 이를 사용자의 질문과 결합하여 프롬프트를 생성한 다음, AI에게 답변을 요청하는 것입니다.

입력


이 코드는 pdf.Memorize()를 호출하여 문서의 의미 검색을 위한 색인을 생성한 다음, pdf.Query()를 사용하여 대화형 루프에 들어가 사용자 질문에 답변합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/pdf-question-answering.cs
using IronPdf;
using IronPdf.AI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.OpenAI;

// Interactive Q&A system for querying PDF documents

// Azure OpenAI configuration
string azureEndpoint = "https://your-resource.openai.azure.com/";
string apiKey = "your-azure-api-key";
string chatDeployment = "gpt-4o";
string embeddingDeployment = "text-embedding-ada-002";

// Initialize Semantic Kernel
var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .AddAzureOpenAIChatCompletion(chatDeployment, azureEndpoint, apiKey)
    .Build();

var memory = new MemoryBuilder()
    .WithMemoryStore(new VolatileMemoryStore())
    .WithAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .Build();

IronDocumentAI.Initialize(kernel, memory);

var pdf = PdfDocument.FromFile("sample-legal-document.pdf");

// Memorize document to enable persistent querying
await pdf.Memorize();

Console.WriteLine("PDF Q&A System - Type 'exit' to quit\n");
Console.WriteLine($"Document loaded and memorized: {pdf.PageCount} pages\n");

// Interactive Q&A loop
while (true)
{
    Console.Write("Your question: ");
    string? question = Console.ReadLine();

    if (string.IsNullOrWhiteSpace(question) || question.ToLower() == "exit")
        break;

    string answer = await pdf.Query(question);

    Console.WriteLine($"\nAnswer: {answer}\n");
    Console.WriteLine(new string('-', 50) + "\n");
}

Console.WriteLine("Q&A session ended.");
$vbLabelText   $csharpLabel


콘솔 출력

C#으로 구현한 PDF 질문 답변 시스템 콘솔 출력

2026년 효과적인 질의응답의 핵심은 인공지능이 오직 문서 내용에만 근거하여 답변하도록 제한하는 것입니다. GPT-5의 "안전한 완료" 훈련 방식과 Claude Sonnet 4.5의 개선된 정렬 기능은 환각 발생률을 크게 줄여줍니다.

컨텍스트 창을 위해 긴 문서를 청크 단위로 분할

대부분의 실제 문서들은 AI 컨텍스트 처리 범위를 초과합니다. 이러한 문서를 처리하려면 효과적인 청킹 전략이 필수적입니다. 청킹은 의미적 일관성을 유지하면서 문서를 컨텍스트 창 내에 맞도록 충분히 작은 세그먼트로 나누는 것을 의미합니다.

이 코드는 pdf.Pages을 반복하여 컨텍스트 연속성을 위해 구성 가능한 maxChunkTokensoverlapTokens을 포함하는 DocumentChunk 객체를 생성합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/semantic-document-chunking.cs
using IronPdf;

// Split long documents into overlapping chunks for RAG systems

var pdf = PdfDocument.FromFile("long-document.pdf");

// Chunking configuration
int maxChunkTokens = 4000;      // Leave room for prompts and responses
int overlapTokens = 200;        // Overlap for context continuity
int approxCharsPerToken = 4;    // Rough estimate for tokenization

int maxChunkChars = maxChunkTokens * approxCharsPerToken;
int overlapChars = overlapTokens * approxCharsPerToken;

var chunks = new List<DocumentChunk>();
var currentChunk = new System.Text.StringBuilder();
int chunkStartPage = 1;
int currentPage = 1;

for (int i = 0; i < pdf.PageCount; i++)
{
    string pageText = pdf.Pages[i].Text;
    currentPage = i + 1;

    if (currentChunk.Length + pageText.Length > maxChunkChars && currentChunk.Length > 0)
    {
        chunks.Add(new DocumentChunk
        {
            Text = currentChunk.ToString(),
            StartPage = chunkStartPage,
            EndPage = currentPage - 1,
            ChunkIndex = chunks.Count
        });

        // Create overlap with previous chunk for continuity
        string overlap = currentChunk.Length > overlapChars
            ? currentChunk.ToString().Substring(currentChunk.Length - overlapChars)
            : currentChunk.ToString();

        currentChunk.Clear();
        currentChunk.Append(overlap);
        chunkStartPage = currentPage - 1;
    }

    currentChunk.AppendLine($"\n--- Page {currentPage} ---\n");
    currentChunk.Append(pageText);
}

if (currentChunk.Length > 0)
{
    chunks.Add(new DocumentChunk
    {
        Text = currentChunk.ToString(),
        StartPage = chunkStartPage,
        EndPage = currentPage,
        ChunkIndex = chunks.Count
    });
}

Console.WriteLine($"Document chunked into {chunks.Count} segments");
foreach (var chunk in chunks)
{
    Console.WriteLine($"  Chunk {chunk.ChunkIndex + 1}: Pages {chunk.StartPage}-{chunk.EndPage} ({chunk.Text.Length} chars)");
}

// Save chunk metadata for RAG indexing
File.WriteAllText("chunks-metadata.json", System.Text.Json.JsonSerializer.Serialize(
    chunks.Select(c => new { c.ChunkIndex, c.StartPage, c.EndPage, Length = c.Text.Length }),
    new System.Text.Json.JsonSerializerOptions { WriteIndented = true }
));


ic class DocumentChunk

public string Text { get; set; } = "";
public int StartPage { get; set; }
public int EndPage { get; set; }
public int ChunkIndex { get; set; }
$vbLabelText   $csharpLabel


PDF 문서에 대한 고정 청킹과 의미론적 청킹 비교

겹치는 데이터 덩어리는 경계를 넘어 연속성을 제공하여 관련 정보가 덩어리 경계를 넘나들더라도 AI가 충분한 맥락을 확보할 수 있도록 합니다.

RAG(Retrieval-Augmented Generation) 패턴

검색 증강 생성(RAG)은 2026년 AI 기반 문서 분석을 위한 강력한 패턴을 제시합니다. RAG 시스템은 전체 문서를 AI에 입력하는 대신, 먼저 주어진 쿼리와 관련된 부분만 검색한 다음, 해당 부분을 컨텍스트로 사용하여 답변을 생성합니다.

RAG 워크플로는 문서 준비(문서 분할 및 임베딩 생성), 검색(관련 문서 조각 검색), 생성(검색된 문서 조각을 AI 응답의 컨텍스트로 사용)의 세 가지 주요 단계로 구성됩니다.

이 코드는 각 PDF 파일에 대해 pdf.Memorize()를 호출하여 여러 PDF 파일의 색인을 생성한 다음, pdf.Query()를 사용하여 통합된 문서 메모리에서 응답을 검색합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/rag-system-implementation.cs
using IronPdf;
using IronPdf.AI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.OpenAI;

// Retrieval-Augmented Generation (RAG) system for querying across multiple indexed documents

// Azure OpenAI configuration
string azureEndpoint = "https://your-resource.openai.azure.com/";
string apiKey = "your-azure-api-key";
string chatDeployment = "gpt-4o";
string embeddingDeployment = "text-embedding-ada-002";

// Initialize Semantic Kernel
var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .AddAzureOpenAIChatCompletion(chatDeployment, azureEndpoint, apiKey)
    .Build();

var memory = new MemoryBuilder()
    .WithMemoryStore(new VolatileMemoryStore())
    .WithAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .Build();

IronDocumentAI.Initialize(kernel, memory);

// Index all documents in folder
string[] documentPaths = Directory.GetFiles("documents/", "*.pdf");

Console.WriteLine($"Indexing {documentPaths.Length} documents...\n");

// Memorize each document (creates embeddings for retrieval)
foreach (string path in documentPaths)
{
    var pdf = PdfDocument.FromFile(path);
    await pdf.Memorize();
    Console.WriteLine($"Indexed: {Path.GetFileName(path)} ({pdf.PageCount} pages)");
}

Console.WriteLine("\n=== RAG System Ready ===\n");

// Query across all indexed documents
string query = "What are the key compliance requirements for data retention?";

Console.WriteLine($"Query: {query}\n");

var searchPdf = PdfDocument.FromFile(documentPaths[0]);
string answer = await searchPdf.Query(query);

Console.WriteLine($"Answer: {answer}");

// Interactive query loop
Console.WriteLine("\n--- Enter questions (type 'exit' to quit) ---\n");

while (true)
{
    Console.Write("Question: ");
    string? userQuery = Console.ReadLine();

    if (string.IsNullOrWhiteSpace(userQuery) || userQuery.ToLower() == "exit")
        break;

    string response = await searchPdf.Query(userQuery);
    Console.WriteLine($"\nAnswer: {response}\n");
}
$vbLabelText   $csharpLabel

RAG 시스템은 법률 사례 데이터베이스, 기술 문서 라이브러리, 연구 아카이브와 같은 대규모 문서 컬렉션을 처리하는 데 탁월합니다. 관련 부분만 추출함으로써, 그들은 사실상 무제한의 문서 크기에 대응하면서도 응답 품질을 유지합니다.

PDF 페이지에서 출처 인용하기

전문적인 용도에서는 AI 답변이 검증 가능해야 합니다. 인용 접근 방식은 청크 분할 및 검색 중에 청크 출처에 대한 메타데이터를 유지하는 것을 포함합니다. 각 청크는 텍스트 콘텐츠뿐만 아니라 원본 페이지 번호, 섹션 제목 및 문서 내 위치도 저장합니다.

입력


이 코드는 인용 지침과 함께 pdf.Query()를 사용한 다음, 정규식을 사용하여 ExtractCitedPages()를 호출하여 페이지 참조를 구문 분석하고 pdf.Pages[pageNum - 1].Text를 사용하여 소스를 확인합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/answer-with-citations.cs
using IronPdf;
using IronPdf.AI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using System.Text.RegularExpressions;

// Answer questions with page citations and source verification

// Azure OpenAI configuration
string azureEndpoint = "https://your-resource.openai.azure.com/";
string apiKey = "your-azure-api-key";
string chatDeployment = "gpt-4o";
string embeddingDeployment = "text-embedding-ada-002";

// Initialize Semantic Kernel
var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .AddAzureOpenAIChatCompletion(chatDeployment, azureEndpoint, apiKey)
    .Build();

var memory = new MemoryBuilder()
    .WithMemoryStore(new VolatileMemoryStore())
    .WithAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .Build();

IronDocumentAI.Initialize(kernel, memory);

var pdf = PdfDocument.FromFile("sample-legal-document.pdf");
await pdf.Memorize();

string question = "What are the termination conditions in this agreement?";

// Request citations in query
string citationQuery = $@"{question}

T: Include specific page citations in your answer using the format (Page X) or (Pages X-Y).
e information that appears in the document.";

string answerWithCitations = await pdf.Query(citationQuery);

Console.WriteLine("Question: " + question);
Console.WriteLine("\nAnswer with Citations:");
Console.WriteLine(answerWithCitations);

// Extract cited page numbers using regex
var citedPages = ExtractCitedPages(answerWithCitations);
Console.WriteLine($"\nCited pages: {string.Join(", ", citedPages)}");

// Verify citations with page excerpts
Console.WriteLine("\n=== Source Verification ===");
foreach (int pageNum in citedPages.Take(3))
{
    if (pageNum <= pdf.PageCount && pageNum > 0)
    {
        string pageText = pdf.Pages[pageNum - 1].Text;
        string excerpt = pageText.Length > 200 ? pageText.Substring(0, 200) + "..." : pageText;
        Console.WriteLine($"\nPage {pageNum} excerpt:\n{excerpt}");
    }
}

// Extract page numbers from citation format (Page X) or (Pages X-Y)
List<int> ExtractCitedPages(string text)
{
    var pages = new HashSet<int>();
    var matches = Regex.Matches(text, @"\(Pages?\s*(\d+)(?:\s*-\s*(\d+))?\)", RegexOptions.IgnoreCase);

    foreach (Match match in matches)
    {
        int startPage = int.Parse(match.Groups[1].Value);
        pages.Add(startPage);

        if (match.Groups[2].Success)
        {
            int endPage = int.Parse(match.Groups[2].Value);
            for (int p = startPage; p <= endPage; p++)
                pages.Add(p);
        }
    }
    return pages.OrderBy(p => p).ToList();
}
$vbLabelText   $csharpLabel


콘솔 출력

PDF에서 페이지 참조가 포함된 AI 답변을 보여주는 콘솔 출력

인용 기능을 통해 AI가 생성한 불투명한 답변을 투명하고 검증 가능한 정보로 변환할 수 있습니다. 사용자는 원자료를 검토하여 답변의 타당성을 검증하고 AI 기반 분석에 대한 신뢰도를 높일 수 있습니다.


일괄 AI 처리

대규모 문서 라이브러리 처리

기업 문서 처리에는 수천 또는 수백만 개의 PDF 파일이 포함되는 경우가 많습니다. 확장 가능한 배치 처리의 기반은 병렬화입니다. IronPDF는 스레드 안전성을 보장하므로, 여러 PDF 파일을 동시에 처리해도 간섭이 발생하지 않습니다.

이 코드는 구성 가능한 maxConcurrency와 함께 SemaphoreSlim를 사용하여 PDF를 병렬로 처리하고 각 PDF에 대해 pdf.Summarize()를 호출하며 결과를 ConcurrentBag에 추적합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/batch-document-processing.cs
using IronPdf;
using IronPdf.AI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using System;
using System.Collections.Concurrent;
using System.Text;

// Process multiple documents in parallel with rate limiting

// Azure OpenAI configuration
string azureEndpoint = "https://your-resource.openai.azure.com/";
string apiKey = "your-azure-api-key";
string chatDeployment = "gpt-4o";
string embeddingDeployment = "text-embedding-ada-002";

// Initialize Semantic Kernel
var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .AddAzureOpenAIChatCompletion(chatDeployment, azureEndpoint, apiKey)
    .Build();

var memory = new MemoryBuilder()
    .WithMemoryStore(new VolatileMemoryStore())
    .WithAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .Build();

IronDocumentAI.Initialize(kernel, memory);

// Configure parallel processing with rate limiting
int maxConcurrency = 3;
string inputFolder = "documents/";
string outputFolder = "summaries/";

Directory.CreateDirectory(outputFolder);

string[] pdfFiles = Directory.GetFiles(inputFolder, "*.pdf");
Console.WriteLine($"Processing {pdfFiles.Length} documents...\n");

var results = new ConcurrentBag<ProcessingResult>();
var semaphore = new SemaphoreSlim(maxConcurrency);

var tasks = pdfFiles.Select(async filePath =>
{
    await semaphore.WaitAsync();
    var result = new ProcessingResult { FilePath = filePath };

    try
    {
        var stopwatch = System.Diagnostics.Stopwatch.StartNew();

        var pdf = PdfDocument.FromFile(filePath);
        string summary = await pdf.Summarize();

        string outputPath = Path.Combine(outputFolder,
            Path.GetFileNameWithoutExtension(filePath) + "-summary.txt");
        await File.WriteAllTextAsync(outputPath, summary);

        stopwatch.Stop();
        result.Success = true;
        result.ProcessingTime = stopwatch.Elapsed;
        result.OutputPath = outputPath;

        Console.WriteLine($"[OK] {Path.GetFileName(filePath)} ({stopwatch.ElapsedMilliseconds}ms)");
    }
    catch (Exception ex)
    {
        result.Success = false;
        result.ErrorMessage = ex.Message;
        Console.WriteLine($"[ERROR] {Path.GetFileName(filePath)}: {ex.Message}");
    }
    finally
    {
        semaphore.Release();
        results.Add(result);
    }
}).ToArray();

await Task.WhenAll(tasks);

// Generate processing report
var successful = results.Where(r => r.Success).ToList();
var failed = results.Where(r => !r.Success).ToList();

var report = new StringBuilder();
report.AppendLine("=== Batch Processing Report ===");
report.AppendLine($"Successful: {successful.Count}");
report.AppendLine($"Failed: {failed.Count}");

if (successful.Any())
{
    var avgTime = TimeSpan.FromMilliseconds(successful.Average(r => r.ProcessingTime.TotalMilliseconds));
    report.AppendLine($"Average processing time: {avgTime.TotalSeconds:F1}s");
}

if (failed.Any())
{
    report.AppendLine("\nFailed documents:");
    foreach (var fail in failed)
        report.AppendLine($"  - {Path.GetFileName(fail.FilePath)}: {fail.ErrorMessage}");
}

string reportText = report.ToString();
Console.WriteLine($"\n{reportText}");
File.WriteAllText(Path.Combine(outputFolder, "processing-report.txt"), reportText);


s ProcessingResult

public string FilePath { get; set; } = "";
public bool Success { get; set; }
public TimeSpan ProcessingTime { get; set; }
public string OutputPath { get; set; } = "";
public string ErrorMessage { get; set; } = "";
$vbLabelText   $csharpLabel

대규모 환경에서는 견고한 오류 처리가 매우 중요합니다. 운영 시스템은 지수 백오프를 사용한 재시도 로직, 실패한 문서에 대한 별도의 오류 로깅, 그리고 재개 가능한 처리를 구현합니다.

비용 관리 및 토큰 사용

AI API 비용은 일반적으로 토큰당 부과됩니다. 2026년 기준으로 GPT-5는 입력 토큰 백만 개당 1.25달러, 출력 토큰 백만 개당 10달러이며, Claude Sonnet 4.5는 입력 토큰 백만 개당 3달러, 출력 토큰 백만 개당 15달러입니다. 주요 비용 최적화 전략은 불필요한 토큰 사용을 최소화하는 것입니다.

OpenAI의 배치 API는 처리 시간이 더 오래 걸리는 대신(최대 24시간) 토큰 비용을 50% 할인해 줍니다. 야간 처리 또는 주기적 분석의 경우, 일괄 처리는 상당한 비용 절감을 가져다줍니다.

이 코드는 pdf.ExtractAllText()를 사용하여 텍스트를 추출하고, JSONL 배치 요청을 생성하고, HttpClient를 통해 OpenAI 파일 엔드포인트에 업로드하고, 배치 API에 제출합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/batch-api-processing.cs
using IronPdf;
using System.Text.Json;
using System.Net.Http.Headers;

// Use OpenAI Batch API for 50% cost savings on large-scale document processing

string openAiApiKey = "your-openai-api-key";
string inputFolder = "documents/";

// Prepare batch requests in JSONL format
var batchRequests = new List<string>();
string[] pdfFiles = Directory.GetFiles(inputFolder, "*.pdf");

Console.WriteLine($"Preparing batch for {pdfFiles.Length} documents...\n");

foreach (string filePath in pdfFiles)
{
    var pdf = PdfDocument.FromFile(filePath);
    string pdfText = pdf.ExtractAllText();

    // Truncate to stay within batch API limits
    if (pdfText.Length > 100000)
        pdfText = pdfText.Substring(0, 100000) + "\n[Truncated...]";

    var request = new
    {
        custom_id = Path.GetFileNameWithoutExtension(filePath),
        method = "POST",
        url = "/v1/chat/completions",
        body = new
        {
            model = "gpt-4o",
            messages = new[]
            {
                new { role = "system", content = "Summarize the following document concisely." },
                new { role = "user", content = pdfText }
            },
            max_tokens = 1000
        }
    };

    batchRequests.Add(JsonSerializer.Serialize(request));
}

// Create JSONL file
string batchFilePath = "batch-requests.jsonl";
File.WriteAllLines(batchFilePath, batchRequests);
Console.WriteLine($"Created batch file with {batchRequests.Count} requests");

// Upload file to OpenAI
using var httpClient = new HttpClient();
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", openAiApiKey);

using var fileContent = new MultipartFormDataContent();
fileContent.Add(new ByteArrayContent(File.ReadAllBytes(batchFilePath)), "file", "batch-requests.jsonl");
fileContent.Add(new StringContent("batch"), "purpose");

var uploadResponse = await httpClient.PostAsync("https://api.openai.com/v1/files", fileContent);
var uploadResult = JsonSerializer.Deserialize<JsonElement>(await uploadResponse.Content.ReadAsStringAsync());
string fileId = uploadResult.GetProperty("id").GetString()!;
Console.WriteLine($"Uploaded file: {fileId}");

// Create batch job (24-hour completion window for 50% discount)
var batchJobRequest = new
{
    input_file_id = fileId,
    endpoint = "/v1/chat/completions",
    completion_window = "24h"
};

var batchResponse = await httpClient.PostAsync(
    "https://api.openai.com/v1/batches",
    new StringContent(JsonSerializer.Serialize(batchJobRequest), System.Text.Encoding.UTF8, "application/json")
);

var batchResult = JsonSerializer.Deserialize<JsonElement>(await batchResponse.Content.ReadAsStringAsync());
string batchId = batchResult.GetProperty("id").GetString()!;

Console.WriteLine($"\nBatch job created: {batchId}");
Console.WriteLine("Job will complete within 24 hours");
Console.WriteLine($"Check status: GET https://api.openai.com/v1/batches/{batchId}");

File.WriteAllText("batch-job-id.txt", batchId);
Console.WriteLine("\nBatch ID saved to batch-job-id.txt");
$vbLabelText   $csharpLabel

운영 환경에서 토큰 사용량을 모니터링하는 것은 필수적입니다. 많은 조직들이 문서의 80%는 더 작고 저렴한 모델로 처리할 수 있으며, 고가의 모델은 복잡한 경우에만 사용한다는 사실을 알게 됩니다.

캐싱 및 증분 처리

문서가 점진적으로 업데이트되는 문서 모음의 경우, 지능형 캐싱 및 점진적 처리 전략을 통해 비용을 크게 절감할 수 있습니다. 문서 수준 캐싱은 원본 PDF의 해시값과 함께 결과를 저장하여 변경되지 않은 문서를 불필요하게 재처리하는 것을 방지합니다.

DocumentCacheManager 클래스는 SHA256을 사용하여 변경 사항을 감지하고 결과를 CacheEntry 객체에 LastAccessed 타임스탬프와 함께 저장합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/incremental-caching.cs
using IronPdf;
using IronPdf.AI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text.Json;

// Cache AI processing results using file hashes to avoid reprocessing unchanged documents

// Azure OpenAI configuration
string azureEndpoint = "https://your-resource.openai.azure.com/";
string apiKey = "your-azure-api-key";
string chatDeployment = "gpt-4o";
string embeddingDeployment = "text-embedding-ada-002";

// Initialize Semantic Kernel
var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .AddAzureOpenAIChatCompletion(chatDeployment, azureEndpoint, apiKey)
    .Build();

var memory = new MemoryBuilder()
    .WithMemoryStore(new VolatileMemoryStore())
    .WithAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .Build();

IronDocumentAI.Initialize(kernel, memory);

// Configure caching
string cacheFolder = "ai-cache/";
string documentsFolder = "documents/";

Directory.CreateDirectory(cacheFolder);

var cacheManager = new DocumentCacheManager(cacheFolder);

// Process documents with caching
string[] pdfFiles = Directory.GetFiles(documentsFolder, "*.pdf");
int cached = 0, processed = 0;

foreach (string filePath in pdfFiles)
{
    string fileName = Path.GetFileName(filePath);
    string fileHash = cacheManager.ComputeFileHash(filePath);

    var cachedResult = cacheManager.GetCachedResult(fileName, fileHash);

    if (cachedResult != null)
    {
        Console.WriteLine($"[CACHE HIT] {fileName}");
        cached++;
        continue;
    }

    Console.WriteLine($"[PROCESSING] {fileName}");
    var pdf = PdfDocument.FromFile(filePath);
    string summary = await pdf.Summarize();

    cacheManager.CacheResult(fileName, fileHash, summary);
    processed++;
}

Console.WriteLine($"\nProcessing complete: {cached} cached, {processed} newly processed");
Console.WriteLine($"Cost savings: {(cached * 100.0 / Math.Max(1, cached + processed)):F1}% served from cache");


ash-based cache manager with JSON index
s DocumentCacheManager

private readonly string _cacheFolder;
private readonly string _indexPath;
private Dictionary<string, CacheEntry> _index;

public DocumentCacheManager(string cacheFolder)
{
    _cacheFolder = cacheFolder;
    _indexPath = Path.Combine(cacheFolder, "cache-index.json");
    _index = LoadIndex();
}

private Dictionary<string, CacheEntry> LoadIndex()
{
    if (File.Exists(_indexPath))
    {
        string json = File.ReadAllText(_indexPath);
        return JsonSerializer.Deserialize<Dictionary<string, CacheEntry>>(json) ?? new();
    }
    return new Dictionary<string, CacheEntry>();
}

private void SaveIndex()
{
    string json = JsonSerializer.Serialize(_index, new JsonSerializerOptions { WriteIndented = true });
    File.WriteAllText(_indexPath, json);
}

// SHA256 hash to detect file changes
public string ComputeFileHash(string filePath)
{
    using var sha256 = SHA256.Create();
    using var stream = File.OpenRead(filePath);
    byte[] hash = sha256.ComputeHash(stream);
    return Convert.ToHexString(hash);
}

public string? GetCachedResult(string fileName, string currentHash)
{
    if (_index.TryGetValue(fileName, out var entry))
    {
        if (entry.FileHash == currentHash && File.Exists(entry.CachePath))
        {
            entry.LastAccessed = DateTime.UtcNow;
            SaveIndex();
            return File.ReadAllText(entry.CachePath);
        }
    }
    return null;
}

public void CacheResult(string fileName, string fileHash, string result)
{
    string cachePath = Path.Combine(_cacheFolder, $"{Path.GetFileNameWithoutExtension(fileName)}-{fileHash[..8]}.txt");
    File.WriteAllText(cachePath, result);

    _index[fileName] = new CacheEntry
    {
        FileHash = fileHash,
        CachePath = cachePath,
        CreatedAt = DateTime.UtcNow,
        LastAccessed = DateTime.UtcNow
    };

    SaveIndex();
}


s CacheEntry

public string FileHash { get; set; } = "";
public string CachePath { get; set; } = "";
public DateTime CreatedAt { get; set; }
public DateTime LastAccessed { get; set; }
$vbLabelText   $csharpLabel

2026년에 출시될 GPT-5와 Claude Sonnet 4.5는 반복 패턴에 대한 토큰 소비량을 50~90%까지 줄일 수 있는 자동 프롬프트 캐싱 기능을 제공하여 대규모 운영에서 상당한 비용 절감을 실현할 수 있습니다.


실제 활용 사례

법률 조사 및 계약 분석

전통적인 법률 증거 수집 과정에는 수많은 하급 변호사들이 수십만 페이지에 달하는 자료를 수작업으로 검토하는 작업이 필요했습니다. AI 기반 검색은 관련 문서를 신속하게 식별하고, 권한 검토를 자동으로 수행하며, 핵심 증거 사실을 추출하는 등 이 과정을 혁신적으로 변화시킵니다.

IronPDF의 AI 통합 기능은 특권 탐지, 관련성 점수 매기기, 쟁점 식별 및 주요 날짜 추출과 같은 정교한 법률 워크플로우를 지원합니다. 로펌들은 증거 검토 시간을 70~80% 단축하여 더 적은 팀으로 더 큰 규모의 사건을 처리할 수 있게 되었다고 보고합니다.

2026년에는 GPT-5와 클로드 소네 4.5의 향상된 정확도와 환각 발생률 감소로 법률 전문가들은 점점 더 중요해지는 결정을 내릴 때 AI 기반 분석을 신뢰할 수 있게 될 것입니다.

재무 보고서 분석

금융 분석가들은 실적 보고서, SEC 공시 자료, 애널리스트 발표 자료에서 데이터를 추출하는 데 엄청난 시간을 소비합니다. AI 기반 금융 문서 처리 시스템은 이러한 데이터 추출을 자동화하여 분석가가 데이터 수집보다는 해석에 집중할 수 있도록 합니다.

이 예제는 pdf.Query()CompanyFinancials JSON 스키마를 사용하여 여러 10-K 보고서를 처리하고, 이를 통해 기업 간 수익, 마진 및 위험 요소를 추출하고 비교합니다.

:path=/static-assets/pdf/content-code-examples/tutorials/ai-powered-pdf-processing-csharp/financial-sector-analysis.cs
using IronPdf;
using IronPdf.AI;
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Connectors.OpenAI;
using System.Collections.Generic;
using System.Text.Json;
using System.Text;

// Compare financial metrics across multiple company filings for sector analysis

// Azure OpenAI configuration
string azureEndpoint = "https://your-resource.openai.azure.com/";
string apiKey = "your-azure-api-key";
string chatDeployment = "gpt-4o";
string embeddingDeployment = "text-embedding-ada-002";

// Initialize Semantic Kernel
var kernel = Kernel.CreateBuilder()
    .AddAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .AddAzureOpenAIChatCompletion(chatDeployment, azureEndpoint, apiKey)
    .Build();

var memory = new MemoryBuilder()
    .WithMemoryStore(new VolatileMemoryStore())
    .WithAzureOpenAITextEmbeddingGeneration(embeddingDeployment, azureEndpoint, apiKey)
    .Build();

IronDocumentAI.Initialize(kernel, memory);

// Analyze company filings
string[] companyFilings = {
    "filings/company-a-10k.pdf",
    "filings/company-b-10k.pdf",
    "filings/company-c-10k.pdf"
};

var sectorData = new List<CompanyFinancials>();

foreach (string filing in companyFilings)
{
    Console.WriteLine($"Analyzing: {Path.GetFileName(filing)}");

    var pdf = PdfDocument.FromFile(filing);

    // Define JSON schema for 10-K extraction (numbers in millions USD)
    string extractionQuery = @"Extract key financial metrics from this 10-K filing. Return JSON:

mpanyName"": ""string"",
scalYear"": ""string"",
venue"": number,
venueGrowth"": number,
ossMargin"": number,
eratingMargin"": number,
tIncome"": number,
s"": number,
talDebt"": number,
shPosition"": number,
ployeeCount"": number,
yRisks"": [""string""],
idance"": ""string""


in millions USD. Growth/margins as percentages.
NLY valid JSON.";

    string result = await pdf.Query(extractionQuery);

    try
    {
        var financials = JsonSerializer.Deserialize<CompanyFinancials>(result);
        if (financials != null)
            sectorData.Add(financials);
    }
    catch
    {
        Console.WriteLine($"  Warning: Could not parse financials for {filing}");
    }
}

// Generate sector comparison report
var report = new StringBuilder();
report.AppendLine("=== Sector Analysis Report ===\n");

report.AppendLine("Revenue Comparison (millions USD):");
foreach (var company in sectorData.OrderByDescending(c => c.Revenue))
    report.AppendLine($"  {company.CompanyName}: ${company.Revenue:N0} ({company.RevenueGrowth:+0.0;-0.0}% YoY)");

report.AppendLine("\nProfitability Margins:");
foreach (var company in sectorData.OrderByDescending(c => c.OperatingMargin))
    report.AppendLine($"  {company.CompanyName}: {company.GrossMargin:F1}% gross, {company.OperatingMargin:F1}% operating");

report.AppendLine("\nFinancial Health (Debt vs Cash):");
foreach (var company in sectorData)
{
    double netDebt = company.TotalDebt - company.CashPosition;
    string status = netDebt < 0 ? "Net Cash" : "Net Debt";
    report.AppendLine($"  {company.CompanyName}: {status} ${Math.Abs(netDebt):N0}M");
}

string reportText = report.ToString();
Console.WriteLine($"\n{reportText}");
File.WriteAllText("sector-analysis-report.txt", reportText);

// Save full JSON data
string outputJson = JsonSerializer.Serialize(sectorData, new JsonSerializerOptions { WriteIndented = true });
File.WriteAllText("sector-analysis.json", outputJson);

Console.WriteLine("Analysis saved to sector-analysis.json and sector-analysis-report.txt");


s CompanyFinancials

public string CompanyName { get; set; } = "";
public string FiscalYear { get; set; } = "";
public double Revenue { get; set; }
public double RevenueGrowth { get; set; }
public double GrossMargin { get; set; }
public double OperatingMargin { get; set; }
public double NetIncome { get; set; }
public double Eps { get; set; }
public double TotalDebt { get; set; }
public double CashPosition { get; set; }
public int EmployeeCount { get; set; }
public List<string> KeyRisks { get; set; } = new();
public string Guidance { get; set; } = "";
$vbLabelText   $csharpLabel

투자 회사들은 AI 기반 분석을 활용하여 매일 수천 건의 문서를 처리함으로써 분석가들이 더 광범위한 시장 상황을 파악하고 새로운 기회에 더 빠르게 대응할 수 있도록 지원합니다.

연구 논문 요약

학술 연구를 통해 매년 수백만 편의 논문이 발표됩니다. AI 기반 요약 기능은 연구자들이 논문의 관련성을 신속하게 평가하고, 핵심 결과를 파악하며, 자세히 읽어볼 가치가 있는 논문을 식별하는 데 도움을 줍니다. 효과적인 연구 요약은 연구 질문을 명확히 하고, 연구 방법을 설명하며, 주요 결과를 적절한 주의사항과 함께 요약하고, 결과를 맥락에 맞게 제시해야 합니다.

연구 기관들은 AI 요약 기능을 활용하여 기관의 지식 기반을 유지하고, 새로운 논문을 자동으로 처리합니다. 2026년에는 GPT-5의 향상된 과학적 추론 능력과 Claude Sonnet 4.5의 강화된 분석 기능을 통해 학술 요약의 정확도가 새로운 수준에 도달합니다.

정부 문서 처리

정부 기관은 규정, 대중 의견, 환경 영향 평가서, 법원 제출 서류, 감사 보고서 등 방대한 양의 문서를 생산합니다. AI 기반 문서 처리는 규정 준수 분석, 환경 영향 평가 및 입법 추적을 통해 정부 정보를 실질적인 조치에 활용할 수 있도록 지원합니다.

대중 의견 분석은 고유한 어려움을 수반합니다. 주요 규제 제안에는 수십만 건의 의견이 접수될 수 있기 때문입니다. AI 시스템은 댓글을 주제별로 분류하고, 공통 주제를 파악하고, 조직적인 캠페인을 감지하고, 정부 기관의 대응을 필요로 하는 실질적인 논거를 추출할 수 있습니다.

2026년형 인공지능 모델은 정부 문서 처리 분야에 전례 없는 역량을 제공하여 민주적 투명성과 정보에 기반한 정책 결정을 지원합니다.


문제 해결 및 기술 지원

흔히 발생하는 오류에 대한 빠른 해결 방법

  • 첫 렌더링 속도가 느린가요? 정상입니다. 크롬은 초기화에 2~3초가 걸리다가 이후 속도가 빨라집니다.
  • 클라우드 관련 문제가 있나요? 최소한 Azure B1 또는 그에 상응하는 리소스를 사용하세요.
  • 누락된 에셋이 있나요? 기본 경로를 설정하거나 base64로 임베드하세요.
  • 누락된 요소가 있나요? JavaScript 실행을 위해 RenderDelay를 추가하세요.
  • 메모리 문제가 있나요? 성능 개선을 위해 최신 IronPDF 버전으로 업데이트하세요.
  • 양식 필드에 문제가 있나요? 필드 이름이 고유한지 확인하고 최신 버전으로 업데이트하세요.

철을 만든 엔지니어들의 도움을 연중무휴 24시간 받으세요 (PDF).

IronPDF는 연중무휴 24시간 엔지니어 지원을 제공합니다. HTML을 PDF로 변환하거나 AI 통합에 문제가 있으신가요? 문의하기:


다음 단계

이제 AI 기반 PDF 처리 방식을 이해하셨으니, 다음 단계는 IronPDF의 더욱 폭넓은 기능을 살펴보는 것입니다. OpenAI 통합 가이드는 요약, 질의 및 기억 패턴에 대한 심층적인 내용을 다루고 있으며, 텍스트 및 이미지 추출 튜토리얼은 AI 분석 전에 PDF를 전처리하는 방법을 보여줍니다. 문서 통합 워크플로의 경우, 일괄 처리를 위해 PDF를 병합하고 분할하는 방법을 알아보세요.

AI 기능을 넘어 더 나아가고 싶다면, 워터마크, 머리글, 바닥글, 양식 및 주석을 다루는 완벽한 PDF 편집 튜토리얼을 참고하세요. 대안적인 AI 통합 접근 방식에 대해서는 ChatGPT C# 튜토리얼에서 다양한 패턴을 보여줍니다. 프로덕션 배포는 웹 앱 및 함수용 Azure 배포 가이드 에서 다루며, C# PDF 생성 튜토리얼에서는 HTML, URL 및 원시 콘텐츠에서 PDF를 생성하는 방법을 다룹니다.

시작할 준비 되셨나요? 워터마크 없이 실제 환경에서 테스트해 볼 수 있는 30일 무료 체험판을 시작해 보세요. 팀 규모에 맞춰 확장 가능한 유연한 라이선스를 제공합니다. AI 통합 또는 IronPDF의 다른 기능에 대한 질문이 있으시면 엔지니어링 지원팀 에서 도와드리겠습니다.

자주 묻는 질문

C#에서 PDF 처리에 AI를 사용하는 것의 이점은 무엇인가요?

C# 기반의 AI PDF 처리 기능은 문서 요약, JSON 형식의 데이터 추출, 질의응답 시스템 구축과 같은 고급 기능을 제공합니다. 이를 통해 대량의 문서를 처리할 때 효율성과 정확성을 향상시킬 수 있습니다.

IronPDF는 문서 요약을 위해 AI를 어떻게 통합하나요?

IronPDF는 GPT-5 및 Claude와 같은 모델을 활용하여 AI를 통합합니다. 이러한 모델은 문서를 분석하고 요약하여 더 쉽게 통찰력을 얻고 방대한 텍스트를 빠르게 이해할 수 있도록 도와줍니다.

AI 기반 PDF 처리에서 RAG 패턴의 역할은 무엇인가요?

RAG(Retrieve and Generate) 패턴은 AI 기반 PDF 처리에서 정보 검색 및 생성 품질을 향상시켜 보다 정확하고 문맥에 맞는 문서 분석을 가능하게 하는 데 사용됩니다.

IronPDF를 사용하여 PDF에서 구조화된 데이터를 추출하는 방법은 무엇입니까?

IronPDF는 PDF에서 구조화된 데이터를 JSON과 같은 형식으로 추출하여 다양한 애플리케이션 및 시스템 간의 원활한 데이터 통합 및 분석을 지원합니다.

IronPDF는 AI를 사용하여 대규모 문서 라이브러리를 처리할 수 있습니까?

네, IronPDF는 AI 모델을 사용하여 요약 및 데이터 추출과 같은 작업을 자동화함으로써 대규모 문서 라이브러리를 효율적으로 처리할 수 있으며, OpenAI 및 Azure OpenAI 통합을 통해 확장성도 뛰어납니다.

IronPDF는 PDF 처리를 위해 어떤 AI 모델을 지원하나요?

IronPDF는 GPT-5 및 Claude와 같은 고급 AI 모델을 지원하며, 이러한 모델은 문서 요약 및 질의응답 시스템 구축과 같은 작업에 사용되어 전반적인 처리 기능을 향상시킵니다.

IronPDF는 어떻게 질의응답 시스템 구축을 지원합니까?

IronPDF는 문서를 처리하고 분석하여 관련 정보를 추출함으로써 질의응답 시스템 구축을 지원하며, 추출된 정보는 사용자의 질문에 정확한 답변을 생성하는 데 사용될 수 있습니다.

C#에서 AI 기반 PDF 처리를 위한 주요 사용 사례는 무엇입니까?

주요 활용 사례로는 문서 요약, 구조화된 데이터 추출, 질의응답 시스템 개발, OpenAI와 같은 AI 통합을 활용한 대규모 문서 처리 작업 등이 있습니다.

IronPDF를 Azure OpenAI와 함께 사용하여 문서를 처리할 수 있습니까?

예, IronPDF는 Azure OpenAI와 통합하여 문서 처리 작업을 향상시키고 PDF 문서 요약, 추출 및 분석을 위한 확장 가능한 솔루션을 제공할 수 있습니다.

IronPDF는 AI를 활용하여 문서 분석 기능을 어떻게 향상시키나요?

IronPDF는 AI 모델을 활용하여 요약, 데이터 추출, 정보 검색 등의 작업을 자동화하고 향상시켜 문서 분석을 개선하고, 보다 효율적이고 정확한 문서 처리를 가능하게 합니다.

아흐마드 소하일
풀스택 개발자

아흐마드는 C#, Python 및 웹 기술에 탄탄한 기반을 갖춘 풀스택 개발자입니다. 그는 확장 가능한 소프트웨어 솔루션 구축에 깊은 관심을 가지고 있으며, 실제 응용 프로그램에서 디자인과 기능이 어떻게 조화를 이루는지 탐구하는 것을 즐깁니다.

Iron Software 팀에 합류하기 전, 아흐마드는 자동화 프로젝트와 API 통합 업무를 담당하며 성능 향상과 개발자 경험 개선에 주력했습니다.

그는 여가 시간에 UI/UX 아이디어를 실험하고, 오픈 소스 도구에 기여하며, 복잡한 주제를 더 쉽게 이해할 수 있도록 기술 문서를 작성하는 데 몰두하기도 합니다.

시작할 준비 되셨나요?
Nuget 다운로드 17,527,568 | 버전: 2026.2 방금 출시되었습니다