IronPDF Logofor Java

How to Merge PDF files using iText in Java

  • Convert HTML to PDF files with unmatched accuracy
  • Create & edit PDFs in C# with .NET 10 native API
  • Deploy on-premise or cloud (Azure, AWS)
  • Free 30-day trial, no watermarks, no credit card
Trial key

Get your free 30-day Trial Key instantly.

Check icon No credit card or account creation required
Test Icon

Test in a live environment

Test in production without watermarks.
Works wherever you need it to.

Functional Icon

Fully-functional product

Get 30 days of fully functional product.
Have it up and running in minutes.

Support Icon

24/5 technical support

Full access to our support engineering team during your product trial

HTML to PDF

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"));

World-Class Engineering,
24-Hour Support

Talk to an Expert