package de.swingbe.pdfbox; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDPage; import org.apache.pdfbox.pdmodel.PDPageContentStream; import org.apache.pdfbox.pdmodel.font.PDFont; import org.apache.pdfbox.pdmodel.font.PDType0Font; import java.io.File; import java.io.IOException; /** * Creates a "Hello World" PDF using the built-in Helvetica font. *
* The example is taken from the PDF file format specification.
*/
public class HelloWorldTTF implements Runnable {
private final String fileOutput;
private final String msg;
private final String ttfPath;
public HelloWorldTTF(String fileOutput, String msg, String ttfPath) {
this.fileOutput = fileOutput;
this.msg = msg;
this.ttfPath = ttfPath;
}
@Override
public void run() {
System.out.println("inside : " + Thread.currentThread().getName());
if (fileOutput == null || msg == null) {
System.err.println("usage: " + HelloWorldTTF.class.getName() + "