pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugo Resendez <hugo.resen...@flex.com>
Subject RE: Problem with a font free3of9_3.ttf
Date Thu, 01 Jun 2017 20:03:42 GMT


Hello friends of pdfbox, I used the pdfbox tool to print pdf documents, but when I send the
document the corresponding font free3of9_3 I print it in pure boxes, the fonts are correctly
installed on my PC. This is the piece of code with which I make the impression. Attached image
files.


File fileDirectory = new File("C:\\pdf");
            File tempFile = File.createTempFile("Document", ".pdf",fileDirectory);
            try (FileOutputStream fos = new FileOutputStream(tempFile))
            {
                fos.write((byte[])map.get("LicenseDocumentPDF"));
                fos.flush();
                fos.close();
            }
            PrintService printService =  findPrintService(GetPrinterName("HP").Data().toString());
            PrinterJob pJob = PrinterJob.getPrinterJob();
            pJob.setPrintService(printService);
            PDDocument document =  PDDocument.load(tempFile);
            pJob.setPageable(document);
            pJob.print();
            //document.silentPrint(pJob);
            document.close();

Legal Disclaimer:
The information contained in this message may be privileged and confidential. It is intended
to be read only by the individual or entity to whom it is addressed or by their designee.
If the reader of this message is not the intended recipient, you are on notice that any distribution
of this message, in any form, is strictly prohibited. If you have received this message in
error, please immediately notify the sender and delete or destroy any copy of this message!
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message