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/pdfbox/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