com.openhtmltopdf.pdfboxout.PDFontSupplier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openhtmltopdf-pdfbox Show documentation
Show all versions of openhtmltopdf-pdfbox Show documentation
Openhtmltopdf is a CSS 2.1 renderer written in Java. This artifact supports PDF output with Apache PDF-BOX 2.
package com.openhtmltopdf.pdfboxout;
import org.apache.pdfbox.pdmodel.font.PDFont;
import com.openhtmltopdf.extend.FSSupplier;
/**
* Implementation of {@link FSSupplier} that supplies a {@link PDFont}.
* Subclass this if you need special font loading rules (like using a font-cache, ...).
*/
public class PDFontSupplier implements FSSupplier {
// this used to be a private static class in PdfBoxFontResolver
private PDFont _font;
public PDFontSupplier(PDFont font) {
this._font = font;
}
@Override
public PDFont supply() {
return _font;
}
}