I use PDFBox and have the following code snippet that reads a PDF file and converts it to an image (PNG). It works well, the only problem is that it will completely lose the barcode value that is in the PDF file.
Does anyone know how to get around this with PDFBox? Is it possible? Thank.
PDDocument doc = PDDocument.load(new File("INPUT.pdf")); PDPage page = (PDPage) doc.getDocumentCatalog().getAllPages().get(0); BufferedImage image = page.convertToImage(); File outputfile = new File("image.png"); ImageIO.write(image, "png", outputfile);
image pdfbox barcode
pabhb Feb 25 '14 at 23:23 2014-02-25 23:23
source share