사용자 지정 JavaScript 실행
IronPDF를 사용하면 JavaScript 코드로 HTML 콘텐츠의 모양을 손쉽게 수정할 수 있습니다. IronPDF는 Iron Software의 제품 라이브러리 중 하나로, HTML을 PDF로 변환하는 강력한 기능과 JavaScript, CSS 등을 지원하는 것으로 잘 알려져 있습니다.
이를 달성하기 위해서는 먼저 자바스크립트 코드를 정의해야 합니다. In our example, we'll change the text color of all H1 tags to red.
Next, create a rendering options object and set the enableJavaScript property to true. Assign the previously defined JavaScript code to the javascript property within this object.
Utilize the PdfDocument.FromHtml method to render the HTML content into a PDF document. Pass the renderOptions object as the second parameter.
마지막으로, 실행된 JavaScript 코드의 효과(텍스트 색상을 빨간색으로 변경)가 반영된 결과 PDF 파일을 'executed_js.pdf'로 저장합니다.
IronPDF 또는 IronBarcode , IronOCR 등 다른 Iron Software 라이브러리의 기능에 대해 자세히 알아보려면 Iron Software 공식 웹사이트를 방문하십시오.




