Andreas Lehmkühler wrote on 15/10/2009 10:00 PM: > Hi, > > Albie Janse van Rensburg schrieb: > >> My code: >> >> ====code==== >> private PDDocument pdfDocument; >> private String url = "http://localhost/test.pdf"; >> ... (snip) ... >> >> if (pdfLoaded == false) { >> pdfDocument = new PDDocument (); >> pdfDocument.load(new URL (url)); >> pdfLoaded = true; >> } >> pdfDocument.print(); >> ====code==== >> >> Is there something obvious I'm missing here? >> > The load-method is static and delivers the document you have to use for > further usage. Try sometjing like this: > > PDDocument pdfDocument = PDDocument.load(new URL (url)); > pdfDocument.print();
Great, thanks! I had to add the fontbox jar to get around an error, and now I have made a printout. Problem: instead of letters, I only see little blocks! I would guess there's an encoding of some sort needed. I've attached a PDF copy of the printout. Is there a guide for me to refer to? The documentation seems sparse - I am basically reading source + comments for help at the moment. Thanks for the help. -- [ Albie Janse van Rensburg ~ http://morph.telspace.co.za ] Look before you leap. -- Samuel Butler