# wkhtmltopdf-java **Repository Path**: nsdnsd/wkhtmltopdf-java ## Basic Information - **Project Name**: wkhtmltopdf-java - **Description**: No description available - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-07-05 - **Last Updated**: 2024-07-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Java WkHtmlToPdf Wrapper ========= A Java based wrapper for the [wkhtmltopdf](http://wkhtmltopdf.org/) command line tool. As the name implies, it uses WebKit to convert HTML documents to PDFs. This is based on [jhonnymertz/java-wkhtmltopdf-wrapper](https://github.com/jhonnymertz/java-wkhtmltopdf-wrapper) Requirements ------------ **[wkhtmltopdf](http://wkhtmltopdf.org/) must be installed and working on your system.** Usage ------------ ```java WkHtmlToPdf pdf = new WkHtmlToPdf(); pdf.addSources(Source.from("

Müller

", "UTF-8")); pdf.addSources(Source.fromUrl("http://www.google.com")); // Add a Table of contents pdf.addToc(); // The `wkhtmltopdf` shell command accepts different types of options such as global, page, headers and footers, and toc. Please see `wkhtmltopdf -H` for a full explanation. // All options are passed as array, for example: pdf.addArguments( Argument.from(Option.PageOption.EnableJavascript), Argument.from(Option.HeaderAndFooterOption.HeaderHtml, "file:///example.html") ); pdf.addArguments(Option.NoFooterLine.NoFooterLine); // Save the PDF pdf.save(Paths.get("output.pdf")); ``` Maven dependency ------------ ```xml com.ztomic wkhtmltopdf-java 0.0.1 bintray bintray http://jcenter.bintray.com/ false ```