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!