from ironpdf import * renderer = ChromePdfRenderer() # Set Color and Grayscale renderer.RenderingOptions.GrayScale = True renderer.RenderHtmlFileAsPdf("my-content.html").SaveAs("my-content.pdf")
設置為灰度
from ironpdf import * renderer = ChromePdfRenderer() # Set Color and Grayscale renderer.RenderingOptions.GrayScale = True renderer.RenderHtmlFileAsPdf("my-content.html").SaveAs("my-content.pdf")