Results 1 to 2 of 2
  1. #1
    artfhc is offline Member
    Join Date
    Dec 2010
    Posts
    1
    Rep Power
    0

    Default PDFBox: Problem with converting pdf page into image

    My mission is pretty simple: converting every single page of a pdf file into images. I tried using icepdf open source version to generate the images but they don't generate the image with the correct font. So I start using PDFBox instead. The code is the following:

    PDDocument document = PDDocument.load(new File("testing.pdf"));
    List pages = document.getDocumentCatalog().getAllPages(); for (int i = 0; i < pages.size(); i++) { PDPage singlePage = pages.get(i); BufferedImage buffImage = convertToImage(singlePage, 8, 12); ImageIO.write(buffImage, "png", new File(PdfUtil.DATA_OUTPUT_DIR+(count++)+".png")); }


    The font looks good, but the pictures within the pdf file look fainted out (See the attachment). I look into the source code but I still have no clue how to fix it. Do you guys have any idea what's going on? Please help. Thanks!!

  2. #2
    Faceless is offline Member
    Join Date
    Jan 2011
    Posts
    1
    Rep Power
    0

Similar Threads

  1. pdfbox to overwrite image on a pdf
    By vammpiro in forum Advanced Java
    Replies: 1
    Last Post: 03-09-2012, 03:54 PM
  2. PDFBox, insert a hyperlink of a document in a page pdf
    By pedrojo in forum Advanced Java
    Replies: 0
    Last Post: 11-08-2010, 05:41 PM
  3. Converting Image to byte array[] ?
    By afflictedd2 in forum CLDC and MIDP
    Replies: 0
    Last Post: 04-11-2009, 11:33 PM
  4. Replies: 0
    Last Post: 01-08-2008, 05:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •