특정 PDF 페이지 삭제
PDF 문서에서 하나 이상의 페이지를 제거하려면 removePage 메서드를 사용하세요. 편집된 PDF 문서는 IronPDF의 saveAs 메서드를 사용하여 내보낼 수 있습니다. IronPDF는 .NET용 강력한 PDF 라이브러리로, 프로그래밍 방식으로 PDF 파일을 생성, 편집 및 조작할 수 있습니다. IronPDF 의 기능에 대한 자세한 내용은 IronPDF 공식 웹사이트 에서 확인할 수 있습니다.
설명:
IronPDF : 이 코드는 PDF 조작 for .NET 라이브러리인 IronPDF 사용합니다. 프로젝트에 이 라이브러리가 설치되어 있는지 확인하십시오.
PdfDocument.FromFile(inputPath): This loads the PDF from the given file path into a
PdfDocumentobject.RemovePage(0): This method is called on the
PdfDocumentobject to remove the first page of the PDF. Page numbering starts with 0, so0represents the first page.SaveAs(outputPath): Any changes made to the
PdfDocumentobject are saved to a new file specified byoutputPath.- Console.WriteLine : 수정된 PDF 파일의 위치를 나타내는 완료 메시지를 콘솔에 출력합니다.
Keep in mind to replace "input.pdf" and "output.pdf" with your actual file paths.




