在實際環境中測試
在生產環境中測試而不帶水印。
適用於您所需的任何地方。
立即獲取您的免費 30天試用密鑰。
在生產環境中測試而不帶水印。
適用於您所需的任何地方。
獲得 30 天完整功能產品。
幾分鐘內即可運行。
在您的產品試用期間全面訪問我們的支援技術團隊
import com.ironsoftware.ironpdf.*;
import java.io.IOException;
import java.nio.file.Paths;
// Apply your license key
License.setLicenseKey("YOUR-LICENSE-KEY");
// Set a log path
Settings.setLogPath(Paths.get("C:/tmp/IronPdfEngine.log"));
// Render the HTML as a PDF. Stored in myPdf as type PdfDocument;
PdfDocument myPdf = PdfDocument.renderHtmlAsPdf("<h1> ~Hello World~ </h1> Made with IronPDF!");
// Save the PdfDocument to a file
myPdf.saveAs(Paths.get("html_saved.pdf"));