Hello
I am new to Apache PDFBox. I have written simple code to display the word
"Training" in the pdf. When I call this method I am receiving a
NoClassDefFound error on PDTpye1Font. Any ideas or suggestions are welcome.
Thank you
Diane
private byte[] createThePdf() throws Exception
{
ByteArrayOutputStream out = new ByteArrayOutputStream();
PDDocument doc = new PDDocument();
PDPage page = new PDPage();
doc.addPage(page);
PDPageContentStream content = new PDPageContentStream(doc,page);
content.beginText();
content.setFont(PDType1Font.HELVETICA_BOLD, 26);
content.moveTextPositionByAmount(220,750);
content.drawString("TRAINING");
content.endText();
content.close();
doc.save(out);
doc.close();
return out.toByteArray();
}
Diane Haddy
Application Developer
Health Care Information Systems
Phone (319) 384-9725
[cid:[email protected]]
University of Iowa Hospitals & Clinics, S363-CDD
200 Hawkins Drive, Iowa City, IA 52242
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and
may be legally privileged. If you are not the intended recipient, you are
hereby notified that any retention, dissemination, distribution, or copying of
this communication is strictly prohibited. Please reply to the sender that you
have received the message in error, then delete it. Thank you.
________________________________