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.PDType1Font; 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 HelloWorld implements Runnable {
private final String fileOutput;
private final String msg;
public HelloWorld(String fileOutput, String msg) {
this.fileOutput = fileOutput;
this.msg = msg;
}
@Override
public void run() {
System.out.println("inside : " + Thread.currentThread().getName());
if (fileOutput == null || msg == null) {
System.err.println("usage: " + HelloWorld.class.getName() + "