클래식 텍스트 머리글 및 바닥글 추가
HTML 콘텐츠를 렌더링할 때 PDF 문서에 텍스트 머리글과 바닥글을 추가하는 방법을 알아보세요.
텍스트 머리글과 바닥글을 포함하려면 렌더링 옵션 객체에 지정해야 합니다. Define the header content with a divider line, centered text displaying the HTML title, font settings, and font size. Similarly, define the footer with the textFooter property. You can utilize fields like {page}, {total-pages}, {url}, {date}, {time}, {html-title}, and {pdf-title} to personalize the content.
머리글과 바닥글에 맞게 여백을 적절히 조정하세요.
Utilize the PdfDocument.fromHtml method to convert your HTML content into a PDF. Pass the renderOptions object as an option.
HTML에서 PDF를 생성하는 방법에 대한 자세한 내용은 IronPDF 문서를 참조하십시오.
머리글과 바닥글이 포함된 최종 PDF 문서는 "header_footer.pdf"라는 이름으로 저장됩니다.




