Hi John Thank you for the response - I actually found this just as I read your email after looking through the GIT history and found PDFBOX-2844 which led to this change. Should have tried that first.
Funnily enough someone else has raised PDFBOX-2947 today with a similar question. Kind regards James -----Original Message----- From: John Hewson [mailto:[email protected]] Sent: 26 August 2015 02:19 To: [email protected] Subject: Re: 2.0.0 - where is org.apache.pdfbox.printing.PDFPrinter class? Hi James, > On 25 Aug 2015, at 05:49, Leece, James <[email protected]> wrote: > > Hi team > > I have been trying out PDFBox 2.0 to understand some of the newer features > (namely reading of embedded fonts and scale to fit printing) and whether our > vendor could implement them. > > When I download the 2.0 snapshots from > https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox/2.0.0-SNAPSHOT/ > there is no class org.apache.pdfbox.printing.PDFPrinter but the > documentation suggests it should be here? > > https://pdfbox.apache.org/docs/2.0.0-SNAPSHOT/javadocs/org/apache/pdfb > ox/printing/PDFPrinter.html Sorry the JavaDoc on the website is out of date. PDFPrinter has been removed. Users of PDFPrinter#silentPrint() should now use this code: PrinterJob job = PrinterJob.getPrinterJob(); job.setPageable(new PDFPageable(document)); job.print(); While users of PDFPrinter#Print() should now use this code: PrinterJob job = PrinterJob.getPrinterJob(); job.setPageable(new PDFPageable(document)); if (job.printDialog()) { job.print(); } Advanced use case examples can be found here: https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/printing/Printing.java?view=markup&pathrev=1690215 <https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/printing/Printing.java?view=markup&pathrev=1690215> — John > Kind regards (and much appreciate the good work) James --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
